diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2011-08-26 02:10:39 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-29 15:25:30 -0400 |
commit | d618912417fbce4f6514fe1cbef7df2e73bdb6c2 (patch) | |
tree | e14bf2a7a09d898431cd0bac6d8b38318cb6dc48 /drivers/net/wireless/iwlwifi/iwl-5000.c | |
parent | 8f470ce31de1a9dfe6b53e0967eaa7e72b741714 (diff) |
iwlagn: hw_params moves to iwl_shared
Since it is used by all the layers, it needs to move to iwl_shared.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@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.c | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index c79f1f7830b0..e073422edab4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -140,13 +140,13 @@ static void iwl5150_set_ct_threshold(struct iwl_priv *priv) | |||
140 | s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) - | 140 | s32 threshold = (s32)CELSIUS_TO_KELVIN(CT_KILL_THRESHOLD_LEGACY) - |
141 | iwl_temp_calib_to_offset(priv); | 141 | iwl_temp_calib_to_offset(priv); |
142 | 142 | ||
143 | priv->hw_params.ct_kill_threshold = threshold * volt2temp_coef; | 143 | hw_params(priv).ct_kill_threshold = threshold * volt2temp_coef; |
144 | } | 144 | } |
145 | 145 | ||
146 | static void iwl5000_set_ct_threshold(struct iwl_priv *priv) | 146 | static void iwl5000_set_ct_threshold(struct iwl_priv *priv) |
147 | { | 147 | { |
148 | /* want Celsius */ | 148 | /* want Celsius */ |
149 | priv->hw_params.ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; | 149 | hw_params(priv).ct_kill_threshold = CT_KILL_THRESHOLD_LEGACY; |
150 | } | 150 | } |
151 | 151 | ||
152 | static int iwl5000_hw_set_hw_params(struct iwl_priv *priv) | 152 | static int iwl5000_hw_set_hw_params(struct iwl_priv *priv) |
@@ -156,38 +156,38 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv) | |||
156 | priv->cfg->base_params->num_of_queues = | 156 | priv->cfg->base_params->num_of_queues = |
157 | iwlagn_mod_params.num_of_queues; | 157 | iwlagn_mod_params.num_of_queues; |
158 | 158 | ||
159 | priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; | 159 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; |
160 | priv->hw_params.scd_bc_tbls_size = | 160 | hw_params(priv).scd_bc_tbls_size = |
161 | priv->cfg->base_params->num_of_queues * | 161 | priv->cfg->base_params->num_of_queues * |
162 | sizeof(struct iwlagn_scd_bc_tbl); | 162 | sizeof(struct iwlagn_scd_bc_tbl); |
163 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 163 | hw_params(priv).tfd_size = sizeof(struct iwl_tfd); |
164 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; | 164 | hw_params(priv).max_stations = IWLAGN_STATION_COUNT; |
165 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; | 165 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; |
166 | 166 | ||
167 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; | 167 | hw_params(priv).max_data_size = IWLAGN_RTC_DATA_SIZE; |
168 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; | 168 | hw_params(priv).max_inst_size = IWLAGN_RTC_INST_SIZE; |
169 | 169 | ||
170 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | | 170 | hw_params(priv).ht40_channel = BIT(IEEE80211_BAND_2GHZ) | |
171 | BIT(IEEE80211_BAND_5GHZ); | 171 | BIT(IEEE80211_BAND_5GHZ); |
172 | 172 | ||
173 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); | 173 | hw_params(priv).tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); |
174 | priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); | 174 | hw_params(priv).rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); |
175 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; | 175 | hw_params(priv).valid_tx_ant = priv->cfg->valid_tx_ant; |
176 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; | 176 | hw_params(priv).valid_rx_ant = priv->cfg->valid_rx_ant; |
177 | 177 | ||
178 | iwl5000_set_ct_threshold(priv); | 178 | iwl5000_set_ct_threshold(priv); |
179 | 179 | ||
180 | /* Set initial sensitivity parameters */ | 180 | /* Set initial sensitivity parameters */ |
181 | /* Set initial calibration set */ | 181 | /* Set initial calibration set */ |
182 | priv->hw_params.sens = &iwl5000_sensitivity; | 182 | hw_params(priv).sens = &iwl5000_sensitivity; |
183 | priv->hw_params.calib_init_cfg = | 183 | hw_params(priv).calib_init_cfg = |
184 | BIT(IWL_CALIB_XTAL) | | 184 | BIT(IWL_CALIB_XTAL) | |
185 | BIT(IWL_CALIB_LO) | | 185 | BIT(IWL_CALIB_LO) | |
186 | BIT(IWL_CALIB_TX_IQ) | | 186 | BIT(IWL_CALIB_TX_IQ) | |
187 | BIT(IWL_CALIB_TX_IQ_PERD) | | 187 | BIT(IWL_CALIB_TX_IQ_PERD) | |
188 | BIT(IWL_CALIB_BASE_BAND); | 188 | BIT(IWL_CALIB_BASE_BAND); |
189 | 189 | ||
190 | priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; | 190 | hw_params(priv).beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; |
191 | 191 | ||
192 | return 0; | 192 | return 0; |
193 | } | 193 | } |
@@ -199,38 +199,38 @@ static int iwl5150_hw_set_hw_params(struct iwl_priv *priv) | |||
199 | priv->cfg->base_params->num_of_queues = | 199 | priv->cfg->base_params->num_of_queues = |
200 | iwlagn_mod_params.num_of_queues; | 200 | iwlagn_mod_params.num_of_queues; |
201 | 201 | ||
202 | priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; | 202 | hw_params(priv).max_txq_num = priv->cfg->base_params->num_of_queues; |
203 | priv->hw_params.scd_bc_tbls_size = | 203 | hw_params(priv).scd_bc_tbls_size = |
204 | priv->cfg->base_params->num_of_queues * | 204 | priv->cfg->base_params->num_of_queues * |
205 | sizeof(struct iwlagn_scd_bc_tbl); | 205 | sizeof(struct iwlagn_scd_bc_tbl); |
206 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 206 | hw_params(priv).tfd_size = sizeof(struct iwl_tfd); |
207 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; | 207 | hw_params(priv).max_stations = IWLAGN_STATION_COUNT; |
208 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; | 208 | priv->contexts[IWL_RXON_CTX_BSS].bcast_sta_id = IWLAGN_BROADCAST_ID; |
209 | 209 | ||
210 | priv->hw_params.max_data_size = IWLAGN_RTC_DATA_SIZE; | 210 | hw_params(priv).max_data_size = IWLAGN_RTC_DATA_SIZE; |
211 | priv->hw_params.max_inst_size = IWLAGN_RTC_INST_SIZE; | 211 | hw_params(priv).max_inst_size = IWLAGN_RTC_INST_SIZE; |
212 | 212 | ||
213 | priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) | | 213 | hw_params(priv).ht40_channel = BIT(IEEE80211_BAND_2GHZ) | |
214 | BIT(IEEE80211_BAND_5GHZ); | 214 | BIT(IEEE80211_BAND_5GHZ); |
215 | 215 | ||
216 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); | 216 | hw_params(priv).tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); |
217 | priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); | 217 | hw_params(priv).rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); |
218 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; | 218 | hw_params(priv).valid_tx_ant = priv->cfg->valid_tx_ant; |
219 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; | 219 | hw_params(priv).valid_rx_ant = priv->cfg->valid_rx_ant; |
220 | 220 | ||
221 | iwl5150_set_ct_threshold(priv); | 221 | iwl5150_set_ct_threshold(priv); |
222 | 222 | ||
223 | /* Set initial sensitivity parameters */ | 223 | /* Set initial sensitivity parameters */ |
224 | /* Set initial calibration set */ | 224 | /* Set initial calibration set */ |
225 | priv->hw_params.sens = &iwl5150_sensitivity; | 225 | hw_params(priv).sens = &iwl5150_sensitivity; |
226 | priv->hw_params.calib_init_cfg = | 226 | hw_params(priv).calib_init_cfg = |
227 | BIT(IWL_CALIB_LO) | | 227 | BIT(IWL_CALIB_LO) | |
228 | BIT(IWL_CALIB_TX_IQ) | | 228 | BIT(IWL_CALIB_TX_IQ) | |
229 | BIT(IWL_CALIB_BASE_BAND); | 229 | BIT(IWL_CALIB_BASE_BAND); |
230 | if (priv->cfg->need_dc_calib) | 230 | if (priv->cfg->need_dc_calib) |
231 | priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC); | 231 | hw_params(priv).calib_init_cfg |= BIT(IWL_CALIB_DC); |
232 | 232 | ||
233 | priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; | 233 | hw_params(priv).beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; |
234 | 234 | ||
235 | return 0; | 235 | return 0; |
236 | } | 236 | } |