aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorDon Fry <donald.h.fry@intel.com>2011-04-20 18:23:57 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-04-30 11:56:45 -0400
commit9d143e9a0d68025efe902d86eb6207cbec36dcdb (patch)
tree7aced3651272a266c3572d2a1c057499404347e2 /drivers/net/wireless/iwlwifi
parentb4ed221daba1b129c3efff8a7352d9791d034330 (diff)
iwlagn: mod param cleanup
All agn devices use the same module parameter structure. Delete the indirection and access the structure diretly. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-2000.c10
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c15
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rxon.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c7
10 files changed, 27 insertions, 44 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index baf80111efaf..d2b1be65f903 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -121,10 +121,10 @@ static struct iwl_sensitivity_ranges iwl1000_sensitivity = {
121 121
122static int iwl1000_hw_set_hw_params(struct iwl_priv *priv) 122static int iwl1000_hw_set_hw_params(struct iwl_priv *priv)
123{ 123{
124 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && 124 if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
125 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) 125 iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
126 priv->cfg->base_params->num_of_queues = 126 priv->cfg->base_params->num_of_queues =
127 priv->cfg->mod_params->num_of_queues; 127 iwlagn_mod_params.num_of_queues;
128 128
129 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; 129 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
130 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; 130 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
@@ -249,7 +249,6 @@ static struct iwl_ht_params iwl1000_ht_params = {
249 .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ 249 .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \
250 .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ 250 .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
251 .ops = &iwl1000_ops, \ 251 .ops = &iwl1000_ops, \
252 .mod_params = &iwlagn_mod_params, \
253 .base_params = &iwl1000_base_params, \ 252 .base_params = &iwl1000_base_params, \
254 .led_mode = IWL_LED_BLINK 253 .led_mode = IWL_LED_BLINK
255 254
@@ -271,7 +270,6 @@ struct iwl_cfg iwl1000_bg_cfg = {
271 .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ 270 .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \
272 .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ 271 .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \
273 .ops = &iwl1000_ops, \ 272 .ops = &iwl1000_ops, \
274 .mod_params = &iwlagn_mod_params, \
275 .base_params = &iwl1000_base_params, \ 273 .base_params = &iwl1000_base_params, \
276 .led_mode = IWL_LED_RF_STATE, \ 274 .led_mode = IWL_LED_RF_STATE, \
277 .rx_with_siso_diversity = true 275 .rx_with_siso_diversity = true
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index f90d6afc58c1..476150f67d29 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -128,10 +128,10 @@ static struct iwl_sensitivity_ranges iwl2000_sensitivity = {
128 128
129static int iwl2000_hw_set_hw_params(struct iwl_priv *priv) 129static int iwl2000_hw_set_hw_params(struct iwl_priv *priv)
130{ 130{
131 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && 131 if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
132 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) 132 iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
133 priv->cfg->base_params->num_of_queues = 133 priv->cfg->base_params->num_of_queues =
134 priv->cfg->mod_params->num_of_queues; 134 iwlagn_mod_params.num_of_queues;
135 135
136 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; 136 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
137 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; 137 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
@@ -383,7 +383,6 @@ static struct iwl_bt_params iwl2030_bt_params = {
383 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ 383 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \
384 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 384 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
385 .ops = &iwl2000_ops, \ 385 .ops = &iwl2000_ops, \
386 .mod_params = &iwlagn_mod_params, \
387 .base_params = &iwl2000_base_params, \ 386 .base_params = &iwl2000_base_params, \
388 .need_dc_calib = true, \ 387 .need_dc_calib = true, \
389 .need_temp_offset_calib = true, \ 388 .need_temp_offset_calib = true, \
@@ -409,7 +408,6 @@ struct iwl_cfg iwl2000_2bg_cfg = {
409 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ 408 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \
410 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 409 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
411 .ops = &iwl2030_ops, \ 410 .ops = &iwl2030_ops, \
412 .mod_params = &iwlagn_mod_params, \
413 .base_params = &iwl2030_base_params, \ 411 .base_params = &iwl2030_base_params, \
414 .bt_params = &iwl2030_bt_params, \ 412 .bt_params = &iwl2030_bt_params, \
415 .need_dc_calib = true, \ 413 .need_dc_calib = true, \
@@ -436,7 +434,6 @@ struct iwl_cfg iwl2030_2bg_cfg = {
436 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ 434 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \
437 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 435 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
438 .ops = &iwl105_ops, \ 436 .ops = &iwl105_ops, \
439 .mod_params = &iwlagn_mod_params, \
440 .base_params = &iwl2000_base_params, \ 437 .base_params = &iwl2000_base_params, \
441 .need_dc_calib = true, \ 438 .need_dc_calib = true, \
442 .need_temp_offset_calib = true, \ 439 .need_temp_offset_calib = true, \
@@ -462,7 +459,6 @@ struct iwl_cfg iwl105_bgn_cfg = {
462 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \ 459 .eeprom_ver = EEPROM_2000_EEPROM_VERSION, \
463 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \ 460 .eeprom_calib_ver = EEPROM_2000_TX_POWER_VERSION, \
464 .ops = &iwl135_ops, \ 461 .ops = &iwl135_ops, \
465 .mod_params = &iwlagn_mod_params, \
466 .base_params = &iwl2030_base_params, \ 462 .base_params = &iwl2030_base_params, \
467 .bt_params = &iwl2030_bt_params, \ 463 .bt_params = &iwl2030_bt_params, \
468 .need_dc_calib = true, \ 464 .need_dc_calib = true, \
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 655afc19f68f..969c91a2974e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -165,10 +165,10 @@ static void iwl5000_set_ct_threshold(struct iwl_priv *priv)
165 165
166static int iwl5000_hw_set_hw_params(struct iwl_priv *priv) 166static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
167{ 167{
168 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && 168 if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
169 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) 169 iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
170 priv->cfg->base_params->num_of_queues = 170 priv->cfg->base_params->num_of_queues =
171 priv->cfg->mod_params->num_of_queues; 171 iwlagn_mod_params.num_of_queues;
172 172
173 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; 173 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
174 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; 174 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
@@ -210,10 +210,10 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv)
210 210
211static int iwl5150_hw_set_hw_params(struct iwl_priv *priv) 211static int iwl5150_hw_set_hw_params(struct iwl_priv *priv)
212{ 212{
213 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && 213 if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
214 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) 214 iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
215 priv->cfg->base_params->num_of_queues = 215 priv->cfg->base_params->num_of_queues =
216 priv->cfg->mod_params->num_of_queues; 216 iwlagn_mod_params.num_of_queues;
217 217
218 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; 218 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
219 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; 219 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
@@ -468,7 +468,6 @@ static struct iwl_ht_params iwl5000_ht_params = {
468 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \ 468 .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \
469 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ 469 .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \
470 .ops = &iwl5000_ops, \ 470 .ops = &iwl5000_ops, \
471 .mod_params = &iwlagn_mod_params, \
472 .base_params = &iwl5000_base_params, \ 471 .base_params = &iwl5000_base_params, \
473 .led_mode = IWL_LED_BLINK 472 .led_mode = IWL_LED_BLINK
474 473
@@ -512,7 +511,6 @@ struct iwl_cfg iwl5350_agn_cfg = {
512 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, 511 .eeprom_ver = EEPROM_5050_EEPROM_VERSION,
513 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, 512 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION,
514 .ops = &iwl5000_ops, 513 .ops = &iwl5000_ops,
515 .mod_params = &iwlagn_mod_params,
516 .base_params = &iwl5000_base_params, 514 .base_params = &iwl5000_base_params,
517 .ht_params = &iwl5000_ht_params, 515 .ht_params = &iwl5000_ht_params,
518 .led_mode = IWL_LED_BLINK, 516 .led_mode = IWL_LED_BLINK,
@@ -526,7 +524,6 @@ struct iwl_cfg iwl5350_agn_cfg = {
526 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \ 524 .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \
527 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ 525 .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \
528 .ops = &iwl5150_ops, \ 526 .ops = &iwl5150_ops, \
529 .mod_params = &iwlagn_mod_params, \
530 .base_params = &iwl5000_base_params, \ 527 .base_params = &iwl5000_base_params, \
531 .need_dc_calib = true, \ 528 .need_dc_calib = true, \
532 .led_mode = IWL_LED_BLINK, \ 529 .led_mode = IWL_LED_BLINK, \
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 905eb57f7cab..91edb57371e7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -154,10 +154,10 @@ static struct iwl_sensitivity_ranges iwl6000_sensitivity = {
154 154
155static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) 155static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
156{ 156{
157 if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && 157 if (iwlagn_mod_params.num_of_queues >= IWL_MIN_NUM_QUEUES &&
158 priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) 158 iwlagn_mod_params.num_of_queues <= IWLAGN_NUM_QUEUES)
159 priv->cfg->base_params->num_of_queues = 159 priv->cfg->base_params->num_of_queues =
160 priv->cfg->mod_params->num_of_queues; 160 iwlagn_mod_params.num_of_queues;
161 161
162 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; 162 priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues;
163 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; 163 priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM;
@@ -482,7 +482,6 @@ static struct iwl_bt_params iwl6000_bt_params = {
482 .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \ 482 .eeprom_ver = EEPROM_6005_EEPROM_VERSION, \
483 .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \ 483 .eeprom_calib_ver = EEPROM_6005_TX_POWER_VERSION, \
484 .ops = &iwl6000_ops, \ 484 .ops = &iwl6000_ops, \
485 .mod_params = &iwlagn_mod_params, \
486 .base_params = &iwl6000_g2_base_params, \ 485 .base_params = &iwl6000_g2_base_params, \
487 .need_dc_calib = true, \ 486 .need_dc_calib = true, \
488 .need_temp_offset_calib = true, \ 487 .need_temp_offset_calib = true, \
@@ -511,7 +510,6 @@ struct iwl_cfg iwl6005_2bg_cfg = {
511 .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \ 510 .eeprom_ver = EEPROM_6030_EEPROM_VERSION, \
512 .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \ 511 .eeprom_calib_ver = EEPROM_6030_TX_POWER_VERSION, \
513 .ops = &iwl6030_ops, \ 512 .ops = &iwl6030_ops, \
514 .mod_params = &iwlagn_mod_params, \
515 .base_params = &iwl6000_g2_base_params, \ 513 .base_params = &iwl6000_g2_base_params, \
516 .bt_params = &iwl6000_bt_params, \ 514 .bt_params = &iwl6000_bt_params, \
517 .need_dc_calib = true, \ 515 .need_dc_calib = true, \
@@ -593,7 +591,6 @@ struct iwl_cfg iwl130_bg_cfg = {
593 .eeprom_ver = EEPROM_6000_EEPROM_VERSION, \ 591 .eeprom_ver = EEPROM_6000_EEPROM_VERSION, \
594 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, \ 592 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, \
595 .ops = &iwl6000_ops, \ 593 .ops = &iwl6000_ops, \
596 .mod_params = &iwlagn_mod_params, \
597 .base_params = &iwl6000_base_params, \ 594 .base_params = &iwl6000_base_params, \
598 .pa_type = IWL_PA_INTERNAL, \ 595 .pa_type = IWL_PA_INTERNAL, \
599 .led_mode = IWL_LED_BLINK 596 .led_mode = IWL_LED_BLINK
@@ -623,7 +620,6 @@ struct iwl_cfg iwl6000i_2bg_cfg = {
623 .ops = &iwl6050_ops, \ 620 .ops = &iwl6050_ops, \
624 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \ 621 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \
625 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \ 622 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \
626 .mod_params = &iwlagn_mod_params, \
627 .base_params = &iwl6050_base_params, \ 623 .base_params = &iwl6050_base_params, \
628 .need_dc_calib = true, \ 624 .need_dc_calib = true, \
629 .led_mode = IWL_LED_BLINK, \ 625 .led_mode = IWL_LED_BLINK, \
@@ -648,7 +644,6 @@ struct iwl_cfg iwl6150_bgn_cfg = {
648 .eeprom_ver = EEPROM_6150_EEPROM_VERSION, 644 .eeprom_ver = EEPROM_6150_EEPROM_VERSION,
649 .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION, 645 .eeprom_calib_ver = EEPROM_6150_TX_POWER_VERSION,
650 .ops = &iwl6150_ops, 646 .ops = &iwl6150_ops,
651 .mod_params = &iwlagn_mod_params,
652 .base_params = &iwl6050_base_params, 647 .base_params = &iwl6050_base_params,
653 .ht_params = &iwl6000_ht_params, 648 .ht_params = &iwl6000_ht_params,
654 .need_dc_calib = true, 649 .need_dc_calib = true,
@@ -664,7 +659,6 @@ struct iwl_cfg iwl6000_3agn_cfg = {
664 .eeprom_ver = EEPROM_6000_EEPROM_VERSION, 659 .eeprom_ver = EEPROM_6000_EEPROM_VERSION,
665 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, 660 .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION,
666 .ops = &iwl6000_ops, 661 .ops = &iwl6000_ops,
667 .mod_params = &iwlagn_mod_params,
668 .base_params = &iwl6000_base_params, 662 .base_params = &iwl6000_base_params,
669 .ht_params = &iwl6000_ht_params, 663 .ht_params = &iwl6000_ht_params,
670 .need_dc_calib = true, 664 .need_dc_calib = true,
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index 7fe9e0f17b1e..8e79653aed9a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -665,7 +665,7 @@ int iwlagn_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq)
665 665
666 rb_timeout = RX_RB_TIMEOUT; 666 rb_timeout = RX_RB_TIMEOUT;
667 667
668 if (priv->cfg->mod_params->amsdu_size_8K) 668 if (iwlagn_mod_params.amsdu_size_8K)
669 rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K; 669 rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K;
670 else 670 else
671 rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K; 671 rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_4K;
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
index 178b2b5a53b4..02387430f7fe 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c
@@ -372,7 +372,7 @@ int iwlagn_commit_rxon(struct iwl_priv *priv, struct iwl_rxon_context *ctx)
372 return ret; 372 return ret;
373 } 373 }
374 374
375 iwl_set_rxon_hwcrypto(priv, ctx, !priv->cfg->mod_params->sw_crypto); 375 iwl_set_rxon_hwcrypto(priv, ctx, !iwlagn_mod_params.sw_crypto);
376 376
377 IWL_DEBUG_INFO(priv, 377 IWL_DEBUG_INFO(priv,
378 "Going to commit RXON\n" 378 "Going to commit RXON\n"
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 8232245b7b6f..003d5243542b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2834,7 +2834,7 @@ static int iwlagn_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
2834 2834
2835 IWL_DEBUG_MAC80211(priv, "enter\n"); 2835 IWL_DEBUG_MAC80211(priv, "enter\n");
2836 2836
2837 if (priv->cfg->mod_params->sw_crypto) { 2837 if (iwlagn_mod_params.sw_crypto) {
2838 IWL_DEBUG_MAC80211(priv, "leave - hwcrypto disabled\n"); 2838 IWL_DEBUG_MAC80211(priv, "leave - hwcrypto disabled\n");
2839 return -EOPNOTSUPP; 2839 return -EOPNOTSUPP;
2840 } 2840 }
@@ -3522,14 +3522,14 @@ static int iwl_set_hw_params(struct iwl_priv *priv)
3522{ 3522{
3523 priv->hw_params.max_rxq_size = RX_QUEUE_SIZE; 3523 priv->hw_params.max_rxq_size = RX_QUEUE_SIZE;
3524 priv->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG; 3524 priv->hw_params.max_rxq_log = RX_QUEUE_SIZE_LOG;
3525 if (priv->cfg->mod_params->amsdu_size_8K) 3525 if (iwlagn_mod_params.amsdu_size_8K)
3526 priv->hw_params.rx_page_order = get_order(IWL_RX_BUF_SIZE_8K); 3526 priv->hw_params.rx_page_order = get_order(IWL_RX_BUF_SIZE_8K);
3527 else 3527 else
3528 priv->hw_params.rx_page_order = get_order(IWL_RX_BUF_SIZE_4K); 3528 priv->hw_params.rx_page_order = get_order(IWL_RX_BUF_SIZE_4K);
3529 3529
3530 priv->hw_params.max_beacon_itrvl = IWL_MAX_UCODE_BEACON_INTERVAL; 3530 priv->hw_params.max_beacon_itrvl = IWL_MAX_UCODE_BEACON_INTERVAL;
3531 3531
3532 if (priv->cfg->mod_params->disable_11n) 3532 if (iwlagn_mod_params.disable_11n)
3533 priv->cfg->sku &= ~IWL_SKU_N; 3533 priv->cfg->sku &= ~IWL_SKU_N;
3534 3534
3535 /* Device-specific setup */ 3535 /* Device-specific setup */
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 66da1dec982c..1b2a7d9141c6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -41,6 +41,7 @@
41#include "iwl-power.h" 41#include "iwl-power.h"
42#include "iwl-sta.h" 42#include "iwl-sta.h"
43#include "iwl-helpers.h" 43#include "iwl-helpers.h"
44#include "iwl-agn.h"
44 45
45 46
46/* 47/*
@@ -94,7 +95,7 @@ static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv,
94 max_bit_rate = MAX_BIT_RATE_40_MHZ; 95 max_bit_rate = MAX_BIT_RATE_40_MHZ;
95 } 96 }
96 97
97 if (priv->cfg->mod_params->amsdu_size_8K) 98 if (iwlagn_mod_params.amsdu_size_8K)
98 ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU; 99 ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU;
99 100
100 ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF; 101 ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF;
@@ -926,7 +927,7 @@ void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand)
926 } 927 }
927 928
928 if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) { 929 if (!test_bit(STATUS_EXIT_PENDING, &priv->status)) {
929 if (priv->cfg->mod_params->restart_fw) { 930 if (iwlagn_mod_params.restart_fw) {
930 IWL_DEBUG(priv, IWL_DL_FW_ERRORS, 931 IWL_DEBUG(priv, IWL_DL_FW_ERRORS,
931 "Restarting adapter due to uCode error.\n"); 932 "Restarting adapter due to uCode error.\n");
932 queue_work(priv->workqueue, &priv->restart); 933 queue_work(priv->workqueue, &priv->restart);
@@ -1747,7 +1748,7 @@ int iwl_force_reset(struct iwl_priv *priv, int mode, bool external)
1747 * detect failure), then fw_restart module parameter 1748 * detect failure), then fw_restart module parameter
1748 * need to be check before performing firmware reload 1749 * need to be check before performing firmware reload
1749 */ 1750 */
1750 if (!external && !priv->cfg->mod_params->restart_fw) { 1751 if (!external && !iwlagn_mod_params.restart_fw) {
1751 IWL_DEBUG_INFO(priv, "Cancel firmware reload based on " 1752 IWL_DEBUG_INFO(priv, "Cancel firmware reload based on "
1752 "module parameter setting\n"); 1753 "module parameter setting\n");
1753 break; 1754 break;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h
index 4cdb85d971ce..ca6bd07f4765 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -325,8 +325,6 @@ struct iwl_cfg {
325 u16 eeprom_ver; 325 u16 eeprom_ver;
326 u16 eeprom_calib_ver; 326 u16 eeprom_calib_ver;
327 const struct iwl_ops *ops; 327 const struct iwl_ops *ops;
328 /* module based parameters which can be set from modprobe cmd */
329 const struct iwl_mod_params *mod_params;
330 /* params not likely to change within a device family */ 328 /* params not likely to change within a device family */
331 struct iwl_base_params *base_params; 329 struct iwl_base_params *base_params;
332 /* params likely to change within a device family */ 330 /* params likely to change within a device family */
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index aca9a1d40080..0053e9ea9021 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -433,7 +433,6 @@ static void iwl_recover_from_statistics(struct iwl_priv *priv,
433 struct statistics_tx *tx, 433 struct statistics_tx *tx,
434 unsigned long stamp) 434 unsigned long stamp)
435{ 435{
436 const struct iwl_mod_params *mod_params = priv->cfg->mod_params;
437 unsigned int msecs; 436 unsigned int msecs;
438 437
439 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 438 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
@@ -449,13 +448,13 @@ static void iwl_recover_from_statistics(struct iwl_priv *priv,
449 if (msecs < 99) 448 if (msecs < 99)
450 return; 449 return;
451 450
452 if (mod_params->ack_check && !iwl_good_ack_health(priv, tx)) { 451 if (iwlagn_mod_params.ack_check && !iwl_good_ack_health(priv, tx)) {
453 IWL_ERR(priv, "low ack count detected, restart firmware\n"); 452 IWL_ERR(priv, "low ack count detected, restart firmware\n");
454 if (!iwl_force_reset(priv, IWL_FW_RESET, false)) 453 if (!iwl_force_reset(priv, IWL_FW_RESET, false))
455 return; 454 return;
456 } 455 }
457 456
458 if (mod_params->plcp_check && 457 if (iwlagn_mod_params.plcp_check &&
459 !iwl_good_plcp_health(priv, cur_ofdm, cur_ofdm_ht, msecs)) 458 !iwl_good_plcp_health(priv, cur_ofdm, cur_ofdm_ht, msecs))
460 iwl_force_reset(priv, IWL_RF_RESET, false); 459 iwl_force_reset(priv, IWL_RF_RESET, false);
461} 460}
@@ -846,7 +845,7 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv,
846 } 845 }
847 846
848 /* In case of HW accelerated crypto and bad decryption, drop */ 847 /* In case of HW accelerated crypto and bad decryption, drop */
849 if (!priv->cfg->mod_params->sw_crypto && 848 if (!iwlagn_mod_params.sw_crypto &&
850 iwl_set_decrypted_flag(priv, hdr, ampdu_status, stats)) 849 iwl_set_decrypted_flag(priv, hdr, ampdu_status, stats))
851 return; 850 return;
852 851