aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-6000.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-6000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c73
1 files changed, 51 insertions, 22 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 7da23d3ff7b6..7acef703253a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -176,24 +176,56 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
176 /* Set initial sensitivity parameters */ 176 /* Set initial sensitivity parameters */
177 /* Set initial calibration set */ 177 /* Set initial calibration set */
178 priv->hw_params.sens = &iwl6000_sensitivity; 178 priv->hw_params.sens = &iwl6000_sensitivity;
179 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) { 179 priv->hw_params.calib_init_cfg =
180 case CSR_HW_REV_TYPE_6x50: 180 BIT(IWL_CALIB_XTAL) |
181 priv->hw_params.calib_init_cfg = 181 BIT(IWL_CALIB_LO) |
182 BIT(IWL_CALIB_XTAL) | 182 BIT(IWL_CALIB_TX_IQ) |
183 BIT(IWL_CALIB_DC) | 183 BIT(IWL_CALIB_BASE_BAND);
184 BIT(IWL_CALIB_LO) | 184
185 BIT(IWL_CALIB_TX_IQ) | 185 return 0;
186 BIT(IWL_CALIB_BASE_BAND); 186}
187 187
188 break; 188static int iwl6050_hw_set_hw_params(struct iwl_priv *priv)
189 default: 189{
190 priv->hw_params.calib_init_cfg = 190 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES &&
191 BIT(IWL_CALIB_XTAL) | 191 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES)
192 BIT(IWL_CALIB_LO) | 192 priv->cfg->num_of_queues =
193 BIT(IWL_CALIB_TX_IQ) | 193 priv->cfg->mod_params->num_of_queues;
194 BIT(IWL_CALIB_BASE_BAND); 194
195 break; 195 priv->hw_params.max_txq_num = priv->cfg->num_of_queues;
196 } 196 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
197 priv->hw_params.scd_bc_tbls_size =
198 priv->cfg->num_of_queues *
199 sizeof(struct iwlagn_scd_bc_tbl);
200 priv->hw_params.tfd_size = sizeof(struct iwl_tfd);
201 priv->hw_params.max_stations = IWL5000_STATION_COUNT;
202 priv->hw_params.bcast_sta_id = IWL5000_BROADCAST_ID;
203
204 priv->hw_params.max_data_size = IWL60_RTC_DATA_SIZE;
205 priv->hw_params.max_inst_size = IWL60_RTC_INST_SIZE;
206
207 priv->hw_params.max_bsm_size = 0;
208 priv->hw_params.ht40_channel = BIT(IEEE80211_BAND_2GHZ) |
209 BIT(IEEE80211_BAND_5GHZ);
210 priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR;
211
212 priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant);
213 priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant);
214 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
215 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
216
217 if (priv->cfg->ops->lib->temp_ops.set_ct_kill)
218 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
219
220 /* Set initial sensitivity parameters */
221 /* Set initial calibration set */
222 priv->hw_params.sens = &iwl6000_sensitivity;
223 priv->hw_params.calib_init_cfg =
224 BIT(IWL_CALIB_XTAL) |
225 BIT(IWL_CALIB_DC) |
226 BIT(IWL_CALIB_LO) |
227 BIT(IWL_CALIB_TX_IQ) |
228 BIT(IWL_CALIB_BASE_BAND);
197 229
198 return 0; 230 return 0;
199} 231}
@@ -304,7 +336,7 @@ static const struct iwl_ops iwl6000_ops = {
304}; 336};
305 337
306static struct iwl_lib_ops iwl6050_lib = { 338static struct iwl_lib_ops iwl6050_lib = {
307 .set_hw_params = iwl6000_hw_set_hw_params, 339 .set_hw_params = iwl6050_hw_set_hw_params,
308 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl, 340 .txq_update_byte_cnt_tbl = iwlagn_txq_update_byte_cnt_tbl,
309 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl, 341 .txq_inval_byte_cnt_tbl = iwlagn_txq_inval_byte_cnt_tbl,
310 .txq_set_sched = iwlagn_txq_set_sched, 342 .txq_set_sched = iwlagn_txq_set_sched,
@@ -468,7 +500,6 @@ struct iwl_cfg iwl6000i_2abg_cfg = {
468 .pa_type = IWL_PA_INTERNAL, 500 .pa_type = IWL_PA_INTERNAL,
469 .max_ll_items = OTP_MAX_LL_ITEMS_6x00, 501 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
470 .shadow_ram_support = true, 502 .shadow_ram_support = true,
471 .ht_greenfield_support = true,
472 .led_compensation = 51, 503 .led_compensation = 51,
473 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 504 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
474 .supports_idle = true, 505 .supports_idle = true,
@@ -501,7 +532,6 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
501 .pa_type = IWL_PA_INTERNAL, 532 .pa_type = IWL_PA_INTERNAL,
502 .max_ll_items = OTP_MAX_LL_ITEMS_6x00, 533 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
503 .shadow_ram_support = true, 534 .shadow_ram_support = true,
504 .ht_greenfield_support = true,
505 .led_compensation = 51, 535 .led_compensation = 51,
506 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 536 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
507 .supports_idle = true, 537 .supports_idle = true,
@@ -568,7 +598,6 @@ struct iwl_cfg iwl6050_2abg_cfg = {
568 .pa_type = IWL_PA_SYSTEM, 598 .pa_type = IWL_PA_SYSTEM,
569 .max_ll_items = OTP_MAX_LL_ITEMS_6x50, 599 .max_ll_items = OTP_MAX_LL_ITEMS_6x50,
570 .shadow_ram_support = true, 600 .shadow_ram_support = true,
571 .ht_greenfield_support = true,
572 .led_compensation = 51, 601 .led_compensation = 51,
573 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, 602 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
574 .supports_idle = true, 603 .supports_idle = true,