aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-04-09 20:46:55 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-12 15:06:09 -0400
commit9e295116bb1f7300e5cdb87a41ce85b1efe79ec2 (patch)
treed6890b3d08df3371329e443ed8c23f1b8128de66 /drivers/net/wireless/iwlwifi/iwl-5000.c
parent7c5ba4a830cbb730770129b0004e2a06e47dbac5 (diff)
iwlwifi: move hw_params into priv
The hw_params are mostly values that are derived from the actual hardware config. As such, while it is possible that MVM will require similar ones, it makes more sense -- at least for now -- to put them into the DVM struct. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 9f379d3dad1..8870370e0da 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -145,45 +145,45 @@ static void iwl5150_set_ct_threshold(struct iwl_priv *priv)
145 s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) - 145 s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) -
146 iwl_temp_calib_to_offset(priv->shrd); 146 iwl_temp_calib_to_offset(priv->shrd);
147 147
148 hw_params(priv).ct_kill_threshold = threshold * volt2temp_coef; 148 priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef;
149} 149}
150 150
151static void iwl5000_set_ct_threshold(struct iwl_priv *priv) 151static void iwl5000_set_ct_threshold(struct iwl_priv *priv)
152{ 152{
153 /* want Celsius */ 153 /* want Celsius */
154 hw_params(priv).ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; 154 priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY;
155} 155}
156 156
157static void iwl5000_hw_set_hw_params(struct iwl_priv *priv) 157static void iwl5000_hw_set_hw_params(struct iwl_priv *priv)
158{ 158{
159 hw_params(priv).ht40_channel = BIT(IEEE80211_BAND_2GHZ) | 159 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
160 BIT(IEEE80211_BAND_5GHZ); 160 BIT(IEEE80211_BAND_5GHZ);
161 161
162 hw_params(priv).tx_chains_num = 162 priv->hw_params.tx_chains_num =
163 num_of_ant(hw_params(priv).valid_tx_ant); 163 num_of_ant(priv->hw_params.valid_tx_ant);
164 hw_params(priv).rx_chains_num = 164 priv->hw_params.rx_chains_num =
165 num_of_ant(hw_params(priv).valid_rx_ant); 165 num_of_ant(priv->hw_params.valid_rx_ant);
166 166
167 iwl5000_set_ct_threshold(priv); 167 iwl5000_set_ct_threshold(priv);
168 168
169 /* Set initial sensitivity parameters */ 169 /* Set initial sensitivity parameters */
170 hw_params(priv).sens = &iwl5000_sensitivity; 170 priv->hw_params.sens = &iwl5000_sensitivity;
171} 171}
172 172
173static void iwl5150_hw_set_hw_params(struct iwl_priv *priv) 173static void iwl5150_hw_set_hw_params(struct iwl_priv *priv)
174{ 174{
175 hw_params(priv).ht40_channel = BIT(IEEE80211_BAND_2GHZ) | 175 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
176 BIT(IEEE80211_BAND_5GHZ); 176 BIT(IEEE80211_BAND_5GHZ);
177 177
178 hw_params(priv).tx_chains_num = 178 priv->hw_params.tx_chains_num =
179 num_of_ant(hw_params(priv).valid_tx_ant); 179 num_of_ant(priv->hw_params.valid_tx_ant);
180 hw_params(priv).rx_chains_num = 180 priv->hw_params.rx_chains_num =
181 num_of_ant(hw_params(priv).valid_rx_ant); 181 num_of_ant(priv->hw_params.valid_rx_ant);
182 182
183 iwl5150_set_ct_threshold(priv); 183 iwl5150_set_ct_threshold(priv);
184 184
185 /* Set initial sensitivity parameters */ 185 /* Set initial sensitivity parameters */
186 hw_params(priv).sens = &iwl5150_sensitivity; 186 priv->hw_params.sens = &iwl5150_sensitivity;
187} 187}
188 188
189static void iwl5150_temperature(struct iwl_priv *priv) 189static void iwl5150_temperature(struct iwl_priv *priv)