aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2012-02-03 11:31:59 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-06 14:56:12 -0500
commit89ef1ed2d241d3dfe884055d8446a5dd94919e54 (patch)
tree97eded56defec559df8d1164d0a622a36bfe0338
parentc39ae9fd505ae314a7a4a159a41e3e022cfa317f (diff)
iwlegacy: merge il_base_params into il_cfg
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlegacy/3945.c30
-rw-r--r--drivers/net/wireless/iwlegacy/4965-calib.c14
-rw-r--r--drivers/net/wireless/iwlegacy/4965-mac.c8
-rw-r--r--drivers/net/wireless/iwlegacy/4965.c37
-rw-r--r--drivers/net/wireless/iwlegacy/common.c28
-rw-r--r--drivers/net/wireless/iwlegacy/common.h31
-rw-r--r--drivers/net/wireless/iwlegacy/debug.c16
7 files changed, 83 insertions, 81 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 918cbefd657a..7c21a57d1bb5 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -2398,7 +2398,7 @@ il3945_hw_set_hw_params(struct il_priv *il)
2398 il->hw_params.bcast_id = IL3945_BROADCAST_ID; 2398 il->hw_params.bcast_id = IL3945_BROADCAST_ID;
2399 2399
2400 /* Assign number of Usable TX queues */ 2400 /* Assign number of Usable TX queues */
2401 il->hw_params.max_txq_num = il->cfg->base_params->num_of_queues; 2401 il->hw_params.max_txq_num = il->cfg->num_of_queues;
2402 2402
2403 il->hw_params.tfd_size = sizeof(struct il3945_tfd); 2403 il->hw_params.tfd_size = sizeof(struct il3945_tfd);
2404 il->hw_params.rx_page_order = get_order(IL_RX_BUF_SIZE_3K); 2404 il->hw_params.rx_page_order = get_order(IL_RX_BUF_SIZE_3K);
@@ -2693,16 +2693,6 @@ const struct il_ops il3945_ops = {
2693 .legacy = &il3945_legacy_ops, 2693 .legacy = &il3945_legacy_ops,
2694}; 2694};
2695 2695
2696static struct il_base_params il3945_base_params = {
2697 .eeprom_size = IL3945_EEPROM_IMG_SIZE,
2698 .num_of_queues = IL39_NUM_QUEUES,
2699 .pll_cfg_val = CSR39_ANA_PLL_CFG_VAL,
2700 .set_l0s = false,
2701 .use_bsm = true,
2702 .led_compensation = 64,
2703 .wd_timeout = IL_DEF_WD_TIMEOUT,
2704};
2705
2706static struct il_cfg il3945_bg_cfg = { 2696static struct il_cfg il3945_bg_cfg = {
2707 .name = "3945BG", 2697 .name = "3945BG",
2708 .fw_name_pre = IL3945_FW_PRE, 2698 .fw_name_pre = IL3945_FW_PRE,
@@ -2711,8 +2701,15 @@ static struct il_cfg il3945_bg_cfg = {
2711 .sku = IL_SKU_G, 2701 .sku = IL_SKU_G,
2712 .eeprom_ver = EEPROM_3945_EEPROM_VERSION, 2702 .eeprom_ver = EEPROM_3945_EEPROM_VERSION,
2713 .mod_params = &il3945_mod_params, 2703 .mod_params = &il3945_mod_params,
2714 .base_params = &il3945_base_params,
2715 .led_mode = IL_LED_BLINK, 2704 .led_mode = IL_LED_BLINK,
2705
2706 .eeprom_size = IL3945_EEPROM_IMG_SIZE,
2707 .num_of_queues = IL39_NUM_QUEUES,
2708 .pll_cfg_val = CSR39_ANA_PLL_CFG_VAL,
2709 .set_l0s = false,
2710 .use_bsm = true,
2711 .led_compensation = 64,
2712 .wd_timeout = IL_DEF_WD_TIMEOUT
2716}; 2713};
2717 2714
2718static struct il_cfg il3945_abg_cfg = { 2715static struct il_cfg il3945_abg_cfg = {
@@ -2723,8 +2720,15 @@ static struct il_cfg il3945_abg_cfg = {
2723 .sku = IL_SKU_A | IL_SKU_G, 2720 .sku = IL_SKU_A | IL_SKU_G,
2724 .eeprom_ver = EEPROM_3945_EEPROM_VERSION, 2721 .eeprom_ver = EEPROM_3945_EEPROM_VERSION,
2725 .mod_params = &il3945_mod_params, 2722 .mod_params = &il3945_mod_params,
2726 .base_params = &il3945_base_params,
2727 .led_mode = IL_LED_BLINK, 2723 .led_mode = IL_LED_BLINK,
2724
2725 .eeprom_size = IL3945_EEPROM_IMG_SIZE,
2726 .num_of_queues = IL39_NUM_QUEUES,
2727 .pll_cfg_val = CSR39_ANA_PLL_CFG_VAL,
2728 .set_l0s = false,
2729 .use_bsm = true,
2730 .led_compensation = 64,
2731 .wd_timeout = IL_DEF_WD_TIMEOUT
2728}; 2732};
2729 2733
2730DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = { 2734DEFINE_PCI_DEVICE_TABLE(il3945_hw_card_ids) = {
diff --git a/drivers/net/wireless/iwlegacy/4965-calib.c b/drivers/net/wireless/iwlegacy/4965-calib.c
index bfb361dbba50..fe9171506a91 100644
--- a/drivers/net/wireless/iwlegacy/4965-calib.c
+++ b/drivers/net/wireless/iwlegacy/4965-calib.c
@@ -627,13 +627,13 @@ il4965_find_disconn_antenna(struct il_priv *il, u32 * average_sig,
627 627
628 average_sig[0] = 628 average_sig[0] =
629 data->chain_signal_a / 629 data->chain_signal_a /
630 il->cfg->base_params->chain_noise_num_beacons; 630 il->cfg->chain_noise_num_beacons;
631 average_sig[1] = 631 average_sig[1] =
632 data->chain_signal_b / 632 data->chain_signal_b /
633 il->cfg->base_params->chain_noise_num_beacons; 633 il->cfg->chain_noise_num_beacons;
634 average_sig[2] = 634 average_sig[2] =
635 data->chain_signal_c / 635 data->chain_signal_c /
636 il->cfg->base_params->chain_noise_num_beacons; 636 il->cfg->chain_noise_num_beacons;
637 637
638 if (average_sig[0] >= average_sig[1]) { 638 if (average_sig[0] >= average_sig[1]) {
639 max_average_sig = average_sig[0]; 639 max_average_sig = average_sig[0];
@@ -886,7 +886,7 @@ il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
886 /* If this is the "chain_noise_num_beacons", determine: 886 /* If this is the "chain_noise_num_beacons", determine:
887 * 1) Disconnected antennas (using signal strengths) 887 * 1) Disconnected antennas (using signal strengths)
888 * 2) Differential gain (using silence noise) to balance receivers */ 888 * 2) Differential gain (using silence noise) to balance receivers */
889 if (data->beacon_count != il->cfg->base_params->chain_noise_num_beacons) 889 if (data->beacon_count != il->cfg->chain_noise_num_beacons)
890 return; 890 return;
891 891
892 /* Analyze signal for disconnected antenna */ 892 /* Analyze signal for disconnected antenna */
@@ -894,11 +894,11 @@ il4965_chain_noise_calibration(struct il_priv *il, void *stat_resp)
894 894
895 /* Analyze noise for rx balance */ 895 /* Analyze noise for rx balance */
896 average_noise[0] = 896 average_noise[0] =
897 data->chain_noise_a / il->cfg->base_params->chain_noise_num_beacons; 897 data->chain_noise_a / il->cfg->chain_noise_num_beacons;
898 average_noise[1] = 898 average_noise[1] =
899 data->chain_noise_b / il->cfg->base_params->chain_noise_num_beacons; 899 data->chain_noise_b / il->cfg->chain_noise_num_beacons;
900 average_noise[2] = 900 average_noise[2] =
901 data->chain_noise_c / il->cfg->base_params->chain_noise_num_beacons; 901 data->chain_noise_c / il->cfg->chain_noise_num_beacons;
902 902
903 for (i = 0; i < NUM_RX_CHAINS; i++) { 903 for (i = 0; i < NUM_RX_CHAINS; i++) {
904 if (!data->disconn_array[i] && 904 if (!data->disconn_array[i] &&
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 2bf743fc7829..49dd1e0e9a55 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -2150,11 +2150,11 @@ il4965_txq_agg_enable(struct il_priv *il, int txq_id, int tx_fifo, int sta_id,
2150 2150
2151 if ((IL49_FIRST_AMPDU_QUEUE > txq_id) || 2151 if ((IL49_FIRST_AMPDU_QUEUE > txq_id) ||
2152 (IL49_FIRST_AMPDU_QUEUE + 2152 (IL49_FIRST_AMPDU_QUEUE +
2153 il->cfg->base_params->num_of_ampdu_queues <= txq_id)) { 2153 il->cfg->num_of_ampdu_queues <= txq_id)) {
2154 IL_WARN("queue number out of range: %d, must be %d to %d\n", 2154 IL_WARN("queue number out of range: %d, must be %d to %d\n",
2155 txq_id, IL49_FIRST_AMPDU_QUEUE, 2155 txq_id, IL49_FIRST_AMPDU_QUEUE,
2156 IL49_FIRST_AMPDU_QUEUE + 2156 IL49_FIRST_AMPDU_QUEUE +
2157 il->cfg->base_params->num_of_ampdu_queues - 1); 2157 il->cfg->num_of_ampdu_queues - 1);
2158 return -EINVAL; 2158 return -EINVAL;
2159 } 2159 }
2160 2160
@@ -2278,11 +2278,11 @@ il4965_txq_agg_disable(struct il_priv *il, u16 txq_id, u16 ssn_idx, u8 tx_fifo)
2278{ 2278{
2279 if ((IL49_FIRST_AMPDU_QUEUE > txq_id) || 2279 if ((IL49_FIRST_AMPDU_QUEUE > txq_id) ||
2280 (IL49_FIRST_AMPDU_QUEUE + 2280 (IL49_FIRST_AMPDU_QUEUE +
2281 il->cfg->base_params->num_of_ampdu_queues <= txq_id)) { 2281 il->cfg->num_of_ampdu_queues <= txq_id)) {
2282 IL_WARN("queue number out of range: %d, must be %d to %d\n", 2282 IL_WARN("queue number out of range: %d, must be %d to %d\n",
2283 txq_id, IL49_FIRST_AMPDU_QUEUE, 2283 txq_id, IL49_FIRST_AMPDU_QUEUE,
2284 IL49_FIRST_AMPDU_QUEUE + 2284 IL49_FIRST_AMPDU_QUEUE +
2285 il->cfg->base_params->num_of_ampdu_queues - 1); 2285 il->cfg->num_of_ampdu_queues - 1);
2286 return -EINVAL; 2286 return -EINVAL;
2287 } 2287 }
2288 2288
diff --git a/drivers/net/wireless/iwlegacy/4965.c b/drivers/net/wireless/iwlegacy/4965.c
index 27feb533d025..cf1d0164a9a0 100644
--- a/drivers/net/wireless/iwlegacy/4965.c
+++ b/drivers/net/wireless/iwlegacy/4965.c
@@ -614,13 +614,13 @@ il4965_hw_set_hw_params(struct il_priv *il)
614{ 614{
615 if (il->cfg->mod_params->num_of_queues >= IL_MIN_NUM_QUEUES && 615 if (il->cfg->mod_params->num_of_queues >= IL_MIN_NUM_QUEUES &&
616 il->cfg->mod_params->num_of_queues <= IL49_NUM_QUEUES) 616 il->cfg->mod_params->num_of_queues <= IL49_NUM_QUEUES)
617 il->cfg->base_params->num_of_queues = 617 il->cfg->num_of_queues =
618 il->cfg->mod_params->num_of_queues; 618 il->cfg->mod_params->num_of_queues;
619 619
620 il->hw_params.max_txq_num = il->cfg->base_params->num_of_queues; 620 il->hw_params.max_txq_num = il->cfg->num_of_queues;
621 il->hw_params.dma_chnl_num = FH49_TCSR_CHNL_NUM; 621 il->hw_params.dma_chnl_num = FH49_TCSR_CHNL_NUM;
622 il->hw_params.scd_bc_tbls_size = 622 il->hw_params.scd_bc_tbls_size =
623 il->cfg->base_params->num_of_queues * 623 il->cfg->num_of_queues *
624 sizeof(struct il4965_scd_bc_tbl); 624 sizeof(struct il4965_scd_bc_tbl);
625 il->hw_params.tfd_size = sizeof(struct il_tfd); 625 il->hw_params.tfd_size = sizeof(struct il_tfd);
626 il->hw_params.max_stations = IL4965_STATION_COUNT; 626 il->hw_params.max_stations = IL4965_STATION_COUNT;
@@ -2331,22 +2331,6 @@ const struct il_ops il4965_ops = {
2331 .legacy = &il4965_legacy_ops, 2331 .legacy = &il4965_legacy_ops,
2332}; 2332};
2333 2333
2334static struct il_base_params il4965_base_params = {
2335 .eeprom_size = IL4965_EEPROM_IMG_SIZE,
2336 .num_of_queues = IL49_NUM_QUEUES,
2337 .num_of_ampdu_queues = IL49_NUM_AMPDU_QUEUES,
2338 .pll_cfg_val = 0,
2339 .set_l0s = true,
2340 .use_bsm = true,
2341 .led_compensation = 61,
2342 .chain_noise_num_beacons = IL4965_CAL_NUM_BEACONS,
2343 .wd_timeout = IL_DEF_WD_TIMEOUT,
2344 .temperature_kelvin = true,
2345 .ucode_tracing = true,
2346 .sensitivity_calib_by_driver = true,
2347 .chain_noise_calib_by_driver = true,
2348};
2349
2350struct il_cfg il4965_cfg = { 2334struct il_cfg il4965_cfg = {
2351 .name = "Intel(R) Wireless WiFi Link 4965AGN", 2335 .name = "Intel(R) Wireless WiFi Link 4965AGN",
2352 .fw_name_pre = IL4965_FW_PRE, 2336 .fw_name_pre = IL4965_FW_PRE,
@@ -2358,13 +2342,26 @@ struct il_cfg il4965_cfg = {
2358 .eeprom_ver = EEPROM_4965_EEPROM_VERSION, 2342 .eeprom_ver = EEPROM_4965_EEPROM_VERSION,
2359 .eeprom_calib_ver = EEPROM_4965_TX_POWER_VERSION, 2343 .eeprom_calib_ver = EEPROM_4965_TX_POWER_VERSION,
2360 .mod_params = &il4965_mod_params, 2344 .mod_params = &il4965_mod_params,
2361 .base_params = &il4965_base_params,
2362 .led_mode = IL_LED_BLINK, 2345 .led_mode = IL_LED_BLINK,
2363 /* 2346 /*
2364 * Force use of chains B and C for scan RX on 5 GHz band 2347 * Force use of chains B and C for scan RX on 5 GHz band
2365 * because the device has off-channel reception on chain A. 2348 * because the device has off-channel reception on chain A.
2366 */ 2349 */
2367 .scan_rx_antennas[IEEE80211_BAND_5GHZ] = ANT_BC, 2350 .scan_rx_antennas[IEEE80211_BAND_5GHZ] = ANT_BC,
2351
2352 .eeprom_size = IL4965_EEPROM_IMG_SIZE,
2353 .num_of_queues = IL49_NUM_QUEUES,
2354 .num_of_ampdu_queues = IL49_NUM_AMPDU_QUEUES,
2355 .pll_cfg_val = 0,
2356 .set_l0s = true,
2357 .use_bsm = true,
2358 .led_compensation = 61,
2359 .chain_noise_num_beacons = IL4965_CAL_NUM_BEACONS,
2360 .wd_timeout = IL_DEF_WD_TIMEOUT,
2361 .temperature_kelvin = true,
2362 .ucode_tracing = true,
2363 .sensitivity_calib_by_driver = true,
2364 .chain_noise_calib_by_driver = true,
2368}; 2365};
2369 2366
2370/* Module firmware */ 2367/* Module firmware */
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 3bd183336563..1173521f21fb 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -512,13 +512,13 @@ il_led_cmd(struct il_priv *il, unsigned long on, unsigned long off)
512 } 512 }
513 513
514 D_LED("Led blink time compensation=%u\n", 514 D_LED("Led blink time compensation=%u\n",
515 il->cfg->base_params->led_compensation); 515 il->cfg->led_compensation);
516 led_cmd.on = 516 led_cmd.on =
517 il_blink_compensation(il, on, 517 il_blink_compensation(il, on,
518 il->cfg->base_params->led_compensation); 518 il->cfg->led_compensation);
519 led_cmd.off = 519 led_cmd.off =
520 il_blink_compensation(il, off, 520 il_blink_compensation(il, off,
521 il->cfg->base_params->led_compensation); 521 il->cfg->led_compensation);
522 522
523 ret = il->ops->led->cmd(il, &led_cmd); 523 ret = il->ops->led->cmd(il, &led_cmd);
524 if (!ret) { 524 if (!ret) {
@@ -691,7 +691,7 @@ il_eeprom_verify_signature(struct il_priv *il)
691const u8 * 691const u8 *
692il_eeprom_query_addr(const struct il_priv *il, size_t offset) 692il_eeprom_query_addr(const struct il_priv *il, size_t offset)
693{ 693{
694 BUG_ON(offset >= il->cfg->base_params->eeprom_size); 694 BUG_ON(offset >= il->cfg->eeprom_size);
695 return &il->eeprom[offset]; 695 return &il->eeprom[offset];
696} 696}
697EXPORT_SYMBOL(il_eeprom_query_addr); 697EXPORT_SYMBOL(il_eeprom_query_addr);
@@ -722,7 +722,7 @@ il_eeprom_init(struct il_priv *il)
722 u16 addr; 722 u16 addr;
723 723
724 /* allocate eeprom */ 724 /* allocate eeprom */
725 sz = il->cfg->base_params->eeprom_size; 725 sz = il->cfg->eeprom_size;
726 D_EEPROM("NVM size = %d\n", sz); 726 D_EEPROM("NVM size = %d\n", sz);
727 il->eeprom = kzalloc(sz, GFP_KERNEL); 727 il->eeprom = kzalloc(sz, GFP_KERNEL);
728 if (!il->eeprom) { 728 if (!il->eeprom) {
@@ -4218,7 +4218,7 @@ il_apm_init(struct il_priv *il)
4218 * If not (unlikely), enable L0S, so there is at least some 4218 * If not (unlikely), enable L0S, so there is at least some
4219 * power savings, even without L1. 4219 * power savings, even without L1.
4220 */ 4220 */
4221 if (il->cfg->base_params->set_l0s) { 4221 if (il->cfg->set_l0s) {
4222 lctl = il_pcie_link_ctl(il); 4222 lctl = il_pcie_link_ctl(il);
4223 if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == 4223 if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) ==
4224 PCI_CFG_LINK_CTRL_VAL_L1_EN) { 4224 PCI_CFG_LINK_CTRL_VAL_L1_EN) {
@@ -4235,9 +4235,9 @@ il_apm_init(struct il_priv *il)
4235 } 4235 }
4236 4236
4237 /* Configure analog phase-lock-loop before activating to D0A */ 4237 /* Configure analog phase-lock-loop before activating to D0A */
4238 if (il->cfg->base_params->pll_cfg_val) 4238 if (il->cfg->pll_cfg_val)
4239 il_set_bit(il, CSR_ANA_PLL_CFG, 4239 il_set_bit(il, CSR_ANA_PLL_CFG,
4240 il->cfg->base_params->pll_cfg_val); 4240 il->cfg->pll_cfg_val);
4241 4241
4242 /* 4242 /*
4243 * Set "initialization complete" bit to move adapter from 4243 * Set "initialization complete" bit to move adapter from
@@ -4267,7 +4267,7 @@ il_apm_init(struct il_priv *il)
4267 * do not disable clocks. This preserves any hardware bits already 4267 * do not disable clocks. This preserves any hardware bits already
4268 * set by default in "CLK_CTRL_REG" after reset. 4268 * set by default in "CLK_CTRL_REG" after reset.
4269 */ 4269 */
4270 if (il->cfg->base_params->use_bsm) 4270 if (il->cfg->use_bsm)
4271 il_wr_prph(il, APMG_CLK_EN_REG, 4271 il_wr_prph(il, APMG_CLK_EN_REG,
4272 APMG_CLK_VAL_DMA_CLK_RQT | APMG_CLK_VAL_BSM_CLK_RQT); 4272 APMG_CLK_VAL_DMA_CLK_RQT | APMG_CLK_VAL_BSM_CLK_RQT);
4273 else 4273 else
@@ -4565,7 +4565,7 @@ il_alloc_txq_mem(struct il_priv *il)
4565 if (!il->txq) 4565 if (!il->txq)
4566 il->txq = 4566 il->txq =
4567 kzalloc(sizeof(struct il_tx_queue) * 4567 kzalloc(sizeof(struct il_tx_queue) *
4568 il->cfg->base_params->num_of_queues, GFP_KERNEL); 4568 il->cfg->num_of_queues, GFP_KERNEL);
4569 if (!il->txq) { 4569 if (!il->txq) {
4570 IL_ERR("Not enough memory for txq\n"); 4570 IL_ERR("Not enough memory for txq\n");
4571 return -ENOMEM; 4571 return -ENOMEM;
@@ -4942,11 +4942,11 @@ il_check_stuck_queue(struct il_priv *il, int cnt)
4942 4942
4943 timeout = 4943 timeout =
4944 txq->time_stamp + 4944 txq->time_stamp +
4945 msecs_to_jiffies(il->cfg->base_params->wd_timeout); 4945 msecs_to_jiffies(il->cfg->wd_timeout);
4946 4946
4947 if (time_after(jiffies, timeout)) { 4947 if (time_after(jiffies, timeout)) {
4948 IL_ERR("Queue %d stuck for %u ms.\n", q->id, 4948 IL_ERR("Queue %d stuck for %u ms.\n", q->id,
4949 il->cfg->base_params->wd_timeout); 4949 il->cfg->wd_timeout);
4950 ret = il_force_reset(il, false); 4950 ret = il_force_reset(il, false);
4951 return (ret == -EAGAIN) ? 0 : 1; 4951 return (ret == -EAGAIN) ? 0 : 1;
4952 } 4952 }
@@ -4974,7 +4974,7 @@ il_bg_watchdog(unsigned long data)
4974 if (test_bit(S_EXIT_PENDING, &il->status)) 4974 if (test_bit(S_EXIT_PENDING, &il->status))
4975 return; 4975 return;
4976 4976
4977 timeout = il->cfg->base_params->wd_timeout; 4977 timeout = il->cfg->wd_timeout;
4978 if (timeout == 0) 4978 if (timeout == 0)
4979 return; 4979 return;
4980 4980
@@ -5001,7 +5001,7 @@ EXPORT_SYMBOL(il_bg_watchdog);
5001void 5001void
5002il_setup_watchdog(struct il_priv *il) 5002il_setup_watchdog(struct il_priv *il)
5003{ 5003{
5004 unsigned int timeout = il->cfg->base_params->wd_timeout; 5004 unsigned int timeout = il->cfg->wd_timeout;
5005 5005
5006 if (timeout) 5006 if (timeout)
5007 mod_timer(&il->watchdog, 5007 mod_timer(&il->watchdog,
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index 2af861062de0..21ed70a7f68c 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1695,21 +1695,6 @@ struct il_mod_params {
1695 * chain noise calibration operation 1695 * chain noise calibration operation
1696 */ 1696 */
1697struct il_base_params { 1697struct il_base_params {
1698 int eeprom_size;
1699 int num_of_queues; /* def: HW dependent */
1700 int num_of_ampdu_queues; /* def: HW dependent */
1701 /* for il_apm_init() */
1702 u32 pll_cfg_val;
1703 bool set_l0s;
1704 bool use_bsm;
1705
1706 u16 led_compensation;
1707 int chain_noise_num_beacons;
1708 unsigned int wd_timeout;
1709 bool temperature_kelvin;
1710 const bool ucode_tracing;
1711 const bool sensitivity_calib_by_driver;
1712 const bool chain_noise_calib_by_driver;
1713}; 1698};
1714 1699
1715#define IL_LED_SOLID 11 1700#define IL_LED_SOLID 11
@@ -1784,6 +1769,22 @@ struct il_cfg {
1784 /* params likely to change within a device family */ 1769 /* params likely to change within a device family */
1785 u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; 1770 u8 scan_rx_antennas[IEEE80211_NUM_BANDS];
1786 enum il_led_mode led_mode; 1771 enum il_led_mode led_mode;
1772
1773 int eeprom_size;
1774 int num_of_queues; /* def: HW dependent */
1775 int num_of_ampdu_queues; /* def: HW dependent */
1776 /* for il_apm_init() */
1777 u32 pll_cfg_val;
1778 bool set_l0s;
1779 bool use_bsm;
1780
1781 u16 led_compensation;
1782 int chain_noise_num_beacons;
1783 unsigned int wd_timeout;
1784 bool temperature_kelvin;
1785 const bool ucode_tracing;
1786 const bool sensitivity_calib_by_driver;
1787 const bool chain_noise_calib_by_driver;
1787}; 1788};
1788 1789
1789/*************************** 1790/***************************
diff --git a/drivers/net/wireless/iwlegacy/debug.c b/drivers/net/wireless/iwlegacy/debug.c
index 4fb769caef5a..bb7c95607a69 100644
--- a/drivers/net/wireless/iwlegacy/debug.c
+++ b/drivers/net/wireless/iwlegacy/debug.c
@@ -361,7 +361,7 @@ il_dbgfs_nvm_read(struct file *file, char __user *user_buf, size_t count,
361 const u8 *ptr; 361 const u8 *ptr;
362 char *buf; 362 char *buf;
363 u16 eeprom_ver; 363 u16 eeprom_ver;
364 size_t eeprom_len = il->cfg->base_params->eeprom_size; 364 size_t eeprom_len = il->cfg->eeprom_size;
365 buf_size = 4 * eeprom_len + 256; 365 buf_size = 4 * eeprom_len + 256;
366 366
367 if (eeprom_len % 16) { 367 if (eeprom_len % 16) {
@@ -727,7 +727,7 @@ il_dbgfs_traffic_log_read(struct file *file, char __user *user_buf,
727 char *buf; 727 char *buf;
728 int bufsz = 728 int bufsz =
729 ((IL_TRAFFIC_ENTRIES * IL_TRAFFIC_ENTRY_SIZE * 64) * 2) + 729 ((IL_TRAFFIC_ENTRIES * IL_TRAFFIC_ENTRY_SIZE * 64) * 2) +
730 (il->cfg->base_params->num_of_queues * 32 * 8) + 400; 730 (il->cfg->num_of_queues * 32 * 8) + 400;
731 const u8 *ptr; 731 const u8 *ptr;
732 ssize_t ret; 732 ssize_t ret;
733 733
@@ -833,7 +833,7 @@ il_dbgfs_tx_queue_read(struct file *file, char __user *user_buf, size_t count,
833 int cnt; 833 int cnt;
834 int ret; 834 int ret;
835 const size_t bufsz = 835 const size_t bufsz =
836 sizeof(char) * 64 * il->cfg->base_params->num_of_queues; 836 sizeof(char) * 64 * il->cfg->num_of_queues;
837 837
838 if (!il->txq) { 838 if (!il->txq) {
839 IL_ERR("txq not ready\n"); 839 IL_ERR("txq not ready\n");
@@ -1293,7 +1293,7 @@ il_dbgfs_wd_timeout_write(struct file *file, const char __user *user_buf,
1293 if (timeout < 0 || timeout > IL_MAX_WD_TIMEOUT) 1293 if (timeout < 0 || timeout > IL_MAX_WD_TIMEOUT)
1294 timeout = IL_DEF_WD_TIMEOUT; 1294 timeout = IL_DEF_WD_TIMEOUT;
1295 1295
1296 il->cfg->base_params->wd_timeout = timeout; 1296 il->cfg->wd_timeout = timeout;
1297 il_setup_watchdog(il); 1297 il_setup_watchdog(il);
1298 return count; 1298 return count;
1299} 1299}
@@ -1367,17 +1367,17 @@ il_dbgfs_register(struct il_priv *il, const char *name)
1367 DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, S_IRUSR); 1367 DEBUGFS_ADD_FILE(ucode_tx_stats, dir_debug, S_IRUSR);
1368 DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, S_IRUSR); 1368 DEBUGFS_ADD_FILE(ucode_general_stats, dir_debug, S_IRUSR);
1369 1369
1370 if (il->cfg->base_params->sensitivity_calib_by_driver) 1370 if (il->cfg->sensitivity_calib_by_driver)
1371 DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR); 1371 DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR);
1372 if (il->cfg->base_params->chain_noise_calib_by_driver) 1372 if (il->cfg->chain_noise_calib_by_driver)
1373 DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR); 1373 DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR);
1374 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); 1374 DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR);
1375 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); 1375 DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR);
1376 DEBUGFS_ADD_FILE(wd_timeout, dir_debug, S_IWUSR); 1376 DEBUGFS_ADD_FILE(wd_timeout, dir_debug, S_IWUSR);
1377 if (il->cfg->base_params->sensitivity_calib_by_driver) 1377 if (il->cfg->sensitivity_calib_by_driver)
1378 DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf, 1378 DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf,
1379 &il->disable_sens_cal); 1379 &il->disable_sens_cal);
1380 if (il->cfg->base_params->chain_noise_calib_by_driver) 1380 if (il->cfg->chain_noise_calib_by_driver)
1381 DEBUGFS_ADD_BOOL(disable_chain_noise, dir_rf, 1381 DEBUGFS_ADD_BOOL(disable_chain_noise, dir_rf,
1382 &il->disable_chain_noise_cal); 1382 &il->disable_chain_noise_cal);
1383 DEBUGFS_ADD_BOOL(disable_tx_power, dir_rf, &il->disable_tx_power_cal); 1383 DEBUGFS_ADD_BOOL(disable_tx_power, dir_rf, &il->disable_tx_power_cal);