diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-10-08 15:39:28 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-10-08 15:39:28 -0400 |
commit | e9a68707d736f4f73d7e209885d7b4c5c452b1dc (patch) | |
tree | d9f76964c77c1059483b08436ed060b702b8e25d /drivers/net/wireless/iwlwifi | |
parent | dd53df265b1ee7a1fbbc76bb62c3bec2383bbd44 (diff) | |
parent | 15a6321d1c0f8db561932cd99e1b9897981da71f (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/wireless/ipw2x00/ipw2200.c
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
28 files changed, 776 insertions, 882 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 56ef4ed0db47..134f54541330 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -50,14 +50,20 @@ | |||
50 | 50 | ||
51 | /* Highest firmware API version supported */ | 51 | /* Highest firmware API version supported */ |
52 | #define IWL1000_UCODE_API_MAX 3 | 52 | #define IWL1000_UCODE_API_MAX 3 |
53 | #define IWL100_UCODE_API_MAX 5 | ||
53 | 54 | ||
54 | /* Lowest firmware API version supported */ | 55 | /* Lowest firmware API version supported */ |
55 | #define IWL1000_UCODE_API_MIN 1 | 56 | #define IWL1000_UCODE_API_MIN 1 |
57 | #define IWL100_UCODE_API_MIN 5 | ||
56 | 58 | ||
57 | #define IWL1000_FW_PRE "iwlwifi-1000-" | 59 | #define IWL1000_FW_PRE "iwlwifi-1000-" |
58 | #define _IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE #api ".ucode" | 60 | #define _IWL1000_MODULE_FIRMWARE(api) IWL1000_FW_PRE #api ".ucode" |
59 | #define IWL1000_MODULE_FIRMWARE(api) _IWL1000_MODULE_FIRMWARE(api) | 61 | #define IWL1000_MODULE_FIRMWARE(api) _IWL1000_MODULE_FIRMWARE(api) |
60 | 62 | ||
63 | #define IWL100_FW_PRE "iwlwifi-100-" | ||
64 | #define _IWL100_MODULE_FIRMWARE(api) IWL100_FW_PRE #api ".ucode" | ||
65 | #define IWL100_MODULE_FIRMWARE(api) _IWL100_MODULE_FIRMWARE(api) | ||
66 | |||
61 | 67 | ||
62 | /* | 68 | /* |
63 | * For 1000, use advance thermal throttling critical temperature threshold, | 69 | * For 1000, use advance thermal throttling critical temperature threshold, |
@@ -120,13 +126,13 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv) | |||
120 | { | 126 | { |
121 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && | 127 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && |
122 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) | 128 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) |
123 | priv->cfg->num_of_queues = | 129 | priv->cfg->base_params->num_of_queues = |
124 | priv->cfg->mod_params->num_of_queues; | 130 | priv->cfg->mod_params->num_of_queues; |
125 | 131 | ||
126 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; | 132 | priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; |
127 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; | 133 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
128 | priv->hw_params.scd_bc_tbls_size = | 134 | priv->hw_params.scd_bc_tbls_size = |
129 | priv->cfg->num_of_queues * | 135 | priv->cfg->base_params->num_of_queues * |
130 | sizeof(struct iwlagn_scd_bc_tbl); | 136 | sizeof(struct iwlagn_scd_bc_tbl); |
131 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 137 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
132 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; | 138 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
@@ -244,29 +250,16 @@ static const struct iwl_ops iwl1000_ops = { | |||
244 | .led = &iwlagn_led_ops, | 250 | .led = &iwlagn_led_ops, |
245 | }; | 251 | }; |
246 | 252 | ||
247 | struct iwl_cfg iwl1000_bgn_cfg = { | 253 | static struct iwl_base_params iwl1000_base_params = { |
248 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", | ||
249 | .fw_name_pre = IWL1000_FW_PRE, | ||
250 | .ucode_api_max = IWL1000_UCODE_API_MAX, | ||
251 | .ucode_api_min = IWL1000_UCODE_API_MIN, | ||
252 | .sku = IWL_SKU_G|IWL_SKU_N, | ||
253 | .ops = &iwl1000_ops, | ||
254 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | ||
255 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | ||
256 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | ||
257 | .num_of_queues = IWLAGN_NUM_QUEUES, | 254 | .num_of_queues = IWLAGN_NUM_QUEUES, |
258 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 255 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
259 | .mod_params = &iwlagn_mod_params, | 256 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
260 | .valid_tx_ant = ANT_A, | ||
261 | .valid_rx_ant = ANT_AB, | ||
262 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | 257 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
263 | .set_l0s = true, | 258 | .set_l0s = true, |
264 | .use_bsm = false, | 259 | .use_bsm = false, |
265 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, | 260 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, |
266 | .shadow_ram_support = false, | 261 | .shadow_ram_support = false, |
267 | .ht_greenfield_support = true, | ||
268 | .led_compensation = 51, | 262 | .led_compensation = 51, |
269 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
270 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 263 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
271 | .support_ct_kill_exit = true, | 264 | .support_ct_kill_exit = true, |
272 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, | 265 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, |
@@ -277,6 +270,26 @@ struct iwl_cfg iwl1000_bgn_cfg = { | |||
277 | .sensitivity_calib_by_driver = true, | 270 | .sensitivity_calib_by_driver = true, |
278 | .chain_noise_calib_by_driver = true, | 271 | .chain_noise_calib_by_driver = true, |
279 | }; | 272 | }; |
273 | static struct iwl_ht_params iwl1000_ht_params = { | ||
274 | .ht_greenfield_support = true, | ||
275 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
276 | }; | ||
277 | |||
278 | struct iwl_cfg iwl1000_bgn_cfg = { | ||
279 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", | ||
280 | .fw_name_pre = IWL1000_FW_PRE, | ||
281 | .ucode_api_max = IWL1000_UCODE_API_MAX, | ||
282 | .ucode_api_min = IWL1000_UCODE_API_MIN, | ||
283 | .sku = IWL_SKU_G|IWL_SKU_N, | ||
284 | .valid_tx_ant = ANT_A, | ||
285 | .valid_rx_ant = ANT_AB, | ||
286 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | ||
287 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | ||
288 | .ops = &iwl1000_ops, | ||
289 | .mod_params = &iwlagn_mod_params, | ||
290 | .base_params = &iwl1000_base_params, | ||
291 | .ht_params = &iwl1000_ht_params, | ||
292 | }; | ||
280 | 293 | ||
281 | struct iwl_cfg iwl1000_bg_cfg = { | 294 | struct iwl_cfg iwl1000_bg_cfg = { |
282 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", | 295 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", |
@@ -284,30 +297,45 @@ struct iwl_cfg iwl1000_bg_cfg = { | |||
284 | .ucode_api_max = IWL1000_UCODE_API_MAX, | 297 | .ucode_api_max = IWL1000_UCODE_API_MAX, |
285 | .ucode_api_min = IWL1000_UCODE_API_MIN, | 298 | .ucode_api_min = IWL1000_UCODE_API_MIN, |
286 | .sku = IWL_SKU_G, | 299 | .sku = IWL_SKU_G, |
300 | .valid_tx_ant = ANT_A, | ||
301 | .valid_rx_ant = ANT_AB, | ||
302 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | ||
303 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | ||
287 | .ops = &iwl1000_ops, | 304 | .ops = &iwl1000_ops, |
288 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 305 | .mod_params = &iwlagn_mod_params, |
306 | .base_params = &iwl1000_base_params, | ||
307 | }; | ||
308 | |||
309 | struct iwl_cfg iwl100_bgn_cfg = { | ||
310 | .name = "Intel(R) 100 Series 1x1 BGN", | ||
311 | .fw_name_pre = IWL100_FW_PRE, | ||
312 | .ucode_api_max = IWL100_UCODE_API_MAX, | ||
313 | .ucode_api_min = IWL100_UCODE_API_MIN, | ||
314 | .sku = IWL_SKU_G|IWL_SKU_N, | ||
315 | .valid_tx_ant = ANT_A, | ||
316 | .valid_rx_ant = ANT_A, | ||
289 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | 317 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, |
290 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | 318 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, |
291 | .num_of_queues = IWLAGN_NUM_QUEUES, | 319 | .ops = &iwl1000_ops, |
292 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
293 | .mod_params = &iwlagn_mod_params, | 320 | .mod_params = &iwlagn_mod_params, |
321 | .base_params = &iwl1000_base_params, | ||
322 | .ht_params = &iwl1000_ht_params, | ||
323 | }; | ||
324 | |||
325 | struct iwl_cfg iwl100_bg_cfg = { | ||
326 | .name = "Intel(R) 100 Series 1x1 BG", | ||
327 | .fw_name_pre = IWL100_FW_PRE, | ||
328 | .ucode_api_max = IWL100_UCODE_API_MAX, | ||
329 | .ucode_api_min = IWL100_UCODE_API_MIN, | ||
330 | .sku = IWL_SKU_G, | ||
294 | .valid_tx_ant = ANT_A, | 331 | .valid_tx_ant = ANT_A, |
295 | .valid_rx_ant = ANT_AB, | 332 | .valid_rx_ant = ANT_A, |
296 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | 333 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, |
297 | .set_l0s = true, | 334 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, |
298 | .use_bsm = false, | 335 | .ops = &iwl1000_ops, |
299 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, | 336 | .mod_params = &iwlagn_mod_params, |
300 | .shadow_ram_support = false, | 337 | .base_params = &iwl1000_base_params, |
301 | .led_compensation = 51, | ||
302 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
303 | .support_ct_kill_exit = true, | ||
304 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, | ||
305 | .chain_noise_scale = 1000, | ||
306 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
307 | .max_event_log_size = 128, | ||
308 | .ucode_tracing = true, | ||
309 | .sensitivity_calib_by_driver = true, | ||
310 | .chain_noise_calib_by_driver = true, | ||
311 | }; | 338 | }; |
312 | 339 | ||
313 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); | 340 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); |
341 | MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX)); | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index 5d09686c3389..cfdff5487e3c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -406,7 +406,7 @@ static bool iwl3945_good_plcp_health(struct iwl_priv *priv, | |||
406 | unsigned int plcp_msec; | 406 | unsigned int plcp_msec; |
407 | unsigned long plcp_received_jiffies; | 407 | unsigned long plcp_received_jiffies; |
408 | 408 | ||
409 | if (priv->cfg->plcp_delta_threshold == | 409 | if (priv->cfg->base_params->plcp_delta_threshold == |
410 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) { | 410 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) { |
411 | IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n"); | 411 | IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n"); |
412 | return rc; | 412 | return rc; |
@@ -432,7 +432,7 @@ static bool iwl3945_good_plcp_health(struct iwl_priv *priv, | |||
432 | 432 | ||
433 | if ((combined_plcp_delta > 0) && | 433 | if ((combined_plcp_delta > 0) && |
434 | ((combined_plcp_delta * 100) / plcp_msec) > | 434 | ((combined_plcp_delta * 100) / plcp_msec) > |
435 | priv->cfg->plcp_delta_threshold) { | 435 | priv->cfg->base_params->plcp_delta_threshold) { |
436 | /* | 436 | /* |
437 | * if plcp_err exceed the threshold, the following | 437 | * if plcp_err exceed the threshold, the following |
438 | * data is printed in csv format: | 438 | * data is printed in csv format: |
@@ -444,7 +444,7 @@ static bool iwl3945_good_plcp_health(struct iwl_priv *priv, | |||
444 | */ | 444 | */ |
445 | IWL_DEBUG_RADIO(priv, "plcp_err exceeded %u, " | 445 | IWL_DEBUG_RADIO(priv, "plcp_err exceeded %u, " |
446 | "%u, %d, %u mSecs\n", | 446 | "%u, %d, %u mSecs\n", |
447 | priv->cfg->plcp_delta_threshold, | 447 | priv->cfg->base_params->plcp_delta_threshold, |
448 | le32_to_cpu(current_stat.rx.ofdm.plcp_err), | 448 | le32_to_cpu(current_stat.rx.ofdm.plcp_err), |
449 | combined_plcp_delta, plcp_msec); | 449 | combined_plcp_delta, plcp_msec); |
450 | /* | 450 | /* |
@@ -2421,7 +2421,7 @@ int iwl3945_hw_set_hw_params(struct iwl_priv *priv) | |||
2421 | } | 2421 | } |
2422 | 2422 | ||
2423 | /* Assign number of Usable TX queues */ | 2423 | /* Assign number of Usable TX queues */ |
2424 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; | 2424 | priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; |
2425 | 2425 | ||
2426 | priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd); | 2426 | priv->hw_params.tfd_size = sizeof(struct iwl3945_tfd); |
2427 | priv->hw_params.rx_page_order = get_order(IWL_RX_BUF_SIZE_3K); | 2427 | priv->hw_params.rx_page_order = get_order(IWL_RX_BUF_SIZE_3K); |
@@ -2722,22 +2722,12 @@ static const struct iwl_ops iwl3945_ops = { | |||
2722 | .led = &iwl3945_led_ops, | 2722 | .led = &iwl3945_led_ops, |
2723 | }; | 2723 | }; |
2724 | 2724 | ||
2725 | static struct iwl_cfg iwl3945_bg_cfg = { | 2725 | static struct iwl_base_params iwl3945_base_params = { |
2726 | .name = "3945BG", | ||
2727 | .fw_name_pre = IWL3945_FW_PRE, | ||
2728 | .ucode_api_max = IWL3945_UCODE_API_MAX, | ||
2729 | .ucode_api_min = IWL3945_UCODE_API_MIN, | ||
2730 | .sku = IWL_SKU_G, | ||
2731 | .eeprom_size = IWL3945_EEPROM_IMG_SIZE, | 2726 | .eeprom_size = IWL3945_EEPROM_IMG_SIZE, |
2732 | .eeprom_ver = EEPROM_3945_EEPROM_VERSION, | ||
2733 | .ops = &iwl3945_ops, | ||
2734 | .num_of_queues = IWL39_NUM_QUEUES, | ||
2735 | .mod_params = &iwl3945_mod_params, | ||
2736 | .pll_cfg_val = CSR39_ANA_PLL_CFG_VAL, | 2727 | .pll_cfg_val = CSR39_ANA_PLL_CFG_VAL, |
2737 | .set_l0s = false, | 2728 | .set_l0s = false, |
2738 | .use_bsm = true, | 2729 | .use_bsm = true, |
2739 | .use_isr_legacy = true, | 2730 | .use_isr_legacy = true, |
2740 | .ht_greenfield_support = false, | ||
2741 | .led_compensation = 64, | 2731 | .led_compensation = 64, |
2742 | .broken_powersave = true, | 2732 | .broken_powersave = true, |
2743 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | 2733 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
@@ -2746,25 +2736,28 @@ static struct iwl_cfg iwl3945_bg_cfg = { | |||
2746 | .tx_power_by_driver = true, | 2736 | .tx_power_by_driver = true, |
2747 | }; | 2737 | }; |
2748 | 2738 | ||
2739 | static struct iwl_cfg iwl3945_bg_cfg = { | ||
2740 | .name = "3945BG", | ||
2741 | .fw_name_pre = IWL3945_FW_PRE, | ||
2742 | .ucode_api_max = IWL3945_UCODE_API_MAX, | ||
2743 | .ucode_api_min = IWL3945_UCODE_API_MIN, | ||
2744 | .sku = IWL_SKU_G, | ||
2745 | .eeprom_ver = EEPROM_3945_EEPROM_VERSION, | ||
2746 | .ops = &iwl3945_ops, | ||
2747 | .mod_params = &iwl3945_mod_params, | ||
2748 | .base_params = &iwl3945_base_params, | ||
2749 | }; | ||
2750 | |||
2749 | static struct iwl_cfg iwl3945_abg_cfg = { | 2751 | static struct iwl_cfg iwl3945_abg_cfg = { |
2750 | .name = "3945ABG", | 2752 | .name = "3945ABG", |
2751 | .fw_name_pre = IWL3945_FW_PRE, | 2753 | .fw_name_pre = IWL3945_FW_PRE, |
2752 | .ucode_api_max = IWL3945_UCODE_API_MAX, | 2754 | .ucode_api_max = IWL3945_UCODE_API_MAX, |
2753 | .ucode_api_min = IWL3945_UCODE_API_MIN, | 2755 | .ucode_api_min = IWL3945_UCODE_API_MIN, |
2754 | .sku = IWL_SKU_A|IWL_SKU_G, | 2756 | .sku = IWL_SKU_A|IWL_SKU_G, |
2755 | .eeprom_size = IWL3945_EEPROM_IMG_SIZE, | ||
2756 | .eeprom_ver = EEPROM_3945_EEPROM_VERSION, | 2757 | .eeprom_ver = EEPROM_3945_EEPROM_VERSION, |
2757 | .ops = &iwl3945_ops, | 2758 | .ops = &iwl3945_ops, |
2758 | .num_of_queues = IWL39_NUM_QUEUES, | ||
2759 | .mod_params = &iwl3945_mod_params, | 2759 | .mod_params = &iwl3945_mod_params, |
2760 | .use_isr_legacy = true, | 2760 | .base_params = &iwl3945_base_params, |
2761 | .ht_greenfield_support = false, | ||
2762 | .led_compensation = 64, | ||
2763 | .broken_powersave = true, | ||
2764 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | ||
2765 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
2766 | .max_event_log_size = 512, | ||
2767 | .tx_power_by_driver = true, | ||
2768 | }; | 2761 | }; |
2769 | 2762 | ||
2770 | DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = { | 2763 | DEFINE_PCI_DEVICE_TABLE(iwl3945_hw_card_ids) = { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 943a9c7bfa7f..834c2f9c15d7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -647,13 +647,13 @@ static int iwl4965_hw_set_hw_params(struct iwl_priv *priv) | |||
647 | { | 647 | { |
648 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && | 648 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && |
649 | priv->cfg->mod_params->num_of_queues <= IWL49_NUM_QUEUES) | 649 | priv->cfg->mod_params->num_of_queues <= IWL49_NUM_QUEUES) |
650 | priv->cfg->num_of_queues = | 650 | priv->cfg->base_params->num_of_queues = |
651 | priv->cfg->mod_params->num_of_queues; | 651 | priv->cfg->mod_params->num_of_queues; |
652 | 652 | ||
653 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; | 653 | priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; |
654 | priv->hw_params.dma_chnl_num = FH49_TCSR_CHNL_NUM; | 654 | priv->hw_params.dma_chnl_num = FH49_TCSR_CHNL_NUM; |
655 | priv->hw_params.scd_bc_tbls_size = | 655 | priv->hw_params.scd_bc_tbls_size = |
656 | priv->cfg->num_of_queues * | 656 | priv->cfg->base_params->num_of_queues * |
657 | sizeof(struct iwl4965_scd_bc_tbl); | 657 | sizeof(struct iwl4965_scd_bc_tbl); |
658 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 658 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
659 | priv->hw_params.max_stations = IWL4965_STATION_COUNT; | 659 | priv->hw_params.max_stations = IWL4965_STATION_COUNT; |
@@ -1724,13 +1724,13 @@ static int iwl4965_txq_agg_disable(struct iwl_priv *priv, u16 txq_id, | |||
1724 | u16 ssn_idx, u8 tx_fifo) | 1724 | u16 ssn_idx, u8 tx_fifo) |
1725 | { | 1725 | { |
1726 | if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) || | 1726 | if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) || |
1727 | (IWL49_FIRST_AMPDU_QUEUE + priv->cfg->num_of_ampdu_queues | 1727 | (IWL49_FIRST_AMPDU_QUEUE + |
1728 | <= txq_id)) { | 1728 | priv->cfg->base_params->num_of_ampdu_queues <= txq_id)) { |
1729 | IWL_WARN(priv, | 1729 | IWL_WARN(priv, |
1730 | "queue number out of range: %d, must be %d to %d\n", | 1730 | "queue number out of range: %d, must be %d to %d\n", |
1731 | txq_id, IWL49_FIRST_AMPDU_QUEUE, | 1731 | txq_id, IWL49_FIRST_AMPDU_QUEUE, |
1732 | IWL49_FIRST_AMPDU_QUEUE + | 1732 | IWL49_FIRST_AMPDU_QUEUE + |
1733 | priv->cfg->num_of_ampdu_queues - 1); | 1733 | priv->cfg->base_params->num_of_ampdu_queues - 1); |
1734 | return -EINVAL; | 1734 | return -EINVAL; |
1735 | } | 1735 | } |
1736 | 1736 | ||
@@ -1792,13 +1792,13 @@ static int iwl4965_txq_agg_enable(struct iwl_priv *priv, int txq_id, | |||
1792 | int ret; | 1792 | int ret; |
1793 | 1793 | ||
1794 | if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) || | 1794 | if ((IWL49_FIRST_AMPDU_QUEUE > txq_id) || |
1795 | (IWL49_FIRST_AMPDU_QUEUE + priv->cfg->num_of_ampdu_queues | 1795 | (IWL49_FIRST_AMPDU_QUEUE + |
1796 | <= txq_id)) { | 1796 | priv->cfg->base_params->num_of_ampdu_queues <= txq_id)) { |
1797 | IWL_WARN(priv, | 1797 | IWL_WARN(priv, |
1798 | "queue number out of range: %d, must be %d to %d\n", | 1798 | "queue number out of range: %d, must be %d to %d\n", |
1799 | txq_id, IWL49_FIRST_AMPDU_QUEUE, | 1799 | txq_id, IWL49_FIRST_AMPDU_QUEUE, |
1800 | IWL49_FIRST_AMPDU_QUEUE + | 1800 | IWL49_FIRST_AMPDU_QUEUE + |
1801 | priv->cfg->num_of_ampdu_queues - 1); | 1801 | priv->cfg->base_params->num_of_ampdu_queues - 1); |
1802 | return -EINVAL; | 1802 | return -EINVAL; |
1803 | } | 1803 | } |
1804 | 1804 | ||
@@ -2302,26 +2302,14 @@ static const struct iwl_ops iwl4965_ops = { | |||
2302 | .led = &iwlagn_led_ops, | 2302 | .led = &iwlagn_led_ops, |
2303 | }; | 2303 | }; |
2304 | 2304 | ||
2305 | struct iwl_cfg iwl4965_agn_cfg = { | 2305 | static struct iwl_base_params iwl4965_base_params = { |
2306 | .name = "Intel(R) Wireless WiFi Link 4965AGN", | ||
2307 | .fw_name_pre = IWL4965_FW_PRE, | ||
2308 | .ucode_api_max = IWL4965_UCODE_API_MAX, | ||
2309 | .ucode_api_min = IWL4965_UCODE_API_MIN, | ||
2310 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
2311 | .eeprom_size = IWL4965_EEPROM_IMG_SIZE, | 2306 | .eeprom_size = IWL4965_EEPROM_IMG_SIZE, |
2312 | .eeprom_ver = EEPROM_4965_EEPROM_VERSION, | ||
2313 | .eeprom_calib_ver = EEPROM_4965_TX_POWER_VERSION, | ||
2314 | .ops = &iwl4965_ops, | ||
2315 | .num_of_queues = IWL49_NUM_QUEUES, | 2307 | .num_of_queues = IWL49_NUM_QUEUES, |
2316 | .num_of_ampdu_queues = IWL49_NUM_AMPDU_QUEUES, | 2308 | .num_of_ampdu_queues = IWL49_NUM_AMPDU_QUEUES, |
2317 | .mod_params = &iwlagn_mod_params, | ||
2318 | .valid_tx_ant = ANT_AB, | ||
2319 | .valid_rx_ant = ANT_ABC, | ||
2320 | .pll_cfg_val = 0, | 2309 | .pll_cfg_val = 0, |
2321 | .set_l0s = true, | 2310 | .set_l0s = true, |
2322 | .use_bsm = true, | 2311 | .use_bsm = true, |
2323 | .use_isr_legacy = true, | 2312 | .use_isr_legacy = true, |
2324 | .ht_greenfield_support = false, | ||
2325 | .broken_powersave = true, | 2313 | .broken_powersave = true, |
2326 | .led_compensation = 61, | 2314 | .led_compensation = 61, |
2327 | .chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS, | 2315 | .chain_noise_num_beacons = IWL4965_CAL_NUM_BEACONS, |
@@ -2333,6 +2321,21 @@ struct iwl_cfg iwl4965_agn_cfg = { | |||
2333 | .ucode_tracing = true, | 2321 | .ucode_tracing = true, |
2334 | .sensitivity_calib_by_driver = true, | 2322 | .sensitivity_calib_by_driver = true, |
2335 | .chain_noise_calib_by_driver = true, | 2323 | .chain_noise_calib_by_driver = true, |
2324 | }; | ||
2325 | |||
2326 | struct iwl_cfg iwl4965_agn_cfg = { | ||
2327 | .name = "Intel(R) Wireless WiFi Link 4965AGN", | ||
2328 | .fw_name_pre = IWL4965_FW_PRE, | ||
2329 | .ucode_api_max = IWL4965_UCODE_API_MAX, | ||
2330 | .ucode_api_min = IWL4965_UCODE_API_MIN, | ||
2331 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
2332 | .valid_tx_ant = ANT_AB, | ||
2333 | .valid_rx_ant = ANT_ABC, | ||
2334 | .eeprom_ver = EEPROM_4965_EEPROM_VERSION, | ||
2335 | .eeprom_calib_ver = EEPROM_4965_TX_POWER_VERSION, | ||
2336 | .ops = &iwl4965_ops, | ||
2337 | .mod_params = &iwlagn_mod_params, | ||
2338 | .base_params = &iwl4965_base_params, | ||
2336 | /* | 2339 | /* |
2337 | * Force use of chains B and C for scan RX on 5 GHz band | 2340 | * Force use of chains B and C for scan RX on 5 GHz band |
2338 | * because the device has off-channel reception on chain A. | 2341 | * because the device has off-channel reception on chain A. |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 21b4b23368e6..1b25ad63b5c1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -170,13 +170,13 @@ static int iwl5000_hw_set_hw_params(struct iwl_priv *priv) | |||
170 | { | 170 | { |
171 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && | 171 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && |
172 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) | 172 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) |
173 | priv->cfg->num_of_queues = | 173 | priv->cfg->base_params->num_of_queues = |
174 | priv->cfg->mod_params->num_of_queues; | 174 | priv->cfg->mod_params->num_of_queues; |
175 | 175 | ||
176 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; | 176 | priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; |
177 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; | 177 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
178 | priv->hw_params.scd_bc_tbls_size = | 178 | priv->hw_params.scd_bc_tbls_size = |
179 | priv->cfg->num_of_queues * | 179 | priv->cfg->base_params->num_of_queues * |
180 | sizeof(struct iwlagn_scd_bc_tbl); | 180 | sizeof(struct iwlagn_scd_bc_tbl); |
181 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 181 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
182 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; | 182 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
@@ -217,13 +217,13 @@ static int iwl5150_hw_set_hw_params(struct iwl_priv *priv) | |||
217 | { | 217 | { |
218 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && | 218 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && |
219 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) | 219 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) |
220 | priv->cfg->num_of_queues = | 220 | priv->cfg->base_params->num_of_queues = |
221 | priv->cfg->mod_params->num_of_queues; | 221 | priv->cfg->mod_params->num_of_queues; |
222 | 222 | ||
223 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; | 223 | priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; |
224 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; | 224 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
225 | priv->hw_params.scd_bc_tbls_size = | 225 | priv->hw_params.scd_bc_tbls_size = |
226 | priv->cfg->num_of_queues * | 226 | priv->cfg->base_params->num_of_queues * |
227 | sizeof(struct iwlagn_scd_bc_tbl); | 227 | sizeof(struct iwlagn_scd_bc_tbl); |
228 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 228 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
229 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; | 229 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
@@ -504,27 +504,14 @@ static const struct iwl_ops iwl5150_ops = { | |||
504 | .led = &iwlagn_led_ops, | 504 | .led = &iwlagn_led_ops, |
505 | }; | 505 | }; |
506 | 506 | ||
507 | struct iwl_cfg iwl5300_agn_cfg = { | 507 | static struct iwl_base_params iwl5000_base_params = { |
508 | .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", | ||
509 | .fw_name_pre = IWL5000_FW_PRE, | ||
510 | .ucode_api_max = IWL5000_UCODE_API_MAX, | ||
511 | .ucode_api_min = IWL5000_UCODE_API_MIN, | ||
512 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
513 | .ops = &iwl5000_ops, | ||
514 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, | 508 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, |
515 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | ||
516 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | ||
517 | .num_of_queues = IWLAGN_NUM_QUEUES, | 509 | .num_of_queues = IWLAGN_NUM_QUEUES, |
518 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 510 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
519 | .mod_params = &iwlagn_mod_params, | ||
520 | .valid_tx_ant = ANT_ABC, | ||
521 | .valid_rx_ant = ANT_ABC, | ||
522 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | 511 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
523 | .set_l0s = true, | 512 | .set_l0s = true, |
524 | .use_bsm = false, | 513 | .use_bsm = false, |
525 | .ht_greenfield_support = true, | ||
526 | .led_compensation = 51, | 514 | .led_compensation = 51, |
527 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
528 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 515 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
529 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | 516 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, |
530 | .chain_noise_scale = 1000, | 517 | .chain_noise_scale = 1000, |
@@ -534,6 +521,26 @@ struct iwl_cfg iwl5300_agn_cfg = { | |||
534 | .sensitivity_calib_by_driver = true, | 521 | .sensitivity_calib_by_driver = true, |
535 | .chain_noise_calib_by_driver = true, | 522 | .chain_noise_calib_by_driver = true, |
536 | }; | 523 | }; |
524 | static struct iwl_ht_params iwl5000_ht_params = { | ||
525 | .ht_greenfield_support = true, | ||
526 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
527 | }; | ||
528 | |||
529 | struct iwl_cfg iwl5300_agn_cfg = { | ||
530 | .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", | ||
531 | .fw_name_pre = IWL5000_FW_PRE, | ||
532 | .ucode_api_max = IWL5000_UCODE_API_MAX, | ||
533 | .ucode_api_min = IWL5000_UCODE_API_MIN, | ||
534 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
535 | .valid_tx_ant = ANT_ABC, | ||
536 | .valid_rx_ant = ANT_ABC, | ||
537 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | ||
538 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | ||
539 | .ops = &iwl5000_ops, | ||
540 | .mod_params = &iwlagn_mod_params, | ||
541 | .base_params = &iwl5000_base_params, | ||
542 | .ht_params = &iwl5000_ht_params, | ||
543 | }; | ||
537 | 544 | ||
538 | struct iwl_cfg iwl5100_bgn_cfg = { | 545 | struct iwl_cfg iwl5100_bgn_cfg = { |
539 | .name = "Intel(R) WiFi Link 5100 BGN", | 546 | .name = "Intel(R) WiFi Link 5100 BGN", |
@@ -541,29 +548,14 @@ struct iwl_cfg iwl5100_bgn_cfg = { | |||
541 | .ucode_api_max = IWL5000_UCODE_API_MAX, | 548 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
542 | .ucode_api_min = IWL5000_UCODE_API_MIN, | 549 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
543 | .sku = IWL_SKU_G|IWL_SKU_N, | 550 | .sku = IWL_SKU_G|IWL_SKU_N, |
544 | .ops = &iwl5000_ops, | 551 | .valid_tx_ant = ANT_B, |
545 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, | 552 | .valid_rx_ant = ANT_AB, |
546 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | 553 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, |
547 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 554 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
548 | .num_of_queues = IWLAGN_NUM_QUEUES, | 555 | .ops = &iwl5000_ops, |
549 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
550 | .mod_params = &iwlagn_mod_params, | 556 | .mod_params = &iwlagn_mod_params, |
551 | .valid_tx_ant = ANT_B, | 557 | .base_params = &iwl5000_base_params, |
552 | .valid_rx_ant = ANT_AB, | 558 | .ht_params = &iwl5000_ht_params, |
553 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | ||
554 | .set_l0s = true, | ||
555 | .use_bsm = false, | ||
556 | .ht_greenfield_support = true, | ||
557 | .led_compensation = 51, | ||
558 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
559 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
560 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | ||
561 | .chain_noise_scale = 1000, | ||
562 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
563 | .max_event_log_size = 512, | ||
564 | .ucode_tracing = true, | ||
565 | .sensitivity_calib_by_driver = true, | ||
566 | .chain_noise_calib_by_driver = true, | ||
567 | }; | 559 | }; |
568 | 560 | ||
569 | struct iwl_cfg iwl5100_abg_cfg = { | 561 | struct iwl_cfg iwl5100_abg_cfg = { |
@@ -572,27 +564,13 @@ struct iwl_cfg iwl5100_abg_cfg = { | |||
572 | .ucode_api_max = IWL5000_UCODE_API_MAX, | 564 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
573 | .ucode_api_min = IWL5000_UCODE_API_MIN, | 565 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
574 | .sku = IWL_SKU_A|IWL_SKU_G, | 566 | .sku = IWL_SKU_A|IWL_SKU_G, |
575 | .ops = &iwl5000_ops, | 567 | .valid_tx_ant = ANT_B, |
576 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, | 568 | .valid_rx_ant = ANT_AB, |
577 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | 569 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, |
578 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 570 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
579 | .num_of_queues = IWLAGN_NUM_QUEUES, | 571 | .ops = &iwl5000_ops, |
580 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
581 | .mod_params = &iwlagn_mod_params, | 572 | .mod_params = &iwlagn_mod_params, |
582 | .valid_tx_ant = ANT_B, | 573 | .base_params = &iwl5000_base_params, |
583 | .valid_rx_ant = ANT_AB, | ||
584 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | ||
585 | .set_l0s = true, | ||
586 | .use_bsm = false, | ||
587 | .led_compensation = 51, | ||
588 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
589 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | ||
590 | .chain_noise_scale = 1000, | ||
591 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
592 | .max_event_log_size = 512, | ||
593 | .ucode_tracing = true, | ||
594 | .sensitivity_calib_by_driver = true, | ||
595 | .chain_noise_calib_by_driver = true, | ||
596 | }; | 574 | }; |
597 | 575 | ||
598 | struct iwl_cfg iwl5100_agn_cfg = { | 576 | struct iwl_cfg iwl5100_agn_cfg = { |
@@ -601,29 +579,14 @@ struct iwl_cfg iwl5100_agn_cfg = { | |||
601 | .ucode_api_max = IWL5000_UCODE_API_MAX, | 579 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
602 | .ucode_api_min = IWL5000_UCODE_API_MIN, | 580 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
603 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 581 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
604 | .ops = &iwl5000_ops, | 582 | .valid_tx_ant = ANT_B, |
605 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, | 583 | .valid_rx_ant = ANT_AB, |
606 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | 584 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, |
607 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | 585 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, |
608 | .num_of_queues = IWLAGN_NUM_QUEUES, | 586 | .ops = &iwl5000_ops, |
609 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
610 | .mod_params = &iwlagn_mod_params, | 587 | .mod_params = &iwlagn_mod_params, |
611 | .valid_tx_ant = ANT_B, | 588 | .base_params = &iwl5000_base_params, |
612 | .valid_rx_ant = ANT_AB, | 589 | .ht_params = &iwl5000_ht_params, |
613 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | ||
614 | .set_l0s = true, | ||
615 | .use_bsm = false, | ||
616 | .ht_greenfield_support = true, | ||
617 | .led_compensation = 51, | ||
618 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
619 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
620 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | ||
621 | .chain_noise_scale = 1000, | ||
622 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
623 | .max_event_log_size = 512, | ||
624 | .ucode_tracing = true, | ||
625 | .sensitivity_calib_by_driver = true, | ||
626 | .chain_noise_calib_by_driver = true, | ||
627 | }; | 590 | }; |
628 | 591 | ||
629 | struct iwl_cfg iwl5350_agn_cfg = { | 592 | struct iwl_cfg iwl5350_agn_cfg = { |
@@ -632,29 +595,14 @@ struct iwl_cfg iwl5350_agn_cfg = { | |||
632 | .ucode_api_max = IWL5000_UCODE_API_MAX, | 595 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
633 | .ucode_api_min = IWL5000_UCODE_API_MIN, | 596 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
634 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 597 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
635 | .ops = &iwl5000_ops, | 598 | .valid_tx_ant = ANT_ABC, |
636 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, | 599 | .valid_rx_ant = ANT_ABC, |
637 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, | 600 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, |
638 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, | 601 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, |
639 | .num_of_queues = IWLAGN_NUM_QUEUES, | 602 | .ops = &iwl5000_ops, |
640 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
641 | .mod_params = &iwlagn_mod_params, | 603 | .mod_params = &iwlagn_mod_params, |
642 | .valid_tx_ant = ANT_ABC, | 604 | .base_params = &iwl5000_base_params, |
643 | .valid_rx_ant = ANT_ABC, | 605 | .ht_params = &iwl5000_ht_params, |
644 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | ||
645 | .set_l0s = true, | ||
646 | .use_bsm = false, | ||
647 | .ht_greenfield_support = true, | ||
648 | .led_compensation = 51, | ||
649 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
650 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
651 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | ||
652 | .chain_noise_scale = 1000, | ||
653 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
654 | .max_event_log_size = 512, | ||
655 | .ucode_tracing = true, | ||
656 | .sensitivity_calib_by_driver = true, | ||
657 | .chain_noise_calib_by_driver = true, | ||
658 | }; | 606 | }; |
659 | 607 | ||
660 | struct iwl_cfg iwl5150_agn_cfg = { | 608 | struct iwl_cfg iwl5150_agn_cfg = { |
@@ -663,29 +611,14 @@ struct iwl_cfg iwl5150_agn_cfg = { | |||
663 | .ucode_api_max = IWL5150_UCODE_API_MAX, | 611 | .ucode_api_max = IWL5150_UCODE_API_MAX, |
664 | .ucode_api_min = IWL5150_UCODE_API_MIN, | 612 | .ucode_api_min = IWL5150_UCODE_API_MIN, |
665 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 613 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
666 | .ops = &iwl5150_ops, | 614 | .valid_tx_ant = ANT_A, |
667 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, | 615 | .valid_rx_ant = ANT_AB, |
668 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, | 616 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, |
669 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, | 617 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, |
670 | .num_of_queues = IWLAGN_NUM_QUEUES, | 618 | .ops = &iwl5150_ops, |
671 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
672 | .mod_params = &iwlagn_mod_params, | 619 | .mod_params = &iwlagn_mod_params, |
673 | .valid_tx_ant = ANT_A, | 620 | .base_params = &iwl5000_base_params, |
674 | .valid_rx_ant = ANT_AB, | 621 | .ht_params = &iwl5000_ht_params, |
675 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | ||
676 | .set_l0s = true, | ||
677 | .use_bsm = false, | ||
678 | .ht_greenfield_support = true, | ||
679 | .led_compensation = 51, | ||
680 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
681 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
682 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | ||
683 | .chain_noise_scale = 1000, | ||
684 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
685 | .max_event_log_size = 512, | ||
686 | .ucode_tracing = true, | ||
687 | .sensitivity_calib_by_driver = true, | ||
688 | .chain_noise_calib_by_driver = true, | ||
689 | .need_dc_calib = true, | 622 | .need_dc_calib = true, |
690 | }; | 623 | }; |
691 | 624 | ||
@@ -695,27 +628,13 @@ struct iwl_cfg iwl5150_abg_cfg = { | |||
695 | .ucode_api_max = IWL5150_UCODE_API_MAX, | 628 | .ucode_api_max = IWL5150_UCODE_API_MAX, |
696 | .ucode_api_min = IWL5150_UCODE_API_MIN, | 629 | .ucode_api_min = IWL5150_UCODE_API_MIN, |
697 | .sku = IWL_SKU_A|IWL_SKU_G, | 630 | .sku = IWL_SKU_A|IWL_SKU_G, |
698 | .ops = &iwl5150_ops, | 631 | .valid_tx_ant = ANT_A, |
699 | .eeprom_size = IWLAGN_EEPROM_IMG_SIZE, | 632 | .valid_rx_ant = ANT_AB, |
700 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, | 633 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, |
701 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, | 634 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, |
702 | .num_of_queues = IWLAGN_NUM_QUEUES, | 635 | .ops = &iwl5150_ops, |
703 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
704 | .mod_params = &iwlagn_mod_params, | 636 | .mod_params = &iwlagn_mod_params, |
705 | .valid_tx_ant = ANT_A, | 637 | .base_params = &iwl5000_base_params, |
706 | .valid_rx_ant = ANT_AB, | ||
707 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | ||
708 | .set_l0s = true, | ||
709 | .use_bsm = false, | ||
710 | .led_compensation = 51, | ||
711 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
712 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | ||
713 | .chain_noise_scale = 1000, | ||
714 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
715 | .max_event_log_size = 512, | ||
716 | .ucode_tracing = true, | ||
717 | .sensitivity_calib_by_driver = true, | ||
718 | .chain_noise_calib_by_driver = true, | ||
719 | .need_dc_calib = true, | 638 | .need_dc_calib = true, |
720 | }; | 639 | }; |
721 | 640 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 9f43f2770c96..6261aec5ebdc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -51,13 +51,15 @@ | |||
51 | 51 | ||
52 | /* Highest firmware API version supported */ | 52 | /* Highest firmware API version supported */ |
53 | #define IWL6000_UCODE_API_MAX 4 | 53 | #define IWL6000_UCODE_API_MAX 4 |
54 | #define IWL6050_UCODE_API_MAX 4 | 54 | #define IWL6050_UCODE_API_MAX 5 |
55 | #define IWL6000G2_UCODE_API_MAX 5 | 55 | #define IWL6000G2_UCODE_API_MAX 5 |
56 | #define IWL130_UCODE_API_MAX 5 | ||
56 | 57 | ||
57 | /* Lowest firmware API version supported */ | 58 | /* Lowest firmware API version supported */ |
58 | #define IWL6000_UCODE_API_MIN 4 | 59 | #define IWL6000_UCODE_API_MIN 4 |
59 | #define IWL6050_UCODE_API_MIN 4 | 60 | #define IWL6050_UCODE_API_MIN 4 |
60 | #define IWL6000G2_UCODE_API_MIN 4 | 61 | #define IWL6000G2_UCODE_API_MIN 4 |
62 | #define IWL130_UCODE_API_MIN 5 | ||
61 | 63 | ||
62 | #define IWL6000_FW_PRE "iwlwifi-6000-" | 64 | #define IWL6000_FW_PRE "iwlwifi-6000-" |
63 | #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode" | 65 | #define _IWL6000_MODULE_FIRMWARE(api) IWL6000_FW_PRE #api ".ucode" |
@@ -75,6 +77,9 @@ | |||
75 | #define _IWL6000G2B_MODULE_FIRMWARE(api) IWL6000G2B_FW_PRE #api ".ucode" | 77 | #define _IWL6000G2B_MODULE_FIRMWARE(api) IWL6000G2B_FW_PRE #api ".ucode" |
76 | #define IWL6000G2B_MODULE_FIRMWARE(api) _IWL6000G2B_MODULE_FIRMWARE(api) | 78 | #define IWL6000G2B_MODULE_FIRMWARE(api) _IWL6000G2B_MODULE_FIRMWARE(api) |
77 | 79 | ||
80 | #define IWL130_FW_PRE "iwlwifi-130-" | ||
81 | #define _IWL130_MODULE_FIRMWARE(api) IWL130_FW_PRE #api ".ucode" | ||
82 | #define IWL130_MODULE_FIRMWARE(api) _IWL130_MODULE_FIRMWARE(api) | ||
78 | 83 | ||
79 | static void iwl6000_set_ct_threshold(struct iwl_priv *priv) | 84 | static void iwl6000_set_ct_threshold(struct iwl_priv *priv) |
80 | { | 85 | { |
@@ -83,15 +88,24 @@ static void iwl6000_set_ct_threshold(struct iwl_priv *priv) | |||
83 | priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; | 88 | priv->hw_params.ct_kill_exit_threshold = CT_KILL_EXIT_THRESHOLD; |
84 | } | 89 | } |
85 | 90 | ||
86 | /* Indicate calibration version to uCode. */ | 91 | static void iwl6050_additional_nic_config(struct iwl_priv *priv) |
87 | static void iwl6000_set_calib_version(struct iwl_priv *priv) | ||
88 | { | 92 | { |
89 | if (priv->cfg->need_dc_calib && | 93 | /* Indicate calibration version to uCode. */ |
90 | (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6)) | 94 | if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6) |
91 | iwl_set_bit(priv, CSR_GP_DRIVER_REG, | 95 | iwl_set_bit(priv, CSR_GP_DRIVER_REG, |
92 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | 96 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); |
93 | } | 97 | } |
94 | 98 | ||
99 | static void iwl6050g2_additional_nic_config(struct iwl_priv *priv) | ||
100 | { | ||
101 | /* Indicate calibration version to uCode. */ | ||
102 | if (priv->cfg->ops->lib->eeprom_ops.calib_version(priv) >= 6) | ||
103 | iwl_set_bit(priv, CSR_GP_DRIVER_REG, | ||
104 | CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6); | ||
105 | iwl_set_bit(priv, CSR_GP_DRIVER_REG, | ||
106 | CSR_GP_DRIVER_REG_BIT_6050_1x2); | ||
107 | } | ||
108 | |||
95 | /* NIC configuration for 6000 series */ | 109 | /* NIC configuration for 6000 series */ |
96 | static void iwl6000_nic_config(struct iwl_priv *priv) | 110 | static void iwl6000_nic_config(struct iwl_priv *priv) |
97 | { | 111 | { |
@@ -117,9 +131,11 @@ static void iwl6000_nic_config(struct iwl_priv *priv) | |||
117 | iwl_write32(priv, CSR_GP_DRIVER_REG, | 131 | iwl_write32(priv, CSR_GP_DRIVER_REG, |
118 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); | 132 | CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA); |
119 | } | 133 | } |
120 | /* else do nothing, uCode configured */ | 134 | /* do additional nic configuration if needed */ |
121 | if (priv->cfg->ops->lib->temp_ops.set_calib_version) | 135 | if (priv->cfg->ops->nic && |
122 | priv->cfg->ops->lib->temp_ops.set_calib_version(priv); | 136 | priv->cfg->ops->nic->additional_nic_config) { |
137 | priv->cfg->ops->nic->additional_nic_config(priv); | ||
138 | } | ||
123 | } | 139 | } |
124 | 140 | ||
125 | static struct iwl_sensitivity_ranges iwl6000_sensitivity = { | 141 | static struct iwl_sensitivity_ranges iwl6000_sensitivity = { |
@@ -151,13 +167,13 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |||
151 | { | 167 | { |
152 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && | 168 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && |
153 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) | 169 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) |
154 | priv->cfg->num_of_queues = | 170 | priv->cfg->base_params->num_of_queues = |
155 | priv->cfg->mod_params->num_of_queues; | 171 | priv->cfg->mod_params->num_of_queues; |
156 | 172 | ||
157 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; | 173 | priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; |
158 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; | 174 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
159 | priv->hw_params.scd_bc_tbls_size = | 175 | priv->hw_params.scd_bc_tbls_size = |
160 | priv->cfg->num_of_queues * | 176 | priv->cfg->base_params->num_of_queues * |
161 | sizeof(struct iwlagn_scd_bc_tbl); | 177 | sizeof(struct iwlagn_scd_bc_tbl); |
162 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 178 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
163 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; | 179 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
@@ -188,7 +204,7 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |||
188 | BIT(IWL_CALIB_TX_IQ) | | 204 | BIT(IWL_CALIB_TX_IQ) | |
189 | BIT(IWL_CALIB_BASE_BAND); | 205 | BIT(IWL_CALIB_BASE_BAND); |
190 | if (priv->cfg->need_dc_calib) | 206 | if (priv->cfg->need_dc_calib) |
191 | priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_DC); | 207 | priv->hw_params.calib_rt_cfg |= BIT(IWL_CALIB_CFG_DC_IDX); |
192 | 208 | ||
193 | priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; | 209 | priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; |
194 | 210 | ||
@@ -320,7 +336,6 @@ static struct iwl_lib_ops iwl6000_lib = { | |||
320 | .temp_ops = { | 336 | .temp_ops = { |
321 | .temperature = iwlagn_temperature, | 337 | .temperature = iwlagn_temperature, |
322 | .set_ct_kill = iwl6000_set_ct_threshold, | 338 | .set_ct_kill = iwl6000_set_ct_threshold, |
323 | .set_calib_version = iwl6000_set_calib_version, | ||
324 | }, | 339 | }, |
325 | .manage_ibss_station = iwlagn_manage_ibss_station, | 340 | .manage_ibss_station = iwlagn_manage_ibss_station, |
326 | .update_bcast_stations = iwl_update_bcast_stations, | 341 | .update_bcast_stations = iwl_update_bcast_stations, |
@@ -396,7 +411,6 @@ static struct iwl_lib_ops iwl6000g2b_lib = { | |||
396 | .temp_ops = { | 411 | .temp_ops = { |
397 | .temperature = iwlagn_temperature, | 412 | .temperature = iwlagn_temperature, |
398 | .set_ct_kill = iwl6000_set_ct_threshold, | 413 | .set_ct_kill = iwl6000_set_ct_threshold, |
399 | .set_calib_version = iwl6000_set_calib_version, | ||
400 | }, | 414 | }, |
401 | .manage_ibss_station = iwlagn_manage_ibss_station, | 415 | .manage_ibss_station = iwlagn_manage_ibss_station, |
402 | .update_bcast_stations = iwl_update_bcast_stations, | 416 | .update_bcast_stations = iwl_update_bcast_stations, |
@@ -419,6 +433,14 @@ static struct iwl_lib_ops iwl6000g2b_lib = { | |||
419 | } | 433 | } |
420 | }; | 434 | }; |
421 | 435 | ||
436 | static struct iwl_nic_ops iwl6050_nic_ops = { | ||
437 | .additional_nic_config = &iwl6050_additional_nic_config, | ||
438 | }; | ||
439 | |||
440 | static struct iwl_nic_ops iwl6050g2_nic_ops = { | ||
441 | .additional_nic_config = &iwl6050g2_additional_nic_config, | ||
442 | }; | ||
443 | |||
422 | static const struct iwl_ops iwl6000_ops = { | 444 | static const struct iwl_ops iwl6000_ops = { |
423 | .lib = &iwl6000_lib, | 445 | .lib = &iwl6000_lib, |
424 | .hcmd = &iwlagn_hcmd, | 446 | .hcmd = &iwlagn_hcmd, |
@@ -426,6 +448,22 @@ static const struct iwl_ops iwl6000_ops = { | |||
426 | .led = &iwlagn_led_ops, | 448 | .led = &iwlagn_led_ops, |
427 | }; | 449 | }; |
428 | 450 | ||
451 | static const struct iwl_ops iwl6050_ops = { | ||
452 | .lib = &iwl6000_lib, | ||
453 | .hcmd = &iwlagn_hcmd, | ||
454 | .utils = &iwlagn_hcmd_utils, | ||
455 | .led = &iwlagn_led_ops, | ||
456 | .nic = &iwl6050_nic_ops, | ||
457 | }; | ||
458 | |||
459 | static const struct iwl_ops iwl6050g2_ops = { | ||
460 | .lib = &iwl6000_lib, | ||
461 | .hcmd = &iwlagn_hcmd, | ||
462 | .utils = &iwlagn_hcmd_utils, | ||
463 | .led = &iwlagn_led_ops, | ||
464 | .nic = &iwl6050g2_nic_ops, | ||
465 | }; | ||
466 | |||
429 | static const struct iwl_ops iwl6000g2b_ops = { | 467 | static const struct iwl_ops iwl6000g2b_ops = { |
430 | .lib = &iwl6000g2b_lib, | 468 | .lib = &iwl6000g2b_lib, |
431 | .hcmd = &iwlagn_bt_hcmd, | 469 | .hcmd = &iwlagn_bt_hcmd, |
@@ -433,30 +471,16 @@ static const struct iwl_ops iwl6000g2b_ops = { | |||
433 | .led = &iwlagn_led_ops, | 471 | .led = &iwlagn_led_ops, |
434 | }; | 472 | }; |
435 | 473 | ||
436 | struct iwl_cfg iwl6000g2a_2agn_cfg = { | 474 | static struct iwl_base_params iwl6000_base_params = { |
437 | .name = "6000 Series 2x2 AGN Gen2a", | ||
438 | .fw_name_pre = IWL6000G2A_FW_PRE, | ||
439 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
440 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
441 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
442 | .ops = &iwl6000_ops, | ||
443 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 475 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
444 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
445 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
446 | .num_of_queues = IWLAGN_NUM_QUEUES, | 476 | .num_of_queues = IWLAGN_NUM_QUEUES, |
447 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 477 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
448 | .mod_params = &iwlagn_mod_params, | ||
449 | .valid_tx_ant = ANT_AB, | ||
450 | .valid_rx_ant = ANT_AB, | ||
451 | .pll_cfg_val = 0, | 478 | .pll_cfg_val = 0, |
452 | .set_l0s = true, | 479 | .set_l0s = true, |
453 | .use_bsm = false, | 480 | .use_bsm = false, |
454 | .pa_type = IWL_PA_SYSTEM, | ||
455 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 481 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
456 | .shadow_ram_support = true, | 482 | .shadow_ram_support = true, |
457 | .ht_greenfield_support = true, | ||
458 | .led_compensation = 51, | 483 | .led_compensation = 51, |
459 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
460 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 484 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
461 | .supports_idle = true, | 485 | .supports_idle = true, |
462 | .adv_thermal_throttle = true, | 486 | .adv_thermal_throttle = true, |
@@ -468,29 +492,16 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = { | |||
468 | .ucode_tracing = true, | 492 | .ucode_tracing = true, |
469 | .sensitivity_calib_by_driver = true, | 493 | .sensitivity_calib_by_driver = true, |
470 | .chain_noise_calib_by_driver = true, | 494 | .chain_noise_calib_by_driver = true, |
471 | .need_dc_calib = true, | ||
472 | }; | 495 | }; |
473 | 496 | ||
474 | struct iwl_cfg iwl6000g2a_2abg_cfg = { | 497 | static struct iwl_base_params iwl6050_base_params = { |
475 | .name = "6000 Series 2x2 ABG Gen2a", | ||
476 | .fw_name_pre = IWL6000G2A_FW_PRE, | ||
477 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
478 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
479 | .sku = IWL_SKU_A|IWL_SKU_G, | ||
480 | .ops = &iwl6000_ops, | ||
481 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 498 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
482 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
483 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
484 | .num_of_queues = IWLAGN_NUM_QUEUES, | 499 | .num_of_queues = IWLAGN_NUM_QUEUES, |
485 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 500 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
486 | .mod_params = &iwlagn_mod_params, | ||
487 | .valid_tx_ant = ANT_AB, | ||
488 | .valid_rx_ant = ANT_AB, | ||
489 | .pll_cfg_val = 0, | 501 | .pll_cfg_val = 0, |
490 | .set_l0s = true, | 502 | .set_l0s = true, |
491 | .use_bsm = false, | 503 | .use_bsm = false, |
492 | .pa_type = IWL_PA_SYSTEM, | 504 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
493 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
494 | .shadow_ram_support = true, | 505 | .shadow_ram_support = true, |
495 | .led_compensation = 51, | 506 | .led_compensation = 51, |
496 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 507 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
@@ -498,11 +509,57 @@ struct iwl_cfg iwl6000g2a_2abg_cfg = { | |||
498 | .adv_thermal_throttle = true, | 509 | .adv_thermal_throttle = true, |
499 | .support_ct_kill_exit = true, | 510 | .support_ct_kill_exit = true, |
500 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | 511 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
501 | .chain_noise_scale = 1000, | 512 | .chain_noise_scale = 1500, |
502 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | 513 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
503 | .max_event_log_size = 512, | 514 | .max_event_log_size = 1024, |
515 | .ucode_tracing = true, | ||
504 | .sensitivity_calib_by_driver = true, | 516 | .sensitivity_calib_by_driver = true, |
505 | .chain_noise_calib_by_driver = true, | 517 | .chain_noise_calib_by_driver = true, |
518 | }; | ||
519 | |||
520 | static struct iwl_ht_params iwl6000_ht_params = { | ||
521 | .ht_greenfield_support = true, | ||
522 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
523 | }; | ||
524 | |||
525 | static struct iwl_bt_params iwl6000_bt_params = { | ||
526 | .bt_statistics = true, | ||
527 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
528 | .advanced_bt_coexist = true, | ||
529 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
530 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
531 | }; | ||
532 | |||
533 | struct iwl_cfg iwl6000g2a_2agn_cfg = { | ||
534 | .name = "6000 Series 2x2 AGN Gen2a", | ||
535 | .fw_name_pre = IWL6000G2A_FW_PRE, | ||
536 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
537 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
538 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
539 | .valid_tx_ant = ANT_AB, | ||
540 | .valid_rx_ant = ANT_AB, | ||
541 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
542 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
543 | .ops = &iwl6000_ops, | ||
544 | .mod_params = &iwlagn_mod_params, | ||
545 | .base_params = &iwl6000_base_params, | ||
546 | .ht_params = &iwl6000_ht_params, | ||
547 | .need_dc_calib = true, | ||
548 | }; | ||
549 | |||
550 | struct iwl_cfg iwl6000g2a_2abg_cfg = { | ||
551 | .name = "6000 Series 2x2 ABG Gen2a", | ||
552 | .fw_name_pre = IWL6000G2A_FW_PRE, | ||
553 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
554 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
555 | .sku = IWL_SKU_A|IWL_SKU_G, | ||
556 | .valid_tx_ant = ANT_AB, | ||
557 | .valid_rx_ant = ANT_AB, | ||
558 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
559 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
560 | .ops = &iwl6000_ops, | ||
561 | .mod_params = &iwlagn_mod_params, | ||
562 | .base_params = &iwl6000_base_params, | ||
506 | .need_dc_calib = true, | 563 | .need_dc_calib = true, |
507 | }; | 564 | }; |
508 | 565 | ||
@@ -512,32 +569,13 @@ struct iwl_cfg iwl6000g2a_2bg_cfg = { | |||
512 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 569 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
513 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 570 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
514 | .sku = IWL_SKU_G, | 571 | .sku = IWL_SKU_G, |
515 | .ops = &iwl6000_ops, | 572 | .valid_tx_ant = ANT_AB, |
516 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 573 | .valid_rx_ant = ANT_AB, |
517 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 574 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
518 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 575 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
519 | .num_of_queues = IWLAGN_NUM_QUEUES, | 576 | .ops = &iwl6000_ops, |
520 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
521 | .mod_params = &iwlagn_mod_params, | 577 | .mod_params = &iwlagn_mod_params, |
522 | .valid_tx_ant = ANT_AB, | 578 | .base_params = &iwl6000_base_params, |
523 | .valid_rx_ant = ANT_AB, | ||
524 | .pll_cfg_val = 0, | ||
525 | .set_l0s = true, | ||
526 | .use_bsm = false, | ||
527 | .pa_type = IWL_PA_SYSTEM, | ||
528 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
529 | .shadow_ram_support = true, | ||
530 | .led_compensation = 51, | ||
531 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
532 | .supports_idle = true, | ||
533 | .adv_thermal_throttle = true, | ||
534 | .support_ct_kill_exit = true, | ||
535 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
536 | .chain_noise_scale = 1000, | ||
537 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
538 | .max_event_log_size = 512, | ||
539 | .sensitivity_calib_by_driver = true, | ||
540 | .chain_noise_calib_by_driver = true, | ||
541 | .need_dc_calib = true, | 579 | .need_dc_calib = true, |
542 | }; | 580 | }; |
543 | 581 | ||
@@ -547,41 +585,18 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = { | |||
547 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 585 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
548 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 586 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
549 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 587 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
550 | .ops = &iwl6000g2b_ops, | 588 | .valid_tx_ant = ANT_AB, |
551 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 589 | .valid_rx_ant = ANT_AB, |
552 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 590 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
553 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 591 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
554 | .num_of_queues = IWLAGN_NUM_QUEUES, | 592 | .ops = &iwl6000g2b_ops, |
555 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
556 | .mod_params = &iwlagn_mod_params, | 593 | .mod_params = &iwlagn_mod_params, |
557 | .valid_tx_ant = ANT_AB, | 594 | .base_params = &iwl6000_base_params, |
558 | .valid_rx_ant = ANT_AB, | 595 | .bt_params = &iwl6000_bt_params, |
559 | .pll_cfg_val = 0, | 596 | .ht_params = &iwl6000_ht_params, |
560 | .set_l0s = true, | ||
561 | .use_bsm = false, | ||
562 | .pa_type = IWL_PA_SYSTEM, | ||
563 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
564 | .shadow_ram_support = true, | ||
565 | .ht_greenfield_support = true, | ||
566 | .led_compensation = 51, | ||
567 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
568 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
569 | .supports_idle = true, | ||
570 | .adv_thermal_throttle = true, | ||
571 | .support_ct_kill_exit = true, | ||
572 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
573 | .chain_noise_scale = 1000, | ||
574 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
575 | .max_event_log_size = 512, | ||
576 | .sensitivity_calib_by_driver = true, | ||
577 | .chain_noise_calib_by_driver = true, | ||
578 | .need_dc_calib = true, | 597 | .need_dc_calib = true, |
579 | .bt_statistics = true, | ||
580 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 598 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
581 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 599 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
582 | .advanced_bt_coexist = true, | ||
583 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
584 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
585 | }; | 600 | }; |
586 | 601 | ||
587 | struct iwl_cfg iwl6000g2b_2abg_cfg = { | 602 | struct iwl_cfg iwl6000g2b_2abg_cfg = { |
@@ -590,39 +605,17 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = { | |||
590 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 605 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
591 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 606 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
592 | .sku = IWL_SKU_A|IWL_SKU_G, | 607 | .sku = IWL_SKU_A|IWL_SKU_G, |
593 | .ops = &iwl6000g2b_ops, | 608 | .valid_tx_ant = ANT_AB, |
594 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 609 | .valid_rx_ant = ANT_AB, |
595 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 610 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
596 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 611 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
597 | .num_of_queues = IWLAGN_NUM_QUEUES, | 612 | .ops = &iwl6000g2b_ops, |
598 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
599 | .mod_params = &iwlagn_mod_params, | 613 | .mod_params = &iwlagn_mod_params, |
600 | .valid_tx_ant = ANT_AB, | 614 | .base_params = &iwl6000_base_params, |
601 | .valid_rx_ant = ANT_AB, | 615 | .bt_params = &iwl6000_bt_params, |
602 | .pll_cfg_val = 0, | ||
603 | .set_l0s = true, | ||
604 | .use_bsm = false, | ||
605 | .pa_type = IWL_PA_SYSTEM, | ||
606 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
607 | .shadow_ram_support = true, | ||
608 | .led_compensation = 51, | ||
609 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
610 | .supports_idle = true, | ||
611 | .adv_thermal_throttle = true, | ||
612 | .support_ct_kill_exit = true, | ||
613 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
614 | .chain_noise_scale = 1000, | ||
615 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
616 | .max_event_log_size = 512, | ||
617 | .sensitivity_calib_by_driver = true, | ||
618 | .chain_noise_calib_by_driver = true, | ||
619 | .need_dc_calib = true, | 616 | .need_dc_calib = true, |
620 | .bt_statistics = true, | ||
621 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 617 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
622 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 618 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
623 | .advanced_bt_coexist = true, | ||
624 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
625 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
626 | }; | 619 | }; |
627 | 620 | ||
628 | struct iwl_cfg iwl6000g2b_2bgn_cfg = { | 621 | struct iwl_cfg iwl6000g2b_2bgn_cfg = { |
@@ -631,41 +624,18 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = { | |||
631 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 624 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
632 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 625 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
633 | .sku = IWL_SKU_G|IWL_SKU_N, | 626 | .sku = IWL_SKU_G|IWL_SKU_N, |
634 | .ops = &iwl6000g2b_ops, | 627 | .valid_tx_ant = ANT_AB, |
635 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 628 | .valid_rx_ant = ANT_AB, |
636 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 629 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
637 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 630 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
638 | .num_of_queues = IWLAGN_NUM_QUEUES, | 631 | .ops = &iwl6000g2b_ops, |
639 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
640 | .mod_params = &iwlagn_mod_params, | 632 | .mod_params = &iwlagn_mod_params, |
641 | .valid_tx_ant = ANT_AB, | 633 | .base_params = &iwl6000_base_params, |
642 | .valid_rx_ant = ANT_AB, | 634 | .bt_params = &iwl6000_bt_params, |
643 | .pll_cfg_val = 0, | 635 | .ht_params = &iwl6000_ht_params, |
644 | .set_l0s = true, | ||
645 | .use_bsm = false, | ||
646 | .pa_type = IWL_PA_SYSTEM, | ||
647 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
648 | .shadow_ram_support = true, | ||
649 | .ht_greenfield_support = true, | ||
650 | .led_compensation = 51, | ||
651 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
652 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
653 | .supports_idle = true, | ||
654 | .adv_thermal_throttle = true, | ||
655 | .support_ct_kill_exit = true, | ||
656 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
657 | .chain_noise_scale = 1000, | ||
658 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
659 | .max_event_log_size = 512, | ||
660 | .sensitivity_calib_by_driver = true, | ||
661 | .chain_noise_calib_by_driver = true, | ||
662 | .need_dc_calib = true, | 636 | .need_dc_calib = true, |
663 | .bt_statistics = true, | ||
664 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 637 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
665 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 638 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
666 | .advanced_bt_coexist = true, | ||
667 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
668 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
669 | }; | 639 | }; |
670 | 640 | ||
671 | struct iwl_cfg iwl6000g2b_2bg_cfg = { | 641 | struct iwl_cfg iwl6000g2b_2bg_cfg = { |
@@ -674,39 +644,17 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = { | |||
674 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 644 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
675 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 645 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
676 | .sku = IWL_SKU_G, | 646 | .sku = IWL_SKU_G, |
677 | .ops = &iwl6000g2b_ops, | 647 | .valid_tx_ant = ANT_AB, |
678 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 648 | .valid_rx_ant = ANT_AB, |
679 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 649 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
680 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 650 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
681 | .num_of_queues = IWLAGN_NUM_QUEUES, | 651 | .ops = &iwl6000g2b_ops, |
682 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
683 | .mod_params = &iwlagn_mod_params, | 652 | .mod_params = &iwlagn_mod_params, |
684 | .valid_tx_ant = ANT_AB, | 653 | .base_params = &iwl6000_base_params, |
685 | .valid_rx_ant = ANT_AB, | 654 | .bt_params = &iwl6000_bt_params, |
686 | .pll_cfg_val = 0, | ||
687 | .set_l0s = true, | ||
688 | .use_bsm = false, | ||
689 | .pa_type = IWL_PA_SYSTEM, | ||
690 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
691 | .shadow_ram_support = true, | ||
692 | .led_compensation = 51, | ||
693 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
694 | .supports_idle = true, | ||
695 | .adv_thermal_throttle = true, | ||
696 | .support_ct_kill_exit = true, | ||
697 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
698 | .chain_noise_scale = 1000, | ||
699 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
700 | .max_event_log_size = 512, | ||
701 | .sensitivity_calib_by_driver = true, | ||
702 | .chain_noise_calib_by_driver = true, | ||
703 | .need_dc_calib = true, | 655 | .need_dc_calib = true, |
704 | .bt_statistics = true, | ||
705 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 656 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
706 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 657 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
707 | .advanced_bt_coexist = true, | ||
708 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
709 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
710 | }; | 658 | }; |
711 | 659 | ||
712 | struct iwl_cfg iwl6000g2b_bgn_cfg = { | 660 | struct iwl_cfg iwl6000g2b_bgn_cfg = { |
@@ -715,41 +663,18 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = { | |||
715 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 663 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
716 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 664 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
717 | .sku = IWL_SKU_G|IWL_SKU_N, | 665 | .sku = IWL_SKU_G|IWL_SKU_N, |
718 | .ops = &iwl6000g2b_ops, | 666 | .valid_tx_ant = ANT_A, |
719 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 667 | .valid_rx_ant = ANT_AB, |
720 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 668 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
721 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 669 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
722 | .num_of_queues = IWLAGN_NUM_QUEUES, | 670 | .ops = &iwl6000g2b_ops, |
723 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
724 | .mod_params = &iwlagn_mod_params, | 671 | .mod_params = &iwlagn_mod_params, |
725 | .valid_tx_ant = ANT_A, | 672 | .base_params = &iwl6000_base_params, |
726 | .valid_rx_ant = ANT_AB, | 673 | .bt_params = &iwl6000_bt_params, |
727 | .pll_cfg_val = 0, | 674 | .ht_params = &iwl6000_ht_params, |
728 | .set_l0s = true, | ||
729 | .use_bsm = false, | ||
730 | .pa_type = IWL_PA_SYSTEM, | ||
731 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
732 | .shadow_ram_support = true, | ||
733 | .ht_greenfield_support = true, | ||
734 | .led_compensation = 51, | ||
735 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
736 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
737 | .supports_idle = true, | ||
738 | .adv_thermal_throttle = true, | ||
739 | .support_ct_kill_exit = true, | ||
740 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
741 | .chain_noise_scale = 1000, | ||
742 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
743 | .max_event_log_size = 512, | ||
744 | .sensitivity_calib_by_driver = true, | ||
745 | .chain_noise_calib_by_driver = true, | ||
746 | .need_dc_calib = true, | 675 | .need_dc_calib = true, |
747 | .bt_statistics = true, | ||
748 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 676 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
749 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 677 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
750 | .advanced_bt_coexist = true, | ||
751 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
752 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
753 | }; | 678 | }; |
754 | 679 | ||
755 | struct iwl_cfg iwl6000g2b_bg_cfg = { | 680 | struct iwl_cfg iwl6000g2b_bg_cfg = { |
@@ -758,39 +683,17 @@ struct iwl_cfg iwl6000g2b_bg_cfg = { | |||
758 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 683 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
759 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 684 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
760 | .sku = IWL_SKU_G, | 685 | .sku = IWL_SKU_G, |
761 | .ops = &iwl6000g2b_ops, | 686 | .valid_tx_ant = ANT_A, |
762 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 687 | .valid_rx_ant = ANT_AB, |
763 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 688 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
764 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 689 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
765 | .num_of_queues = IWLAGN_NUM_QUEUES, | 690 | .ops = &iwl6000g2b_ops, |
766 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
767 | .mod_params = &iwlagn_mod_params, | 691 | .mod_params = &iwlagn_mod_params, |
768 | .valid_tx_ant = ANT_A, | 692 | .base_params = &iwl6000_base_params, |
769 | .valid_rx_ant = ANT_AB, | 693 | .bt_params = &iwl6000_bt_params, |
770 | .pll_cfg_val = 0, | ||
771 | .set_l0s = true, | ||
772 | .use_bsm = false, | ||
773 | .pa_type = IWL_PA_SYSTEM, | ||
774 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
775 | .shadow_ram_support = true, | ||
776 | .led_compensation = 51, | ||
777 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
778 | .supports_idle = true, | ||
779 | .adv_thermal_throttle = true, | ||
780 | .support_ct_kill_exit = true, | ||
781 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
782 | .chain_noise_scale = 1000, | ||
783 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
784 | .max_event_log_size = 512, | ||
785 | .sensitivity_calib_by_driver = true, | ||
786 | .chain_noise_calib_by_driver = true, | ||
787 | .need_dc_calib = true, | 694 | .need_dc_calib = true, |
788 | .bt_statistics = true, | ||
789 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 695 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
790 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 696 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
791 | .advanced_bt_coexist = true, | ||
792 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
793 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
794 | }; | 697 | }; |
795 | 698 | ||
796 | /* | 699 | /* |
@@ -802,35 +705,15 @@ struct iwl_cfg iwl6000i_2agn_cfg = { | |||
802 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 705 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
803 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 706 | .ucode_api_min = IWL6000_UCODE_API_MIN, |
804 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 707 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
805 | .ops = &iwl6000_ops, | 708 | .valid_tx_ant = ANT_BC, |
806 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 709 | .valid_rx_ant = ANT_BC, |
807 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 710 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
808 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 711 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
809 | .num_of_queues = IWLAGN_NUM_QUEUES, | 712 | .ops = &iwl6000_ops, |
810 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
811 | .mod_params = &iwlagn_mod_params, | 713 | .mod_params = &iwlagn_mod_params, |
812 | .valid_tx_ant = ANT_BC, | 714 | .base_params = &iwl6000_base_params, |
813 | .valid_rx_ant = ANT_BC, | 715 | .ht_params = &iwl6000_ht_params, |
814 | .pll_cfg_val = 0, | ||
815 | .set_l0s = true, | ||
816 | .use_bsm = false, | ||
817 | .pa_type = IWL_PA_INTERNAL, | 716 | .pa_type = IWL_PA_INTERNAL, |
818 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
819 | .shadow_ram_support = true, | ||
820 | .ht_greenfield_support = true, | ||
821 | .led_compensation = 51, | ||
822 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
823 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
824 | .supports_idle = true, | ||
825 | .adv_thermal_throttle = true, | ||
826 | .support_ct_kill_exit = true, | ||
827 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
828 | .chain_noise_scale = 1000, | ||
829 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
830 | .max_event_log_size = 1024, | ||
831 | .ucode_tracing = true, | ||
832 | .sensitivity_calib_by_driver = true, | ||
833 | .chain_noise_calib_by_driver = true, | ||
834 | }; | 717 | }; |
835 | 718 | ||
836 | struct iwl_cfg iwl6000i_2abg_cfg = { | 719 | struct iwl_cfg iwl6000i_2abg_cfg = { |
@@ -839,33 +722,14 @@ struct iwl_cfg iwl6000i_2abg_cfg = { | |||
839 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 722 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
840 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 723 | .ucode_api_min = IWL6000_UCODE_API_MIN, |
841 | .sku = IWL_SKU_A|IWL_SKU_G, | 724 | .sku = IWL_SKU_A|IWL_SKU_G, |
842 | .ops = &iwl6000_ops, | 725 | .valid_tx_ant = ANT_BC, |
843 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 726 | .valid_rx_ant = ANT_BC, |
844 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 727 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
845 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 728 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
846 | .num_of_queues = IWLAGN_NUM_QUEUES, | 729 | .ops = &iwl6000_ops, |
847 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
848 | .mod_params = &iwlagn_mod_params, | 730 | .mod_params = &iwlagn_mod_params, |
849 | .valid_tx_ant = ANT_BC, | 731 | .base_params = &iwl6000_base_params, |
850 | .valid_rx_ant = ANT_BC, | ||
851 | .pll_cfg_val = 0, | ||
852 | .set_l0s = true, | ||
853 | .use_bsm = false, | ||
854 | .pa_type = IWL_PA_INTERNAL, | 732 | .pa_type = IWL_PA_INTERNAL, |
855 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
856 | .shadow_ram_support = true, | ||
857 | .led_compensation = 51, | ||
858 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
859 | .supports_idle = true, | ||
860 | .adv_thermal_throttle = true, | ||
861 | .support_ct_kill_exit = true, | ||
862 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
863 | .chain_noise_scale = 1000, | ||
864 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
865 | .max_event_log_size = 1024, | ||
866 | .ucode_tracing = true, | ||
867 | .sensitivity_calib_by_driver = true, | ||
868 | .chain_noise_calib_by_driver = true, | ||
869 | }; | 733 | }; |
870 | 734 | ||
871 | struct iwl_cfg iwl6000i_2bg_cfg = { | 735 | struct iwl_cfg iwl6000i_2bg_cfg = { |
@@ -874,33 +738,14 @@ struct iwl_cfg iwl6000i_2bg_cfg = { | |||
874 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 738 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
875 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 739 | .ucode_api_min = IWL6000_UCODE_API_MIN, |
876 | .sku = IWL_SKU_G, | 740 | .sku = IWL_SKU_G, |
877 | .ops = &iwl6000_ops, | 741 | .valid_tx_ant = ANT_BC, |
878 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 742 | .valid_rx_ant = ANT_BC, |
879 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 743 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
880 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 744 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
881 | .num_of_queues = IWLAGN_NUM_QUEUES, | 745 | .ops = &iwl6000_ops, |
882 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
883 | .mod_params = &iwlagn_mod_params, | 746 | .mod_params = &iwlagn_mod_params, |
884 | .valid_tx_ant = ANT_BC, | 747 | .base_params = &iwl6000_base_params, |
885 | .valid_rx_ant = ANT_BC, | ||
886 | .pll_cfg_val = 0, | ||
887 | .set_l0s = true, | ||
888 | .use_bsm = false, | ||
889 | .pa_type = IWL_PA_INTERNAL, | 748 | .pa_type = IWL_PA_INTERNAL, |
890 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
891 | .shadow_ram_support = true, | ||
892 | .led_compensation = 51, | ||
893 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
894 | .supports_idle = true, | ||
895 | .adv_thermal_throttle = true, | ||
896 | .support_ct_kill_exit = true, | ||
897 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
898 | .chain_noise_scale = 1000, | ||
899 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
900 | .max_event_log_size = 1024, | ||
901 | .ucode_tracing = true, | ||
902 | .sensitivity_calib_by_driver = true, | ||
903 | .chain_noise_calib_by_driver = true, | ||
904 | }; | 749 | }; |
905 | 750 | ||
906 | struct iwl_cfg iwl6050_2agn_cfg = { | 751 | struct iwl_cfg iwl6050_2agn_cfg = { |
@@ -909,35 +754,14 @@ struct iwl_cfg iwl6050_2agn_cfg = { | |||
909 | .ucode_api_max = IWL6050_UCODE_API_MAX, | 754 | .ucode_api_max = IWL6050_UCODE_API_MAX, |
910 | .ucode_api_min = IWL6050_UCODE_API_MIN, | 755 | .ucode_api_min = IWL6050_UCODE_API_MIN, |
911 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 756 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
757 | .valid_tx_ant = ANT_AB, | ||
758 | .valid_rx_ant = ANT_AB, | ||
912 | .ops = &iwl6000_ops, | 759 | .ops = &iwl6000_ops, |
913 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | ||
914 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, | 760 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
915 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, | 761 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, |
916 | .num_of_queues = IWLAGN_NUM_QUEUES, | ||
917 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
918 | .mod_params = &iwlagn_mod_params, | 762 | .mod_params = &iwlagn_mod_params, |
919 | .valid_tx_ant = ANT_AB, | 763 | .base_params = &iwl6050_base_params, |
920 | .valid_rx_ant = ANT_AB, | 764 | .ht_params = &iwl6000_ht_params, |
921 | .pll_cfg_val = 0, | ||
922 | .set_l0s = true, | ||
923 | .use_bsm = false, | ||
924 | .pa_type = IWL_PA_SYSTEM, | ||
925 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, | ||
926 | .shadow_ram_support = true, | ||
927 | .ht_greenfield_support = true, | ||
928 | .led_compensation = 51, | ||
929 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
930 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
931 | .supports_idle = true, | ||
932 | .adv_thermal_throttle = true, | ||
933 | .support_ct_kill_exit = true, | ||
934 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
935 | .chain_noise_scale = 1500, | ||
936 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
937 | .max_event_log_size = 1024, | ||
938 | .ucode_tracing = true, | ||
939 | .sensitivity_calib_by_driver = true, | ||
940 | .chain_noise_calib_by_driver = true, | ||
941 | .need_dc_calib = true, | 765 | .need_dc_calib = true, |
942 | }; | 766 | }; |
943 | 767 | ||
@@ -947,35 +771,14 @@ struct iwl_cfg iwl6050g2_bgn_cfg = { | |||
947 | .ucode_api_max = IWL6050_UCODE_API_MAX, | 771 | .ucode_api_max = IWL6050_UCODE_API_MAX, |
948 | .ucode_api_min = IWL6050_UCODE_API_MIN, | 772 | .ucode_api_min = IWL6050_UCODE_API_MIN, |
949 | .sku = IWL_SKU_G|IWL_SKU_N, | 773 | .sku = IWL_SKU_G|IWL_SKU_N, |
950 | .ops = &iwl6000_ops, | 774 | .valid_tx_ant = ANT_A, |
951 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 775 | .valid_rx_ant = ANT_AB, |
952 | .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION, | 776 | .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION, |
953 | .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION, | 777 | .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION, |
954 | .num_of_queues = IWLAGN_NUM_QUEUES, | 778 | .ops = &iwl6050g2_ops, |
955 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
956 | .mod_params = &iwlagn_mod_params, | 779 | .mod_params = &iwlagn_mod_params, |
957 | .valid_tx_ant = ANT_A, | 780 | .base_params = &iwl6050_base_params, |
958 | .valid_rx_ant = ANT_AB, | 781 | .ht_params = &iwl6000_ht_params, |
959 | .pll_cfg_val = 0, | ||
960 | .set_l0s = true, | ||
961 | .use_bsm = false, | ||
962 | .pa_type = IWL_PA_SYSTEM, | ||
963 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, | ||
964 | .shadow_ram_support = true, | ||
965 | .ht_greenfield_support = true, | ||
966 | .led_compensation = 51, | ||
967 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
968 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
969 | .supports_idle = true, | ||
970 | .adv_thermal_throttle = true, | ||
971 | .support_ct_kill_exit = true, | ||
972 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
973 | .chain_noise_scale = 1500, | ||
974 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
975 | .max_event_log_size = 1024, | ||
976 | .ucode_tracing = true, | ||
977 | .sensitivity_calib_by_driver = true, | ||
978 | .chain_noise_calib_by_driver = true, | ||
979 | .need_dc_calib = true, | 782 | .need_dc_calib = true, |
980 | }; | 783 | }; |
981 | 784 | ||
@@ -985,33 +788,13 @@ struct iwl_cfg iwl6050_2abg_cfg = { | |||
985 | .ucode_api_max = IWL6050_UCODE_API_MAX, | 788 | .ucode_api_max = IWL6050_UCODE_API_MAX, |
986 | .ucode_api_min = IWL6050_UCODE_API_MIN, | 789 | .ucode_api_min = IWL6050_UCODE_API_MIN, |
987 | .sku = IWL_SKU_A|IWL_SKU_G, | 790 | .sku = IWL_SKU_A|IWL_SKU_G, |
988 | .ops = &iwl6000_ops, | 791 | .valid_tx_ant = ANT_AB, |
989 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 792 | .valid_rx_ant = ANT_AB, |
990 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, | 793 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
991 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, | 794 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, |
992 | .num_of_queues = IWLAGN_NUM_QUEUES, | 795 | .ops = &iwl6050_ops, |
993 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
994 | .mod_params = &iwlagn_mod_params, | 796 | .mod_params = &iwlagn_mod_params, |
995 | .valid_tx_ant = ANT_AB, | 797 | .base_params = &iwl6050_base_params, |
996 | .valid_rx_ant = ANT_AB, | ||
997 | .pll_cfg_val = 0, | ||
998 | .set_l0s = true, | ||
999 | .use_bsm = false, | ||
1000 | .pa_type = IWL_PA_SYSTEM, | ||
1001 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, | ||
1002 | .shadow_ram_support = true, | ||
1003 | .led_compensation = 51, | ||
1004 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
1005 | .supports_idle = true, | ||
1006 | .adv_thermal_throttle = true, | ||
1007 | .support_ct_kill_exit = true, | ||
1008 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
1009 | .chain_noise_scale = 1500, | ||
1010 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
1011 | .max_event_log_size = 1024, | ||
1012 | .ucode_tracing = true, | ||
1013 | .sensitivity_calib_by_driver = true, | ||
1014 | .chain_noise_calib_by_driver = true, | ||
1015 | .need_dc_calib = true, | 798 | .need_dc_calib = true, |
1016 | }; | 799 | }; |
1017 | 800 | ||
@@ -1021,38 +804,58 @@ struct iwl_cfg iwl6000_3agn_cfg = { | |||
1021 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 804 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
1022 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 805 | .ucode_api_min = IWL6000_UCODE_API_MIN, |
1023 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 806 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
1024 | .ops = &iwl6000_ops, | 807 | .valid_tx_ant = ANT_ABC, |
1025 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 808 | .valid_rx_ant = ANT_ABC, |
1026 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 809 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
1027 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 810 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
1028 | .num_of_queues = IWLAGN_NUM_QUEUES, | 811 | .ops = &iwl6000_ops, |
1029 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
1030 | .mod_params = &iwlagn_mod_params, | 812 | .mod_params = &iwlagn_mod_params, |
1031 | .valid_tx_ant = ANT_ABC, | 813 | .base_params = &iwl6000_base_params, |
1032 | .valid_rx_ant = ANT_ABC, | 814 | .ht_params = &iwl6000_ht_params, |
1033 | .pll_cfg_val = 0, | 815 | .need_dc_calib = true, |
1034 | .set_l0s = true, | 816 | }; |
1035 | .use_bsm = false, | 817 | |
1036 | .pa_type = IWL_PA_SYSTEM, | 818 | struct iwl_cfg iwl130_bgn_cfg = { |
1037 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 819 | .name = "Intel(R) 130 Series 1x1 BGN", |
1038 | .shadow_ram_support = true, | 820 | .fw_name_pre = IWL6000G2B_FW_PRE, |
1039 | .ht_greenfield_support = true, | 821 | .ucode_api_max = IWL130_UCODE_API_MAX, |
1040 | .led_compensation = 51, | 822 | .ucode_api_min = IWL130_UCODE_API_MIN, |
1041 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | 823 | .sku = IWL_SKU_G|IWL_SKU_N, |
1042 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 824 | .valid_tx_ant = ANT_A, |
1043 | .supports_idle = true, | 825 | .valid_rx_ant = ANT_A, |
1044 | .adv_thermal_throttle = true, | 826 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
1045 | .support_ct_kill_exit = true, | 827 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
1046 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | 828 | .ops = &iwl6000g2b_ops, |
1047 | .chain_noise_scale = 1000, | 829 | .mod_params = &iwlagn_mod_params, |
1048 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | 830 | .base_params = &iwl6000_base_params, |
1049 | .max_event_log_size = 1024, | 831 | .bt_params = &iwl6000_bt_params, |
1050 | .ucode_tracing = true, | 832 | .ht_params = &iwl6000_ht_params, |
1051 | .sensitivity_calib_by_driver = true, | 833 | .need_dc_calib = true, |
1052 | .chain_noise_calib_by_driver = true, | 834 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
835 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | ||
836 | }; | ||
837 | |||
838 | struct iwl_cfg iwl130_bg_cfg = { | ||
839 | .name = "Intel(R) 130 Series 1x2 BG", | ||
840 | .fw_name_pre = IWL6000G2B_FW_PRE, | ||
841 | .ucode_api_max = IWL130_UCODE_API_MAX, | ||
842 | .ucode_api_min = IWL130_UCODE_API_MIN, | ||
843 | .sku = IWL_SKU_G, | ||
844 | .valid_tx_ant = ANT_A, | ||
845 | .valid_rx_ant = ANT_A, | ||
846 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
847 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
848 | .ops = &iwl6000g2b_ops, | ||
849 | .mod_params = &iwlagn_mod_params, | ||
850 | .base_params = &iwl6000_base_params, | ||
851 | .bt_params = &iwl6000_bt_params, | ||
852 | .need_dc_calib = true, | ||
853 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
854 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | ||
1053 | }; | 855 | }; |
1054 | 856 | ||
1055 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); | 857 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |
1056 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); | 858 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); |
1057 | MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); | 859 | MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); |
1058 | MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); | 860 | MODULE_FIRMWARE(IWL6000G2B_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); |
861 | MODULE_FIRMWARE(IWL130_MODULE_FIRMWARE(IWL130_UCODE_API_MAX)); | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c index 84ad62958535..4c5ab783737f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-calib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-calib.c | |||
@@ -631,7 +631,8 @@ void iwl_sensitivity_calibration(struct iwl_priv *priv, void *resp) | |||
631 | } | 631 | } |
632 | 632 | ||
633 | spin_lock_irqsave(&priv->lock, flags); | 633 | spin_lock_irqsave(&priv->lock, flags); |
634 | if (priv->cfg->bt_statistics) { | 634 | if (priv->cfg->bt_params && |
635 | priv->cfg->bt_params->bt_statistics) { | ||
635 | rx_info = &(((struct iwl_bt_notif_statistics *)resp)-> | 636 | rx_info = &(((struct iwl_bt_notif_statistics *)resp)-> |
636 | rx.general.common); | 637 | rx.general.common); |
637 | ofdm = &(((struct iwl_bt_notif_statistics *)resp)->rx.ofdm); | 638 | ofdm = &(((struct iwl_bt_notif_statistics *)resp)->rx.ofdm); |
@@ -786,7 +787,8 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, void *stat_resp) | |||
786 | } | 787 | } |
787 | 788 | ||
788 | spin_lock_irqsave(&priv->lock, flags); | 789 | spin_lock_irqsave(&priv->lock, flags); |
789 | if (priv->cfg->bt_statistics) { | 790 | if (priv->cfg->bt_params && |
791 | priv->cfg->bt_params->bt_statistics) { | ||
790 | rx_info = &(((struct iwl_bt_notif_statistics *)stat_resp)-> | 792 | rx_info = &(((struct iwl_bt_notif_statistics *)stat_resp)-> |
791 | rx.general.common); | 793 | rx.general.common); |
792 | } else { | 794 | } else { |
@@ -801,7 +803,8 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, void *stat_resp) | |||
801 | 803 | ||
802 | rxon_band24 = !!(ctx->staging.flags & RXON_FLG_BAND_24G_MSK); | 804 | rxon_band24 = !!(ctx->staging.flags & RXON_FLG_BAND_24G_MSK); |
803 | rxon_chnum = le16_to_cpu(ctx->staging.channel); | 805 | rxon_chnum = le16_to_cpu(ctx->staging.channel); |
804 | if (priv->cfg->bt_statistics) { | 806 | if (priv->cfg->bt_params && |
807 | priv->cfg->bt_params->bt_statistics) { | ||
805 | stat_band24 = !!(((struct iwl_bt_notif_statistics *) | 808 | stat_band24 = !!(((struct iwl_bt_notif_statistics *) |
806 | stat_resp)->flag & | 809 | stat_resp)->flag & |
807 | STATISTICS_REPLY_FLG_BAND_24G_MSK); | 810 | STATISTICS_REPLY_FLG_BAND_24G_MSK); |
@@ -861,16 +864,17 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, void *stat_resp) | |||
861 | /* If this is the "chain_noise_num_beacons", determine: | 864 | /* If this is the "chain_noise_num_beacons", determine: |
862 | * 1) Disconnected antennas (using signal strengths) | 865 | * 1) Disconnected antennas (using signal strengths) |
863 | * 2) Differential gain (using silence noise) to balance receivers */ | 866 | * 2) Differential gain (using silence noise) to balance receivers */ |
864 | if (data->beacon_count != priv->cfg->chain_noise_num_beacons) | 867 | if (data->beacon_count != |
868 | priv->cfg->base_params->chain_noise_num_beacons) | ||
865 | return; | 869 | return; |
866 | 870 | ||
867 | /* Analyze signal for disconnected antenna */ | 871 | /* Analyze signal for disconnected antenna */ |
868 | average_sig[0] = | 872 | average_sig[0] = data->chain_signal_a / |
869 | (data->chain_signal_a) / priv->cfg->chain_noise_num_beacons; | 873 | priv->cfg->base_params->chain_noise_num_beacons; |
870 | average_sig[1] = | 874 | average_sig[1] = data->chain_signal_b / |
871 | (data->chain_signal_b) / priv->cfg->chain_noise_num_beacons; | 875 | priv->cfg->base_params->chain_noise_num_beacons; |
872 | average_sig[2] = | 876 | average_sig[2] = data->chain_signal_c / |
873 | (data->chain_signal_c) / priv->cfg->chain_noise_num_beacons; | 877 | priv->cfg->base_params->chain_noise_num_beacons; |
874 | 878 | ||
875 | if (average_sig[0] >= average_sig[1]) { | 879 | if (average_sig[0] >= average_sig[1]) { |
876 | max_average_sig = average_sig[0]; | 880 | max_average_sig = average_sig[0]; |
@@ -920,7 +924,9 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, void *stat_resp) | |||
920 | * To be safe, simply mask out any chains that we know | 924 | * To be safe, simply mask out any chains that we know |
921 | * are not on the device. | 925 | * are not on the device. |
922 | */ | 926 | */ |
923 | if (priv->cfg->advanced_bt_coexist && priv->bt_full_concurrent) { | 927 | if (priv->cfg->bt_params && |
928 | priv->cfg->bt_params->advanced_bt_coexist && | ||
929 | priv->bt_full_concurrent) { | ||
924 | /* operated as 1x1 in full concurrency mode */ | 930 | /* operated as 1x1 in full concurrency mode */ |
925 | active_chains &= first_antenna(priv->hw_params.valid_rx_ant); | 931 | active_chains &= first_antenna(priv->hw_params.valid_rx_ant); |
926 | } else | 932 | } else |
@@ -967,12 +973,12 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv, void *stat_resp) | |||
967 | active_chains); | 973 | active_chains); |
968 | 974 | ||
969 | /* Analyze noise for rx balance */ | 975 | /* Analyze noise for rx balance */ |
970 | average_noise[0] = | 976 | average_noise[0] = data->chain_noise_a / |
971 | ((data->chain_noise_a) / priv->cfg->chain_noise_num_beacons); | 977 | priv->cfg->base_params->chain_noise_num_beacons; |
972 | average_noise[1] = | 978 | average_noise[1] = data->chain_noise_b / |
973 | ((data->chain_noise_b) / priv->cfg->chain_noise_num_beacons); | 979 | priv->cfg->base_params->chain_noise_num_beacons; |
974 | average_noise[2] = | 980 | average_noise[2] = data->chain_noise_c / |
975 | ((data->chain_noise_c) / priv->cfg->chain_noise_num_beacons); | 981 | priv->cfg->base_params->chain_noise_num_beacons; |
976 | 982 | ||
977 | for (i = 0; i < NUM_RX_CHAINS; i++) { | 983 | for (i = 0; i < NUM_RX_CHAINS; i++) { |
978 | if (!(data->disconn_array[i]) && | 984 | if (!(data->disconn_array[i]) && |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c index 5391b4627397..a358d4334a1a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | |||
@@ -39,7 +39,8 @@ static int iwl_statistics_flag(struct iwl_priv *priv, char *buf, int bufsz) | |||
39 | int p = 0; | 39 | int p = 0; |
40 | u32 flag; | 40 | u32 flag; |
41 | 41 | ||
42 | if (priv->cfg->bt_statistics) | 42 | if (priv->cfg->bt_params && |
43 | priv->cfg->bt_params->bt_statistics) | ||
43 | flag = le32_to_cpu(priv->_agn.statistics_bt.flag); | 44 | flag = le32_to_cpu(priv->_agn.statistics_bt.flag); |
44 | else | 45 | else |
45 | flag = le32_to_cpu(priv->_agn.statistics.flag); | 46 | flag = le32_to_cpu(priv->_agn.statistics.flag); |
@@ -88,7 +89,8 @@ ssize_t iwl_ucode_rx_stats_read(struct file *file, char __user *user_buf, | |||
88 | * the last statistics notification from uCode | 89 | * the last statistics notification from uCode |
89 | * might not reflect the current uCode activity | 90 | * might not reflect the current uCode activity |
90 | */ | 91 | */ |
91 | if (priv->cfg->bt_statistics) { | 92 | if (priv->cfg->bt_params && |
93 | priv->cfg->bt_params->bt_statistics) { | ||
92 | ofdm = &priv->_agn.statistics_bt.rx.ofdm; | 94 | ofdm = &priv->_agn.statistics_bt.rx.ofdm; |
93 | cck = &priv->_agn.statistics_bt.rx.cck; | 95 | cck = &priv->_agn.statistics_bt.rx.cck; |
94 | general = &priv->_agn.statistics_bt.rx.general.common; | 96 | general = &priv->_agn.statistics_bt.rx.general.common; |
@@ -534,7 +536,8 @@ ssize_t iwl_ucode_tx_stats_read(struct file *file, | |||
534 | * the last statistics notification from uCode | 536 | * the last statistics notification from uCode |
535 | * might not reflect the current uCode activity | 537 | * might not reflect the current uCode activity |
536 | */ | 538 | */ |
537 | if (priv->cfg->bt_statistics) { | 539 | if (priv->cfg->bt_params && |
540 | priv->cfg->bt_params->bt_statistics) { | ||
538 | tx = &priv->_agn.statistics_bt.tx; | 541 | tx = &priv->_agn.statistics_bt.tx; |
539 | accum_tx = &priv->_agn.accum_statistics_bt.tx; | 542 | accum_tx = &priv->_agn.accum_statistics_bt.tx; |
540 | delta_tx = &priv->_agn.delta_statistics_bt.tx; | 543 | delta_tx = &priv->_agn.delta_statistics_bt.tx; |
@@ -734,7 +737,8 @@ ssize_t iwl_ucode_general_stats_read(struct file *file, char __user *user_buf, | |||
734 | * the last statistics notification from uCode | 737 | * the last statistics notification from uCode |
735 | * might not reflect the current uCode activity | 738 | * might not reflect the current uCode activity |
736 | */ | 739 | */ |
737 | if (priv->cfg->bt_statistics) { | 740 | if (priv->cfg->bt_params && |
741 | priv->cfg->bt_params->bt_statistics) { | ||
738 | general = &priv->_agn.statistics_bt.general.common; | 742 | general = &priv->_agn.statistics_bt.general.common; |
739 | dbg = &priv->_agn.statistics_bt.general.common.dbg; | 743 | dbg = &priv->_agn.statistics_bt.general.common.dbg; |
740 | div = &priv->_agn.statistics_bt.general.common.div; | 744 | div = &priv->_agn.statistics_bt.general.common.div; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c index d86902b83630..9ca6c91eaae6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | |||
@@ -137,7 +137,7 @@ static void iwlagn_gain_computation(struct iwl_priv *priv, | |||
137 | continue; | 137 | continue; |
138 | } | 138 | } |
139 | 139 | ||
140 | delta_g = (priv->cfg->chain_noise_scale * | 140 | delta_g = (priv->cfg->base_params->chain_noise_scale * |
141 | ((s32)average_noise[default_chain] - | 141 | ((s32)average_noise[default_chain] - |
142 | (s32)average_noise[i])) / 1500; | 142 | (s32)average_noise[i])) / 1500; |
143 | 143 | ||
@@ -222,7 +222,8 @@ static void iwlagn_tx_cmd_protection(struct iwl_priv *priv, | |||
222 | return; | 222 | return; |
223 | } | 223 | } |
224 | 224 | ||
225 | if (priv->cfg->use_rts_for_aggregation && | 225 | if (priv->cfg->ht_params && |
226 | priv->cfg->ht_params->use_rts_for_aggregation && | ||
226 | info->flags & IEEE80211_TX_CTL_AMPDU) { | 227 | info->flags & IEEE80211_TX_CTL_AMPDU) { |
227 | *tx_flags |= TX_CMD_FLG_PROT_REQUIRE_MSK; | 228 | *tx_flags |= TX_CMD_FLG_PROT_REQUIRE_MSK; |
228 | return; | 229 | return; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c index c92b2c0cbd91..a5dbfea1bfad 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-ict.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ict.c | |||
@@ -59,7 +59,7 @@ void iwl_free_isr_ict(struct iwl_priv *priv) | |||
59 | int iwl_alloc_isr_ict(struct iwl_priv *priv) | 59 | int iwl_alloc_isr_ict(struct iwl_priv *priv) |
60 | { | 60 | { |
61 | 61 | ||
62 | if (priv->cfg->use_isr_legacy) | 62 | if (priv->cfg->base_params->use_isr_legacy) |
63 | return 0; | 63 | return 0; |
64 | /* allocate shrared data table */ | 64 | /* allocate shrared data table */ |
65 | priv->_agn.ict_tbl_vir = | 65 | priv->_agn.ict_tbl_vir = |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 299fd9d59604..f5445d575fec 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -40,7 +40,7 @@ | |||
40 | #include "iwl-agn.h" | 40 | #include "iwl-agn.h" |
41 | #include "iwl-sta.h" | 41 | #include "iwl-sta.h" |
42 | 42 | ||
43 | static inline u32 iwlagn_get_scd_ssn(struct iwl5000_tx_resp *tx_resp) | 43 | static inline u32 iwlagn_get_scd_ssn(struct iwlagn_tx_resp *tx_resp) |
44 | { | 44 | { |
45 | return le32_to_cpup((__le32 *)&tx_resp->status + | 45 | return le32_to_cpup((__le32 *)&tx_resp->status + |
46 | tx_resp->frame_count) & MAX_SN; | 46 | tx_resp->frame_count) & MAX_SN; |
@@ -172,7 +172,7 @@ static void iwlagn_count_agg_tx_err_status(struct iwl_priv *priv, u16 status) | |||
172 | 172 | ||
173 | static void iwlagn_set_tx_status(struct iwl_priv *priv, | 173 | static void iwlagn_set_tx_status(struct iwl_priv *priv, |
174 | struct ieee80211_tx_info *info, | 174 | struct ieee80211_tx_info *info, |
175 | struct iwl5000_tx_resp *tx_resp, | 175 | struct iwlagn_tx_resp *tx_resp, |
176 | int txq_id, bool is_agg) | 176 | int txq_id, bool is_agg) |
177 | { | 177 | { |
178 | u16 status = le16_to_cpu(tx_resp->status.status); | 178 | u16 status = le16_to_cpu(tx_resp->status.status); |
@@ -223,7 +223,7 @@ const char *iwl_get_agg_tx_fail_reason(u16 status) | |||
223 | 223 | ||
224 | static int iwlagn_tx_status_reply_tx(struct iwl_priv *priv, | 224 | static int iwlagn_tx_status_reply_tx(struct iwl_priv *priv, |
225 | struct iwl_ht_agg *agg, | 225 | struct iwl_ht_agg *agg, |
226 | struct iwl5000_tx_resp *tx_resp, | 226 | struct iwlagn_tx_resp *tx_resp, |
227 | int txq_id, u16 start_idx) | 227 | int txq_id, u16 start_idx) |
228 | { | 228 | { |
229 | u16 status; | 229 | u16 status; |
@@ -390,7 +390,7 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv, | |||
390 | int index = SEQ_TO_INDEX(sequence); | 390 | int index = SEQ_TO_INDEX(sequence); |
391 | struct iwl_tx_queue *txq = &priv->txq[txq_id]; | 391 | struct iwl_tx_queue *txq = &priv->txq[txq_id]; |
392 | struct ieee80211_tx_info *info; | 392 | struct ieee80211_tx_info *info; |
393 | struct iwl5000_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; | 393 | struct iwlagn_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; |
394 | u32 status = le16_to_cpu(tx_resp->status.status); | 394 | u32 status = le16_to_cpu(tx_resp->status.status); |
395 | int tid; | 395 | int tid; |
396 | int sta_id; | 396 | int sta_id; |
@@ -408,8 +408,10 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv, | |||
408 | info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb); | 408 | info = IEEE80211_SKB_CB(txq->txb[txq->q.read_ptr].skb); |
409 | memset(&info->status, 0, sizeof(info->status)); | 409 | memset(&info->status, 0, sizeof(info->status)); |
410 | 410 | ||
411 | tid = (tx_resp->ra_tid & IWL50_TX_RES_TID_MSK) >> IWL50_TX_RES_TID_POS; | 411 | tid = (tx_resp->ra_tid & IWLAGN_TX_RES_TID_MSK) >> |
412 | sta_id = (tx_resp->ra_tid & IWL50_TX_RES_RA_MSK) >> IWL50_TX_RES_RA_POS; | 412 | IWLAGN_TX_RES_TID_POS; |
413 | sta_id = (tx_resp->ra_tid & IWLAGN_TX_RES_RA_MSK) >> | ||
414 | IWLAGN_TX_RES_RA_POS; | ||
413 | 415 | ||
414 | spin_lock_irqsave(&priv->sta_lock, flags); | 416 | spin_lock_irqsave(&priv->sta_lock, flags); |
415 | if (txq->sched_retry) { | 417 | if (txq->sched_retry) { |
@@ -422,7 +424,8 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv, | |||
422 | * notification again. | 424 | * notification again. |
423 | */ | 425 | */ |
424 | if (tx_resp->bt_kill_count && tx_resp->frame_count == 1 && | 426 | if (tx_resp->bt_kill_count && tx_resp->frame_count == 1 && |
425 | priv->cfg->advanced_bt_coexist) { | 427 | priv->cfg->bt_params && |
428 | priv->cfg->bt_params->advanced_bt_coexist) { | ||
426 | IWL_WARN(priv, "receive reply tx with bt_kill\n"); | 429 | IWL_WARN(priv, "receive reply tx with bt_kill\n"); |
427 | } | 430 | } |
428 | iwlagn_tx_status_reply_tx(priv, agg, tx_resp, txq_id, index); | 431 | iwlagn_tx_status_reply_tx(priv, agg, tx_resp, txq_id, index); |
@@ -490,7 +493,7 @@ int iwlagn_hw_valid_rtc_data_addr(u32 addr) | |||
490 | 493 | ||
491 | int iwlagn_send_tx_power(struct iwl_priv *priv) | 494 | int iwlagn_send_tx_power(struct iwl_priv *priv) |
492 | { | 495 | { |
493 | struct iwl5000_tx_power_dbm_cmd tx_power_cmd; | 496 | struct iwlagn_tx_power_dbm_cmd tx_power_cmd; |
494 | u8 tx_ant_cfg_cmd; | 497 | u8 tx_ant_cfg_cmd; |
495 | 498 | ||
496 | /* half dBm need to multiply */ | 499 | /* half dBm need to multiply */ |
@@ -511,8 +514,8 @@ int iwlagn_send_tx_power(struct iwl_priv *priv) | |||
511 | */ | 514 | */ |
512 | tx_power_cmd.global_lmt = priv->tx_power_lmt_in_half_dbm; | 515 | tx_power_cmd.global_lmt = priv->tx_power_lmt_in_half_dbm; |
513 | } | 516 | } |
514 | tx_power_cmd.flags = IWL50_TX_POWER_NO_CLOSED; | 517 | tx_power_cmd.flags = IWLAGN_TX_POWER_NO_CLOSED; |
515 | tx_power_cmd.srv_chan_lmt = IWL50_TX_POWER_AUTO; | 518 | tx_power_cmd.srv_chan_lmt = IWLAGN_TX_POWER_AUTO; |
516 | 519 | ||
517 | if (IWL_UCODE_API(priv->ucode_ver) == 1) | 520 | if (IWL_UCODE_API(priv->ucode_ver) == 1) |
518 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD_V1; | 521 | tx_ant_cfg_cmd = REPLY_TX_POWER_DBM_CMD_V1; |
@@ -589,7 +592,7 @@ const u8 *iwlagn_eeprom_query_addr(const struct iwl_priv *priv, | |||
589 | size_t offset) | 592 | size_t offset) |
590 | { | 593 | { |
591 | u32 address = eeprom_indirect_address(priv, offset); | 594 | u32 address = eeprom_indirect_address(priv, offset); |
592 | BUG_ON(address >= priv->cfg->eeprom_size); | 595 | BUG_ON(address >= priv->cfg->base_params->eeprom_size); |
593 | return &priv->eeprom[address]; | 596 | return &priv->eeprom[address]; |
594 | } | 597 | } |
595 | 598 | ||
@@ -637,7 +640,7 @@ int iwlagn_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | |||
637 | const u32 rfdnlog = RX_QUEUE_SIZE_LOG; /* 256 RBDs */ | 640 | const u32 rfdnlog = RX_QUEUE_SIZE_LOG; /* 256 RBDs */ |
638 | u32 rb_timeout = 0; /* FIXME: RX_RB_TIMEOUT for all devices? */ | 641 | u32 rb_timeout = 0; /* FIXME: RX_RB_TIMEOUT for all devices? */ |
639 | 642 | ||
640 | if (!priv->cfg->use_isr_legacy) | 643 | if (!priv->cfg->base_params->use_isr_legacy) |
641 | rb_timeout = RX_RB_TIMEOUT; | 644 | rb_timeout = RX_RB_TIMEOUT; |
642 | 645 | ||
643 | if (priv->cfg->mod_params->amsdu_size_8K) | 646 | if (priv->cfg->mod_params->amsdu_size_8K) |
@@ -1424,7 +1427,8 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1424 | * Internal scans are passive, so we can indiscriminately set | 1427 | * Internal scans are passive, so we can indiscriminately set |
1425 | * the BT ignore flag on 2.4 GHz since it applies to TX only. | 1428 | * the BT ignore flag on 2.4 GHz since it applies to TX only. |
1426 | */ | 1429 | */ |
1427 | if (priv->cfg->advanced_bt_coexist) | 1430 | if (priv->cfg->bt_params && |
1431 | priv->cfg->bt_params->advanced_bt_coexist) | ||
1428 | scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; | 1432 | scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; |
1429 | scan->good_CRC_th = IWL_GOOD_CRC_TH_DISABLED; | 1433 | scan->good_CRC_th = IWL_GOOD_CRC_TH_DISABLED; |
1430 | break; | 1434 | break; |
@@ -1463,10 +1467,12 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1463 | if (priv->cfg->scan_tx_antennas[band]) | 1467 | if (priv->cfg->scan_tx_antennas[band]) |
1464 | scan_tx_antennas = priv->cfg->scan_tx_antennas[band]; | 1468 | scan_tx_antennas = priv->cfg->scan_tx_antennas[band]; |
1465 | 1469 | ||
1466 | if (priv->cfg->advanced_bt_coexist && priv->bt_full_concurrent) { | 1470 | if (priv->cfg->bt_params && |
1471 | priv->cfg->bt_params->advanced_bt_coexist && | ||
1472 | priv->bt_full_concurrent) { | ||
1467 | /* operated as 1x1 in full concurrency mode */ | 1473 | /* operated as 1x1 in full concurrency mode */ |
1468 | scan_tx_antennas = | 1474 | scan_tx_antennas = first_antenna( |
1469 | first_antenna(priv->cfg->scan_tx_antennas[band]); | 1475 | priv->cfg->scan_tx_antennas[band]); |
1470 | } | 1476 | } |
1471 | 1477 | ||
1472 | priv->scan_tx_ant[band] = iwl_toggle_tx_ant(priv, priv->scan_tx_ant[band], | 1478 | priv->scan_tx_ant[band] = iwl_toggle_tx_ant(priv, priv->scan_tx_ant[band], |
@@ -1487,7 +1493,9 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1487 | 1493 | ||
1488 | rx_ant = first_antenna(active_chains); | 1494 | rx_ant = first_antenna(active_chains); |
1489 | } | 1495 | } |
1490 | if (priv->cfg->advanced_bt_coexist && priv->bt_full_concurrent) { | 1496 | if (priv->cfg->bt_params && |
1497 | priv->cfg->bt_params->advanced_bt_coexist && | ||
1498 | priv->bt_full_concurrent) { | ||
1491 | /* operated as 1x1 in full concurrency mode */ | 1499 | /* operated as 1x1 in full concurrency mode */ |
1492 | rx_ant = first_antenna(rx_ant); | 1500 | rx_ant = first_antenna(rx_ant); |
1493 | } | 1501 | } |
@@ -1777,7 +1785,10 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv) | |||
1777 | BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) != | 1785 | BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) != |
1778 | sizeof(bt_cmd.bt3_lookup_table)); | 1786 | sizeof(bt_cmd.bt3_lookup_table)); |
1779 | 1787 | ||
1780 | bt_cmd.prio_boost = priv->cfg->bt_prio_boost; | 1788 | if (priv->cfg->bt_params) |
1789 | bt_cmd.prio_boost = priv->cfg->bt_params->bt_prio_boost; | ||
1790 | else | ||
1791 | bt_cmd.prio_boost = 0; | ||
1781 | bt_cmd.kill_ack_mask = priv->kill_ack_mask; | 1792 | bt_cmd.kill_ack_mask = priv->kill_ack_mask; |
1782 | bt_cmd.kill_cts_mask = priv->kill_cts_mask; | 1793 | bt_cmd.kill_cts_mask = priv->kill_cts_mask; |
1783 | bt_cmd.valid = priv->bt_valid; | 1794 | bt_cmd.valid = priv->bt_valid; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 57629fba3a7d..f865685fd5f5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -2939,11 +2939,14 @@ static void rs_fill_link_cmd(struct iwl_priv *priv, | |||
2939 | * overwrite if needed, pass aggregation time limit | 2939 | * overwrite if needed, pass aggregation time limit |
2940 | * to uCode in uSec | 2940 | * to uCode in uSec |
2941 | */ | 2941 | */ |
2942 | if (priv && priv->cfg->agg_time_limit && | 2942 | if (priv && priv->cfg->bt_params && |
2943 | priv->cfg->agg_time_limit >= LINK_QUAL_AGG_TIME_LIMIT_MIN && | 2943 | priv->cfg->bt_params->agg_time_limit && |
2944 | priv->cfg->agg_time_limit <= LINK_QUAL_AGG_TIME_LIMIT_MAX) | 2944 | priv->cfg->bt_params->agg_time_limit >= |
2945 | LINK_QUAL_AGG_TIME_LIMIT_MIN && | ||
2946 | priv->cfg->bt_params->agg_time_limit <= | ||
2947 | LINK_QUAL_AGG_TIME_LIMIT_MAX) | ||
2945 | lq_cmd->agg_params.agg_time_limit = | 2948 | lq_cmd->agg_params.agg_time_limit = |
2946 | cpu_to_le16(priv->cfg->agg_time_limit); | 2949 | cpu_to_le16(priv->cfg->bt_params->agg_time_limit); |
2947 | } | 2950 | } |
2948 | 2951 | ||
2949 | static void *rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir) | 2952 | static void *rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c index 9490eced1198..1e08eb455474 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rx.c | |||
@@ -73,7 +73,8 @@ static void iwl_rx_calc_noise(struct iwl_priv *priv) | |||
73 | int bcn_silence_a, bcn_silence_b, bcn_silence_c; | 73 | int bcn_silence_a, bcn_silence_b, bcn_silence_c; |
74 | int last_rx_noise; | 74 | int last_rx_noise; |
75 | 75 | ||
76 | if (priv->cfg->bt_statistics) | 76 | if (priv->cfg->bt_params && |
77 | priv->cfg->bt_params->bt_statistics) | ||
77 | rx_info = &(priv->_agn.statistics_bt.rx.general.common); | 78 | rx_info = &(priv->_agn.statistics_bt.rx.general.common); |
78 | else | 79 | else |
79 | rx_info = &(priv->_agn.statistics.rx.general); | 80 | rx_info = &(priv->_agn.statistics.rx.general); |
@@ -124,7 +125,8 @@ static void iwl_accumulative_statistics(struct iwl_priv *priv, | |||
124 | struct statistics_general_common *general, *accum_general; | 125 | struct statistics_general_common *general, *accum_general; |
125 | struct statistics_tx *tx, *accum_tx; | 126 | struct statistics_tx *tx, *accum_tx; |
126 | 127 | ||
127 | if (priv->cfg->bt_statistics) { | 128 | if (priv->cfg->bt_params && |
129 | priv->cfg->bt_params->bt_statistics) { | ||
128 | prev_stats = (__le32 *)&priv->_agn.statistics_bt; | 130 | prev_stats = (__le32 *)&priv->_agn.statistics_bt; |
129 | accum_stats = (u32 *)&priv->_agn.accum_statistics_bt; | 131 | accum_stats = (u32 *)&priv->_agn.accum_statistics_bt; |
130 | size = sizeof(struct iwl_bt_notif_statistics); | 132 | size = sizeof(struct iwl_bt_notif_statistics); |
@@ -183,7 +185,7 @@ bool iwl_good_plcp_health(struct iwl_priv *priv, | |||
183 | unsigned int plcp_msec; | 185 | unsigned int plcp_msec; |
184 | unsigned long plcp_received_jiffies; | 186 | unsigned long plcp_received_jiffies; |
185 | 187 | ||
186 | if (priv->cfg->plcp_delta_threshold == | 188 | if (priv->cfg->base_params->plcp_delta_threshold == |
187 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) { | 189 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE) { |
188 | IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n"); | 190 | IWL_DEBUG_RADIO(priv, "plcp_err check disabled\n"); |
189 | return rc; | 191 | return rc; |
@@ -205,7 +207,8 @@ bool iwl_good_plcp_health(struct iwl_priv *priv, | |||
205 | struct statistics_rx_phy *ofdm; | 207 | struct statistics_rx_phy *ofdm; |
206 | struct statistics_rx_ht_phy *ofdm_ht; | 208 | struct statistics_rx_ht_phy *ofdm_ht; |
207 | 209 | ||
208 | if (priv->cfg->bt_statistics) { | 210 | if (priv->cfg->bt_params && |
211 | priv->cfg->bt_params->bt_statistics) { | ||
209 | ofdm = &pkt->u.stats_bt.rx.ofdm; | 212 | ofdm = &pkt->u.stats_bt.rx.ofdm; |
210 | ofdm_ht = &pkt->u.stats_bt.rx.ofdm_ht; | 213 | ofdm_ht = &pkt->u.stats_bt.rx.ofdm_ht; |
211 | combined_plcp_delta = | 214 | combined_plcp_delta = |
@@ -229,7 +232,7 @@ bool iwl_good_plcp_health(struct iwl_priv *priv, | |||
229 | 232 | ||
230 | if ((combined_plcp_delta > 0) && | 233 | if ((combined_plcp_delta > 0) && |
231 | ((combined_plcp_delta * 100) / plcp_msec) > | 234 | ((combined_plcp_delta * 100) / plcp_msec) > |
232 | priv->cfg->plcp_delta_threshold) { | 235 | priv->cfg->base_params->plcp_delta_threshold) { |
233 | /* | 236 | /* |
234 | * if plcp_err exceed the threshold, | 237 | * if plcp_err exceed the threshold, |
235 | * the following data is printed in csv format: | 238 | * the following data is printed in csv format: |
@@ -242,13 +245,13 @@ bool iwl_good_plcp_health(struct iwl_priv *priv, | |||
242 | * plcp_msec | 245 | * plcp_msec |
243 | */ | 246 | */ |
244 | IWL_DEBUG_RADIO(priv, "plcp_err exceeded %u, " | 247 | IWL_DEBUG_RADIO(priv, "plcp_err exceeded %u, " |
245 | "%u, %u, %u, %u, %d, %u mSecs\n", | 248 | "%u, %u, %u, %u, %d, %u mSecs\n", |
246 | priv->cfg->plcp_delta_threshold, | 249 | priv->cfg->base_params->plcp_delta_threshold, |
247 | le32_to_cpu(ofdm->plcp_err), | 250 | le32_to_cpu(ofdm->plcp_err), |
248 | le32_to_cpu(ofdm->plcp_err), | 251 | le32_to_cpu(ofdm->plcp_err), |
249 | le32_to_cpu(ofdm_ht->plcp_err), | 252 | le32_to_cpu(ofdm_ht->plcp_err), |
250 | le32_to_cpu(ofdm_ht->plcp_err), | 253 | le32_to_cpu(ofdm_ht->plcp_err), |
251 | combined_plcp_delta, plcp_msec); | 254 | combined_plcp_delta, plcp_msec); |
252 | 255 | ||
253 | rc = false; | 256 | rc = false; |
254 | } | 257 | } |
@@ -262,7 +265,8 @@ void iwl_rx_statistics(struct iwl_priv *priv, | |||
262 | int change; | 265 | int change; |
263 | struct iwl_rx_packet *pkt = rxb_addr(rxb); | 266 | struct iwl_rx_packet *pkt = rxb_addr(rxb); |
264 | 267 | ||
265 | if (priv->cfg->bt_statistics) { | 268 | if (priv->cfg->bt_params && |
269 | priv->cfg->bt_params->bt_statistics) { | ||
266 | IWL_DEBUG_RX(priv, | 270 | IWL_DEBUG_RX(priv, |
267 | "Statistics notification received (%d vs %d).\n", | 271 | "Statistics notification received (%d vs %d).\n", |
268 | (int)sizeof(struct iwl_bt_notif_statistics), | 272 | (int)sizeof(struct iwl_bt_notif_statistics), |
@@ -300,7 +304,8 @@ void iwl_rx_statistics(struct iwl_priv *priv, | |||
300 | 304 | ||
301 | iwl_recover_from_statistics(priv, pkt); | 305 | iwl_recover_from_statistics(priv, pkt); |
302 | 306 | ||
303 | if (priv->cfg->bt_statistics) | 307 | if (priv->cfg->bt_params && |
308 | priv->cfg->bt_params->bt_statistics) | ||
304 | memcpy(&priv->_agn.statistics_bt, &pkt->u.stats_bt, | 309 | memcpy(&priv->_agn.statistics_bt, &pkt->u.stats_bt, |
305 | sizeof(priv->_agn.statistics_bt)); | 310 | sizeof(priv->_agn.statistics_bt)); |
306 | else | 311 | else |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c index 07b2c6cadf51..0c6c4d969706 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tt.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tt.c | |||
@@ -114,7 +114,7 @@ static bool iwl_within_ct_kill_margin(struct iwl_priv *priv) | |||
114 | s32 temp = priv->temperature; /* degrees CELSIUS except specified */ | 114 | s32 temp = priv->temperature; /* degrees CELSIUS except specified */ |
115 | bool within_margin = false; | 115 | bool within_margin = false; |
116 | 116 | ||
117 | if (priv->cfg->temperature_kelvin) | 117 | if (priv->cfg->base_params->temperature_kelvin) |
118 | temp = KELVIN_TO_CELSIUS(priv->temperature); | 118 | temp = KELVIN_TO_CELSIUS(priv->temperature); |
119 | 119 | ||
120 | if (!priv->thermal_throttle.advanced_tt) | 120 | if (!priv->thermal_throttle.advanced_tt) |
@@ -591,7 +591,7 @@ static void iwl_bg_tt_work(struct work_struct *work) | |||
591 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 591 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
592 | return; | 592 | return; |
593 | 593 | ||
594 | if (priv->cfg->temperature_kelvin) | 594 | if (priv->cfg->base_params->temperature_kelvin) |
595 | temp = KELVIN_TO_CELSIUS(priv->temperature); | 595 | temp = KELVIN_TO_CELSIUS(priv->temperature); |
596 | 596 | ||
597 | if (!priv->thermal_throttle.advanced_tt) | 597 | if (!priv->thermal_throttle.advanced_tt) |
@@ -640,7 +640,7 @@ void iwl_tt_initialize(struct iwl_priv *priv) | |||
640 | INIT_WORK(&priv->ct_enter, iwl_bg_ct_enter); | 640 | INIT_WORK(&priv->ct_enter, iwl_bg_ct_enter); |
641 | INIT_WORK(&priv->ct_exit, iwl_bg_ct_exit); | 641 | INIT_WORK(&priv->ct_exit, iwl_bg_ct_exit); |
642 | 642 | ||
643 | if (priv->cfg->adv_thermal_throttle) { | 643 | if (priv->cfg->base_params->adv_thermal_throttle) { |
644 | IWL_DEBUG_POWER(priv, "Advanced Thermal Throttling\n"); | 644 | IWL_DEBUG_POWER(priv, "Advanced Thermal Throttling\n"); |
645 | tt->restriction = kzalloc(sizeof(struct iwl_tt_restriction) * | 645 | tt->restriction = kzalloc(sizeof(struct iwl_tt_restriction) * |
646 | IWL_TI_STATE_MAX, GFP_KERNEL); | 646 | IWL_TI_STATE_MAX, GFP_KERNEL); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index 5950184d9860..77753b72f236 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -224,13 +224,13 @@ int iwlagn_txq_agg_enable(struct iwl_priv *priv, int txq_id, | |||
224 | int ret; | 224 | int ret; |
225 | 225 | ||
226 | if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) || | 226 | if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) || |
227 | (IWLAGN_FIRST_AMPDU_QUEUE + priv->cfg->num_of_ampdu_queues | 227 | (IWLAGN_FIRST_AMPDU_QUEUE + |
228 | <= txq_id)) { | 228 | priv->cfg->base_params->num_of_ampdu_queues <= txq_id)) { |
229 | IWL_WARN(priv, | 229 | IWL_WARN(priv, |
230 | "queue number out of range: %d, must be %d to %d\n", | 230 | "queue number out of range: %d, must be %d to %d\n", |
231 | txq_id, IWLAGN_FIRST_AMPDU_QUEUE, | 231 | txq_id, IWLAGN_FIRST_AMPDU_QUEUE, |
232 | IWLAGN_FIRST_AMPDU_QUEUE + | 232 | IWLAGN_FIRST_AMPDU_QUEUE + |
233 | priv->cfg->num_of_ampdu_queues - 1); | 233 | priv->cfg->base_params->num_of_ampdu_queues - 1); |
234 | return -EINVAL; | 234 | return -EINVAL; |
235 | } | 235 | } |
236 | 236 | ||
@@ -286,13 +286,13 @@ int iwlagn_txq_agg_disable(struct iwl_priv *priv, u16 txq_id, | |||
286 | u16 ssn_idx, u8 tx_fifo) | 286 | u16 ssn_idx, u8 tx_fifo) |
287 | { | 287 | { |
288 | if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) || | 288 | if ((IWLAGN_FIRST_AMPDU_QUEUE > txq_id) || |
289 | (IWLAGN_FIRST_AMPDU_QUEUE + priv->cfg->num_of_ampdu_queues | 289 | (IWLAGN_FIRST_AMPDU_QUEUE + |
290 | <= txq_id)) { | 290 | priv->cfg->base_params->num_of_ampdu_queues <= txq_id)) { |
291 | IWL_ERR(priv, | 291 | IWL_ERR(priv, |
292 | "queue number out of range: %d, must be %d to %d\n", | 292 | "queue number out of range: %d, must be %d to %d\n", |
293 | txq_id, IWLAGN_FIRST_AMPDU_QUEUE, | 293 | txq_id, IWLAGN_FIRST_AMPDU_QUEUE, |
294 | IWLAGN_FIRST_AMPDU_QUEUE + | 294 | IWLAGN_FIRST_AMPDU_QUEUE + |
295 | priv->cfg->num_of_ampdu_queues - 1); | 295 | priv->cfg->base_params->num_of_ampdu_queues - 1); |
296 | return -EINVAL; | 296 | return -EINVAL; |
297 | } | 297 | } |
298 | 298 | ||
@@ -350,7 +350,8 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv, | |||
350 | if (ieee80211_is_back_req(fc)) | 350 | if (ieee80211_is_back_req(fc)) |
351 | tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; | 351 | tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; |
352 | else if (info->band == IEEE80211_BAND_2GHZ && | 352 | else if (info->band == IEEE80211_BAND_2GHZ && |
353 | priv->cfg->advanced_bt_coexist && | 353 | priv->cfg->bt_params && |
354 | priv->cfg->bt_params->advanced_bt_coexist && | ||
354 | (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) || | 355 | (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) || |
355 | ieee80211_is_reassoc_req(fc) || | 356 | ieee80211_is_reassoc_req(fc) || |
356 | skb->protocol == cpu_to_be16(ETH_P_PAE))) | 357 | skb->protocol == cpu_to_be16(ETH_P_PAE))) |
@@ -444,7 +445,9 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, | |||
444 | rate_flags |= RATE_MCS_CCK_MSK; | 445 | rate_flags |= RATE_MCS_CCK_MSK; |
445 | 446 | ||
446 | /* Set up antennas */ | 447 | /* Set up antennas */ |
447 | if (priv->cfg->advanced_bt_coexist && priv->bt_full_concurrent) { | 448 | if (priv->cfg->bt_params && |
449 | priv->cfg->bt_params->advanced_bt_coexist && | ||
450 | priv->bt_full_concurrent) { | ||
448 | /* operated as 1x1 in full concurrency mode */ | 451 | /* operated as 1x1 in full concurrency mode */ |
449 | priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant, | 452 | priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant, |
450 | first_antenna(priv->hw_params.valid_tx_ant)); | 453 | first_antenna(priv->hw_params.valid_tx_ant)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c index 8bfb0495a76b..e1dd76267dca 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-ucode.c | |||
@@ -307,7 +307,8 @@ void iwlagn_init_alive_start(struct iwl_priv *priv) | |||
307 | goto restart; | 307 | goto restart; |
308 | } | 308 | } |
309 | 309 | ||
310 | if (priv->cfg->advanced_bt_coexist) { | 310 | if (priv->cfg->bt_params && |
311 | priv->cfg->bt_params->advanced_bt_coexist) { | ||
311 | /* | 312 | /* |
312 | * Tell uCode we are ready to perform calibration | 313 | * Tell uCode we are ready to perform calibration |
313 | * need to perform this before any calibration | 314 | * need to perform this before any calibration |
@@ -330,7 +331,7 @@ static int iwlagn_send_wimax_coex(struct iwl_priv *priv) | |||
330 | { | 331 | { |
331 | struct iwl_wimax_coex_cmd coex_cmd; | 332 | struct iwl_wimax_coex_cmd coex_cmd; |
332 | 333 | ||
333 | if (priv->cfg->support_wimax_coexist) { | 334 | if (priv->cfg->base_params->support_wimax_coexist) { |
334 | /* UnMask wake up src at associated sleep */ | 335 | /* UnMask wake up src at associated sleep */ |
335 | coex_cmd.flags = COEX_FLAGS_ASSOC_WA_UNMASK_MSK; | 336 | coex_cmd.flags = COEX_FLAGS_ASSOC_WA_UNMASK_MSK; |
336 | 337 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 646864a26eaf..a6dce616ee3c 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -2256,13 +2256,15 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
2256 | if (pieces.init_evtlog_size) | 2256 | if (pieces.init_evtlog_size) |
2257 | priv->_agn.init_evtlog_size = (pieces.init_evtlog_size - 16)/12; | 2257 | priv->_agn.init_evtlog_size = (pieces.init_evtlog_size - 16)/12; |
2258 | else | 2258 | else |
2259 | priv->_agn.init_evtlog_size = priv->cfg->max_event_log_size; | 2259 | priv->_agn.init_evtlog_size = |
2260 | priv->cfg->base_params->max_event_log_size; | ||
2260 | priv->_agn.init_errlog_ptr = pieces.init_errlog_ptr; | 2261 | priv->_agn.init_errlog_ptr = pieces.init_errlog_ptr; |
2261 | priv->_agn.inst_evtlog_ptr = pieces.inst_evtlog_ptr; | 2262 | priv->_agn.inst_evtlog_ptr = pieces.inst_evtlog_ptr; |
2262 | if (pieces.inst_evtlog_size) | 2263 | if (pieces.inst_evtlog_size) |
2263 | priv->_agn.inst_evtlog_size = (pieces.inst_evtlog_size - 16)/12; | 2264 | priv->_agn.inst_evtlog_size = (pieces.inst_evtlog_size - 16)/12; |
2264 | else | 2265 | else |
2265 | priv->_agn.inst_evtlog_size = priv->cfg->max_event_log_size; | 2266 | priv->_agn.inst_evtlog_size = |
2267 | priv->cfg->base_params->max_event_log_size; | ||
2266 | priv->_agn.inst_errlog_ptr = pieces.inst_errlog_ptr; | 2268 | priv->_agn.inst_errlog_ptr = pieces.inst_errlog_ptr; |
2267 | 2269 | ||
2268 | if (ucode_capa.pan) { | 2270 | if (ucode_capa.pan) { |
@@ -2732,7 +2734,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv) | |||
2732 | spin_unlock_irqrestore(&priv->lock, flags); | 2734 | spin_unlock_irqrestore(&priv->lock, flags); |
2733 | priv->thermal_throttle.ct_kill_toggle = false; | 2735 | priv->thermal_throttle.ct_kill_toggle = false; |
2734 | 2736 | ||
2735 | if (priv->cfg->support_ct_kill_exit) { | 2737 | if (priv->cfg->base_params->support_ct_kill_exit) { |
2736 | adv_cmd.critical_temperature_enter = | 2738 | adv_cmd.critical_temperature_enter = |
2737 | cpu_to_le32(priv->hw_params.ct_kill_threshold); | 2739 | cpu_to_le32(priv->hw_params.ct_kill_threshold); |
2738 | adv_cmd.critical_temperature_exit = | 2740 | adv_cmd.critical_temperature_exit = |
@@ -2765,6 +2767,23 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv) | |||
2765 | } | 2767 | } |
2766 | } | 2768 | } |
2767 | 2769 | ||
2770 | static int iwlagn_send_calib_cfg_rt(struct iwl_priv *priv, u32 cfg) | ||
2771 | { | ||
2772 | struct iwl_calib_cfg_cmd calib_cfg_cmd; | ||
2773 | struct iwl_host_cmd cmd = { | ||
2774 | .id = CALIBRATION_CFG_CMD, | ||
2775 | .len = sizeof(struct iwl_calib_cfg_cmd), | ||
2776 | .data = &calib_cfg_cmd, | ||
2777 | }; | ||
2778 | |||
2779 | memset(&calib_cfg_cmd, 0, sizeof(calib_cfg_cmd)); | ||
2780 | calib_cfg_cmd.ucd_calib_cfg.once.is_enable = IWL_CALIB_INIT_CFG_ALL; | ||
2781 | calib_cfg_cmd.ucd_calib_cfg.once.start = cpu_to_le32(cfg); | ||
2782 | |||
2783 | return iwl_send_cmd(priv, &cmd); | ||
2784 | } | ||
2785 | |||
2786 | |||
2768 | /** | 2787 | /** |
2769 | * iwl_alive_start - called after REPLY_ALIVE notification received | 2788 | * iwl_alive_start - called after REPLY_ALIVE notification received |
2770 | * from protocol/runtime uCode (initialization uCode's | 2789 | * from protocol/runtime uCode (initialization uCode's |
@@ -2801,6 +2820,10 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2801 | goto restart; | 2820 | goto restart; |
2802 | } | 2821 | } |
2803 | 2822 | ||
2823 | if (priv->hw_params.calib_rt_cfg) | ||
2824 | iwlagn_send_calib_cfg_rt(priv, priv->hw_params.calib_rt_cfg); | ||
2825 | |||
2826 | |||
2804 | /* After the ALIVE response, we can send host commands to the uCode */ | 2827 | /* After the ALIVE response, we can send host commands to the uCode */ |
2805 | set_bit(STATUS_ALIVE, &priv->status); | 2828 | set_bit(STATUS_ALIVE, &priv->status); |
2806 | 2829 | ||
@@ -2808,13 +2831,15 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2808 | /* Enable timer to monitor the driver queues */ | 2831 | /* Enable timer to monitor the driver queues */ |
2809 | mod_timer(&priv->monitor_recover, | 2832 | mod_timer(&priv->monitor_recover, |
2810 | jiffies + | 2833 | jiffies + |
2811 | msecs_to_jiffies(priv->cfg->monitor_recover_period)); | 2834 | msecs_to_jiffies( |
2835 | priv->cfg->base_params->monitor_recover_period)); | ||
2812 | } | 2836 | } |
2813 | 2837 | ||
2814 | if (iwl_is_rfkill(priv)) | 2838 | if (iwl_is_rfkill(priv)) |
2815 | return; | 2839 | return; |
2816 | 2840 | ||
2817 | if (priv->cfg->advanced_bt_coexist) { | 2841 | if (priv->cfg->bt_params && |
2842 | priv->cfg->bt_params->advanced_bt_coexist) { | ||
2818 | /* Configure Bluetooth device coexistence support */ | 2843 | /* Configure Bluetooth device coexistence support */ |
2819 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; | 2844 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; |
2820 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; | 2845 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; |
@@ -2854,7 +2879,8 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2854 | priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx); | 2879 | priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx); |
2855 | } | 2880 | } |
2856 | 2881 | ||
2857 | if (!priv->cfg->advanced_bt_coexist) { | 2882 | if (priv->cfg->bt_params && |
2883 | !priv->cfg->bt_params->advanced_bt_coexist) { | ||
2858 | /* Configure Bluetooth device coexistence support */ | 2884 | /* Configure Bluetooth device coexistence support */ |
2859 | priv->cfg->ops->hcmd->send_bt_config(priv); | 2885 | priv->cfg->ops->hcmd->send_bt_config(priv); |
2860 | } | 2886 | } |
@@ -2907,7 +2933,11 @@ static void __iwl_down(struct iwl_priv *priv) | |||
2907 | 2933 | ||
2908 | /* reset BT coex data */ | 2934 | /* reset BT coex data */ |
2909 | priv->bt_status = 0; | 2935 | priv->bt_status = 0; |
2910 | priv->bt_traffic_load = priv->cfg->bt_init_traffic_load; | 2936 | if (priv->cfg->bt_params) |
2937 | priv->bt_traffic_load = | ||
2938 | priv->cfg->bt_params->bt_init_traffic_load; | ||
2939 | else | ||
2940 | priv->bt_traffic_load = 0; | ||
2911 | priv->bt_sco_active = false; | 2941 | priv->bt_sco_active = false; |
2912 | priv->bt_full_concurrent = false; | 2942 | priv->bt_full_concurrent = false; |
2913 | priv->bt_ci_compliance = 0; | 2943 | priv->bt_ci_compliance = 0; |
@@ -3201,7 +3231,8 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work) | |||
3201 | } | 3231 | } |
3202 | 3232 | ||
3203 | if (priv->start_calib) { | 3233 | if (priv->start_calib) { |
3204 | if (priv->cfg->bt_statistics) { | 3234 | if (priv->cfg->bt_params && |
3235 | priv->cfg->bt_params->bt_statistics) { | ||
3205 | iwl_chain_noise_calibration(priv, | 3236 | iwl_chain_noise_calibration(priv, |
3206 | (void *)&priv->_agn.statistics_bt); | 3237 | (void *)&priv->_agn.statistics_bt); |
3207 | iwl_sensitivity_calibration(priv, | 3238 | iwl_sensitivity_calibration(priv, |
@@ -3400,7 +3431,7 @@ static int iwl_mac_setup_register(struct iwl_priv *priv, | |||
3400 | IEEE80211_HW_NEED_DTIM_PERIOD | | 3431 | IEEE80211_HW_NEED_DTIM_PERIOD | |
3401 | IEEE80211_HW_SPECTRUM_MGMT; | 3432 | IEEE80211_HW_SPECTRUM_MGMT; |
3402 | 3433 | ||
3403 | if (!priv->cfg->broken_powersave) | 3434 | if (!priv->cfg->base_params->broken_powersave) |
3404 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | | 3435 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | |
3405 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; | 3436 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; |
3406 | 3437 | ||
@@ -3725,7 +3756,8 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3725 | } | 3756 | } |
3726 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 3757 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
3727 | ret = 0; | 3758 | ret = 0; |
3728 | if (priv->cfg->use_rts_for_aggregation) { | 3759 | if (priv->cfg->ht_params && |
3760 | priv->cfg->ht_params->use_rts_for_aggregation) { | ||
3729 | struct iwl_station_priv *sta_priv = | 3761 | struct iwl_station_priv *sta_priv = |
3730 | (void *) sta->drv_priv; | 3762 | (void *) sta->drv_priv; |
3731 | /* | 3763 | /* |
@@ -3739,7 +3771,8 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3739 | } | 3771 | } |
3740 | break; | 3772 | break; |
3741 | case IEEE80211_AMPDU_TX_OPERATIONAL: | 3773 | case IEEE80211_AMPDU_TX_OPERATIONAL: |
3742 | if (priv->cfg->use_rts_for_aggregation) { | 3774 | if (priv->cfg->ht_params && |
3775 | priv->cfg->ht_params->use_rts_for_aggregation) { | ||
3743 | struct iwl_station_priv *sta_priv = | 3776 | struct iwl_station_priv *sta_priv = |
3744 | (void *) sta->drv_priv; | 3777 | (void *) sta->drv_priv; |
3745 | 3778 | ||
@@ -4057,7 +4090,7 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) | |||
4057 | priv->cfg->ops->lib->recover_from_tx_stall; | 4090 | priv->cfg->ops->lib->recover_from_tx_stall; |
4058 | } | 4091 | } |
4059 | 4092 | ||
4060 | if (!priv->cfg->use_isr_legacy) | 4093 | if (!priv->cfg->base_params->use_isr_legacy) |
4061 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) | 4094 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) |
4062 | iwl_irq_tasklet, (unsigned long)priv); | 4095 | iwl_irq_tasklet, (unsigned long)priv); |
4063 | else | 4096 | else |
@@ -4142,7 +4175,8 @@ static int iwl_init_drv(struct iwl_priv *priv) | |||
4142 | iwl_init_scan_params(priv); | 4175 | iwl_init_scan_params(priv); |
4143 | 4176 | ||
4144 | /* init bt coex */ | 4177 | /* init bt coex */ |
4145 | if (priv->cfg->advanced_bt_coexist) { | 4178 | if (priv->cfg->bt_params && |
4179 | priv->cfg->bt_params->advanced_bt_coexist) { | ||
4146 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; | 4180 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; |
4147 | priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT; | 4181 | priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT; |
4148 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; | 4182 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; |
@@ -4273,9 +4307,8 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
4273 | /* Disabling hardware scan means that mac80211 will perform scans | 4307 | /* Disabling hardware scan means that mac80211 will perform scans |
4274 | * "the hard way", rather than using device's scan. */ | 4308 | * "the hard way", rather than using device's scan. */ |
4275 | if (cfg->mod_params->disable_hw_scan) { | 4309 | if (cfg->mod_params->disable_hw_scan) { |
4276 | if (iwl_debug_level & IWL_DL_INFO) | 4310 | dev_printk(KERN_DEBUG, &(pdev->dev), |
4277 | dev_printk(KERN_DEBUG, &(pdev->dev), | 4311 | "sw scan support is deprecated\n"); |
4278 | "Disabling hw_scan\n"); | ||
4279 | iwl_hw_ops.hw_scan = NULL; | 4312 | iwl_hw_ops.hw_scan = NULL; |
4280 | } | 4313 | } |
4281 | 4314 | ||
@@ -4788,6 +4821,22 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { | |||
4788 | {IWL_PCI_DEVICE(0x0083, 0x1326, iwl1000_bg_cfg)}, | 4821 | {IWL_PCI_DEVICE(0x0083, 0x1326, iwl1000_bg_cfg)}, |
4789 | {IWL_PCI_DEVICE(0x0084, 0x1216, iwl1000_bg_cfg)}, | 4822 | {IWL_PCI_DEVICE(0x0084, 0x1216, iwl1000_bg_cfg)}, |
4790 | {IWL_PCI_DEVICE(0x0084, 0x1316, iwl1000_bg_cfg)}, | 4823 | {IWL_PCI_DEVICE(0x0084, 0x1316, iwl1000_bg_cfg)}, |
4824 | |||
4825 | /* 100 Series WiFi */ | ||
4826 | {IWL_PCI_DEVICE(0x08AE, 0x1005, iwl100_bgn_cfg)}, | ||
4827 | {IWL_PCI_DEVICE(0x08AF, 0x1015, iwl100_bgn_cfg)}, | ||
4828 | {IWL_PCI_DEVICE(0x08AE, 0x1025, iwl100_bgn_cfg)}, | ||
4829 | {IWL_PCI_DEVICE(0x08AE, 0x1007, iwl100_bg_cfg)}, | ||
4830 | {IWL_PCI_DEVICE(0x08AE, 0x1017, iwl100_bg_cfg)}, | ||
4831 | |||
4832 | /* 130 Series WiFi */ | ||
4833 | {IWL_PCI_DEVICE(0x0896, 0x5005, iwl130_bgn_cfg)}, | ||
4834 | {IWL_PCI_DEVICE(0x0896, 0x5007, iwl130_bg_cfg)}, | ||
4835 | {IWL_PCI_DEVICE(0x0897, 0x5015, iwl130_bgn_cfg)}, | ||
4836 | {IWL_PCI_DEVICE(0x0897, 0x5017, iwl130_bg_cfg)}, | ||
4837 | {IWL_PCI_DEVICE(0x0896, 0x5025, iwl130_bgn_cfg)}, | ||
4838 | {IWL_PCI_DEVICE(0x0896, 0x5027, iwl130_bg_cfg)}, | ||
4839 | |||
4791 | #endif /* CONFIG_IWL5000 */ | 4840 | #endif /* CONFIG_IWL5000 */ |
4792 | 4841 | ||
4793 | {0} | 4842 | {0} |
@@ -4876,7 +4925,8 @@ module_param_named(fw_restart, iwlagn_mod_params.restart_fw, int, S_IRUGO); | |||
4876 | MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); | 4925 | MODULE_PARM_DESC(fw_restart, "restart firmware in case of error"); |
4877 | module_param_named( | 4926 | module_param_named( |
4878 | disable_hw_scan, iwlagn_mod_params.disable_hw_scan, int, S_IRUGO); | 4927 | disable_hw_scan, iwlagn_mod_params.disable_hw_scan, int, S_IRUGO); |
4879 | MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); | 4928 | MODULE_PARM_DESC(disable_hw_scan, |
4929 | "disable hardware scanning (default 0) (deprecated)"); | ||
4880 | 4930 | ||
4881 | module_param_named(ucode_alternative, iwlagn_wanted_ucode_alternative, int, | 4931 | module_param_named(ucode_alternative, iwlagn_wanted_ucode_alternative, int, |
4882 | S_IRUGO); | 4932 | S_IRUGO); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h index a372184ac210..eb3812a35862 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.h +++ b/drivers/net/wireless/iwlwifi/iwl-agn.h | |||
@@ -92,6 +92,10 @@ extern struct iwl_cfg iwl6050_2abg_cfg; | |||
92 | extern struct iwl_cfg iwl6050g2_bgn_cfg; | 92 | extern struct iwl_cfg iwl6050g2_bgn_cfg; |
93 | extern struct iwl_cfg iwl1000_bgn_cfg; | 93 | extern struct iwl_cfg iwl1000_bgn_cfg; |
94 | extern struct iwl_cfg iwl1000_bg_cfg; | 94 | extern struct iwl_cfg iwl1000_bg_cfg; |
95 | extern struct iwl_cfg iwl100_bgn_cfg; | ||
96 | extern struct iwl_cfg iwl100_bg_cfg; | ||
97 | extern struct iwl_cfg iwl130_bgn_cfg; | ||
98 | extern struct iwl_cfg iwl130_bg_cfg; | ||
95 | 99 | ||
96 | extern struct iwl_mod_params iwlagn_mod_params; | 100 | extern struct iwl_mod_params iwlagn_mod_params; |
97 | extern struct iwl_hcmd_ops iwlagn_hcmd; | 101 | extern struct iwl_hcmd_ops iwlagn_hcmd; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-commands.h b/drivers/net/wireless/iwlwifi/iwl-commands.h index 27e250c8d4b5..fe652568fec7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-commands.h +++ b/drivers/net/wireless/iwlwifi/iwl-commands.h | |||
@@ -420,12 +420,12 @@ struct iwl4965_tx_power_db { | |||
420 | 420 | ||
421 | /** | 421 | /** |
422 | * Command REPLY_TX_POWER_DBM_CMD = 0x98 | 422 | * Command REPLY_TX_POWER_DBM_CMD = 0x98 |
423 | * struct iwl5000_tx_power_dbm_cmd | 423 | * struct iwlagn_tx_power_dbm_cmd |
424 | */ | 424 | */ |
425 | #define IWL50_TX_POWER_AUTO 0x7f | 425 | #define IWLAGN_TX_POWER_AUTO 0x7f |
426 | #define IWL50_TX_POWER_NO_CLOSED (0x1 << 6) | 426 | #define IWLAGN_TX_POWER_NO_CLOSED (0x1 << 6) |
427 | 427 | ||
428 | struct iwl5000_tx_power_dbm_cmd { | 428 | struct iwlagn_tx_power_dbm_cmd { |
429 | s8 global_lmt; /*in half-dBm (e.g. 30 = 15 dBm) */ | 429 | s8 global_lmt; /*in half-dBm (e.g. 30 = 15 dBm) */ |
430 | u8 flags; | 430 | u8 flags; |
431 | s8 srv_chan_lmt; /*in half-dBm (e.g. 30 = 15 dBm) */ | 431 | s8 srv_chan_lmt; /*in half-dBm (e.g. 30 = 15 dBm) */ |
@@ -1042,7 +1042,7 @@ struct iwl4965_keyinfo { | |||
1042 | u8 key[16]; /* 16-byte unicast decryption key */ | 1042 | u8 key[16]; /* 16-byte unicast decryption key */ |
1043 | } __packed; | 1043 | } __packed; |
1044 | 1044 | ||
1045 | /* 5000 */ | 1045 | /* agn */ |
1046 | struct iwl_keyinfo { | 1046 | struct iwl_keyinfo { |
1047 | __le16 key_flags; | 1047 | __le16 key_flags; |
1048 | u8 tkip_rx_tsc_byte2; /* TSC[2] for key mix ph1 detection */ | 1048 | u8 tkip_rx_tsc_byte2; /* TSC[2] for key mix ph1 detection */ |
@@ -1168,7 +1168,7 @@ struct iwl4965_addsta_cmd { | |||
1168 | __le16 reserved2; | 1168 | __le16 reserved2; |
1169 | } __packed; | 1169 | } __packed; |
1170 | 1170 | ||
1171 | /* 5000 */ | 1171 | /* agn */ |
1172 | struct iwl_addsta_cmd { | 1172 | struct iwl_addsta_cmd { |
1173 | u8 mode; /* 1: modify existing, 0: add new station */ | 1173 | u8 mode; /* 1: modify existing, 0: add new station */ |
1174 | u8 reserved[3]; | 1174 | u8 reserved[3]; |
@@ -1959,12 +1959,12 @@ struct iwl4965_tx_resp { | |||
1959 | #define IWL50_TX_RES_INV_RATE_INDEX_MSK 0x80 | 1959 | #define IWL50_TX_RES_INV_RATE_INDEX_MSK 0x80 |
1960 | 1960 | ||
1961 | /* refer to ra_tid */ | 1961 | /* refer to ra_tid */ |
1962 | #define IWL50_TX_RES_TID_POS 0 | 1962 | #define IWLAGN_TX_RES_TID_POS 0 |
1963 | #define IWL50_TX_RES_TID_MSK 0x0f | 1963 | #define IWLAGN_TX_RES_TID_MSK 0x0f |
1964 | #define IWL50_TX_RES_RA_POS 4 | 1964 | #define IWLAGN_TX_RES_RA_POS 4 |
1965 | #define IWL50_TX_RES_RA_MSK 0xf0 | 1965 | #define IWLAGN_TX_RES_RA_MSK 0xf0 |
1966 | 1966 | ||
1967 | struct iwl5000_tx_resp { | 1967 | struct iwlagn_tx_resp { |
1968 | u8 frame_count; /* 1 no aggregation, >1 aggregation */ | 1968 | u8 frame_count; /* 1 no aggregation, >1 aggregation */ |
1969 | u8 bt_kill_count; /* # blocked by bluetooth (unused for agg) */ | 1969 | u8 bt_kill_count; /* # blocked by bluetooth (unused for agg) */ |
1970 | u8 failure_rts; /* # failures due to unsuccessful RTS */ | 1970 | u8 failure_rts; /* # failures due to unsuccessful RTS */ |
@@ -3800,6 +3800,21 @@ enum { | |||
3800 | 3800 | ||
3801 | #define IWL_CALIB_INIT_CFG_ALL cpu_to_le32(0xffffffff) | 3801 | #define IWL_CALIB_INIT_CFG_ALL cpu_to_le32(0xffffffff) |
3802 | 3802 | ||
3803 | /* This enum defines the bitmap of various calibrations to enable in both | ||
3804 | * init ucode and runtime ucode through CALIBRATION_CFG_CMD. | ||
3805 | */ | ||
3806 | enum iwl_ucode_calib_cfg { | ||
3807 | IWL_CALIB_CFG_RX_BB_IDX, | ||
3808 | IWL_CALIB_CFG_DC_IDX, | ||
3809 | IWL_CALIB_CFG_TX_IQ_IDX, | ||
3810 | IWL_CALIB_CFG_RX_IQ_IDX, | ||
3811 | IWL_CALIB_CFG_NOISE_IDX, | ||
3812 | IWL_CALIB_CFG_CRYSTAL_IDX, | ||
3813 | IWL_CALIB_CFG_TEMPERATURE_IDX, | ||
3814 | IWL_CALIB_CFG_PAPD_IDX, | ||
3815 | }; | ||
3816 | |||
3817 | |||
3803 | struct iwl_calib_cfg_elmnt_s { | 3818 | struct iwl_calib_cfg_elmnt_s { |
3804 | __le32 is_enable; | 3819 | __le32 is_enable; |
3805 | __le32 start; | 3820 | __le32 start; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 5c568933ce48..516c55ae38aa 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -232,7 +232,8 @@ static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv, | |||
232 | 232 | ||
233 | ht_info->ht_supported = true; | 233 | ht_info->ht_supported = true; |
234 | 234 | ||
235 | if (priv->cfg->ht_greenfield_support) | 235 | if (priv->cfg->ht_params && |
236 | priv->cfg->ht_params->ht_greenfield_support) | ||
236 | ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD; | 237 | ht_info->cap |= IEEE80211_HT_CAP_GRN_FLD; |
237 | ht_info->cap |= IEEE80211_HT_CAP_SGI_20; | 238 | ht_info->cap |= IEEE80211_HT_CAP_SGI_20; |
238 | max_bit_rate = MAX_BIT_RATE_20_MHZ; | 239 | max_bit_rate = MAX_BIT_RATE_20_MHZ; |
@@ -247,11 +248,11 @@ static void iwlcore_init_ht_hw_capab(const struct iwl_priv *priv, | |||
247 | ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU; | 248 | ht_info->cap |= IEEE80211_HT_CAP_MAX_AMSDU; |
248 | 249 | ||
249 | ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF; | 250 | ht_info->ampdu_factor = CFG_HT_RX_AMPDU_FACTOR_DEF; |
250 | if (priv->cfg->ampdu_factor) | 251 | if (priv->cfg->bt_params && priv->cfg->bt_params->ampdu_factor) |
251 | ht_info->ampdu_factor = priv->cfg->ampdu_factor; | 252 | ht_info->ampdu_factor = priv->cfg->bt_params->ampdu_factor; |
252 | ht_info->ampdu_density = CFG_HT_MPDU_DENSITY_DEF; | 253 | ht_info->ampdu_density = CFG_HT_MPDU_DENSITY_DEF; |
253 | if (priv->cfg->ampdu_density) | 254 | if (priv->cfg->bt_params && priv->cfg->bt_params->ampdu_density) |
254 | ht_info->ampdu_density = priv->cfg->ampdu_density; | 255 | ht_info->ampdu_density = priv->cfg->bt_params->ampdu_density; |
255 | 256 | ||
256 | ht_info->mcs.rx_mask[0] = 0xFF; | 257 | ht_info->mcs.rx_mask[0] = 0xFF; |
257 | if (rx_chains_num >= 2) | 258 | if (rx_chains_num >= 2) |
@@ -850,8 +851,10 @@ EXPORT_SYMBOL(iwl_set_rxon_ht); | |||
850 | */ | 851 | */ |
851 | static int iwl_get_active_rx_chain_count(struct iwl_priv *priv) | 852 | static int iwl_get_active_rx_chain_count(struct iwl_priv *priv) |
852 | { | 853 | { |
853 | if (priv->cfg->advanced_bt_coexist && (priv->bt_full_concurrent || | 854 | if (priv->cfg->bt_params && |
854 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { | 855 | priv->cfg->bt_params->advanced_bt_coexist && |
856 | (priv->bt_full_concurrent || | ||
857 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { | ||
855 | /* | 858 | /* |
856 | * only use chain 'A' in bt high traffic load or | 859 | * only use chain 'A' in bt high traffic load or |
857 | * full concurrency mode | 860 | * full concurrency mode |
@@ -919,8 +922,10 @@ void iwl_set_rxon_chain(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
919 | else | 922 | else |
920 | active_chains = priv->hw_params.valid_rx_ant; | 923 | active_chains = priv->hw_params.valid_rx_ant; |
921 | 924 | ||
922 | if (priv->cfg->advanced_bt_coexist && (priv->bt_full_concurrent || | 925 | if (priv->cfg->bt_params && |
923 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { | 926 | priv->cfg->bt_params->advanced_bt_coexist && |
927 | (priv->bt_full_concurrent || | ||
928 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { | ||
924 | /* | 929 | /* |
925 | * only use chain 'A' in bt high traffic load or | 930 | * only use chain 'A' in bt high traffic load or |
926 | * full concurrency mode | 931 | * full concurrency mode |
@@ -1362,7 +1367,7 @@ int iwl_apm_init(struct iwl_priv *priv) | |||
1362 | * If not (unlikely), enable L0S, so there is at least some | 1367 | * If not (unlikely), enable L0S, so there is at least some |
1363 | * power savings, even without L1. | 1368 | * power savings, even without L1. |
1364 | */ | 1369 | */ |
1365 | if (priv->cfg->set_l0s) { | 1370 | if (priv->cfg->base_params->set_l0s) { |
1366 | lctl = iwl_pcie_link_ctl(priv); | 1371 | lctl = iwl_pcie_link_ctl(priv); |
1367 | if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == | 1372 | if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == |
1368 | PCI_CFG_LINK_CTRL_VAL_L1_EN) { | 1373 | PCI_CFG_LINK_CTRL_VAL_L1_EN) { |
@@ -1379,8 +1384,9 @@ int iwl_apm_init(struct iwl_priv *priv) | |||
1379 | } | 1384 | } |
1380 | 1385 | ||
1381 | /* Configure analog phase-lock-loop before activating to D0A */ | 1386 | /* Configure analog phase-lock-loop before activating to D0A */ |
1382 | if (priv->cfg->pll_cfg_val) | 1387 | if (priv->cfg->base_params->pll_cfg_val) |
1383 | iwl_set_bit(priv, CSR_ANA_PLL_CFG, priv->cfg->pll_cfg_val); | 1388 | iwl_set_bit(priv, CSR_ANA_PLL_CFG, |
1389 | priv->cfg->base_params->pll_cfg_val); | ||
1384 | 1390 | ||
1385 | /* | 1391 | /* |
1386 | * Set "initialization complete" bit to move adapter from | 1392 | * Set "initialization complete" bit to move adapter from |
@@ -1411,7 +1417,7 @@ int iwl_apm_init(struct iwl_priv *priv) | |||
1411 | * do not disable clocks. This preserves any hardware bits already | 1417 | * do not disable clocks. This preserves any hardware bits already |
1412 | * set by default in "CLK_CTRL_REG" after reset. | 1418 | * set by default in "CLK_CTRL_REG" after reset. |
1413 | */ | 1419 | */ |
1414 | if (priv->cfg->use_bsm) | 1420 | if (priv->cfg->base_params->use_bsm) |
1415 | iwl_write_prph(priv, APMG_CLK_EN_REG, | 1421 | iwl_write_prph(priv, APMG_CLK_EN_REG, |
1416 | APMG_CLK_VAL_DMA_CLK_RQT | APMG_CLK_VAL_BSM_CLK_RQT); | 1422 | APMG_CLK_VAL_DMA_CLK_RQT | APMG_CLK_VAL_BSM_CLK_RQT); |
1417 | else | 1423 | else |
@@ -2003,7 +2009,8 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
2003 | 2009 | ||
2004 | mutex_lock(&priv->mutex); | 2010 | mutex_lock(&priv->mutex); |
2005 | 2011 | ||
2006 | if (WARN_ON(!iwl_is_ready_rf(priv))) { | 2012 | if (!iwl_is_ready_rf(priv)) { |
2013 | IWL_WARN(priv, "Try to add interface when device not ready\n"); | ||
2007 | err = -EINVAL; | 2014 | err = -EINVAL; |
2008 | goto out; | 2015 | goto out; |
2009 | } | 2016 | } |
@@ -2053,7 +2060,8 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
2053 | goto out_err; | 2060 | goto out_err; |
2054 | } | 2061 | } |
2055 | 2062 | ||
2056 | if (priv->cfg->advanced_bt_coexist && | 2063 | if (priv->cfg->bt_params && |
2064 | priv->cfg->bt_params->advanced_bt_coexist && | ||
2057 | vif->type == NL80211_IFTYPE_ADHOC) { | 2065 | vif->type == NL80211_IFTYPE_ADHOC) { |
2058 | /* | 2066 | /* |
2059 | * pretend to have high BT traffic as long as we | 2067 | * pretend to have high BT traffic as long as we |
@@ -2316,7 +2324,8 @@ int iwl_alloc_txq_mem(struct iwl_priv *priv) | |||
2316 | { | 2324 | { |
2317 | if (!priv->txq) | 2325 | if (!priv->txq) |
2318 | priv->txq = kzalloc( | 2326 | priv->txq = kzalloc( |
2319 | sizeof(struct iwl_tx_queue) * priv->cfg->num_of_queues, | 2327 | sizeof(struct iwl_tx_queue) * |
2328 | priv->cfg->base_params->num_of_queues, | ||
2320 | GFP_KERNEL); | 2329 | GFP_KERNEL); |
2321 | if (!priv->txq) { | 2330 | if (!priv->txq) { |
2322 | IWL_ERR(priv, "Not enough memory for txq\n"); | 2331 | IWL_ERR(priv, "Not enough memory for txq\n"); |
@@ -2736,11 +2745,6 @@ int iwl_force_reset(struct iwl_priv *priv, int mode, bool external) | |||
2736 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 2745 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
2737 | return -EINVAL; | 2746 | return -EINVAL; |
2738 | 2747 | ||
2739 | if (test_bit(STATUS_SCANNING, &priv->status)) { | ||
2740 | IWL_DEBUG_INFO(priv, "scan in progress.\n"); | ||
2741 | return -EINVAL; | ||
2742 | } | ||
2743 | |||
2744 | if (mode >= IWL_MAX_FORCE_RESET) { | 2748 | if (mode >= IWL_MAX_FORCE_RESET) { |
2745 | IWL_DEBUG_INFO(priv, "invalid reset request.\n"); | 2749 | IWL_DEBUG_INFO(priv, "invalid reset request.\n"); |
2746 | return -EINVAL; | 2750 | return -EINVAL; |
@@ -2827,33 +2831,34 @@ static int iwl_check_stuck_queue(struct iwl_priv *priv, int cnt) | |||
2827 | txq = &priv->txq[cnt]; | 2831 | txq = &priv->txq[cnt]; |
2828 | q = &txq->q; | 2832 | q = &txq->q; |
2829 | /* queue is empty, skip */ | 2833 | /* queue is empty, skip */ |
2830 | if (q->read_ptr != q->write_ptr) { | 2834 | if (q->read_ptr == q->write_ptr) |
2831 | if (q->read_ptr == q->last_read_ptr) { | 2835 | return 0; |
2832 | /* a queue has not been read from last time */ | 2836 | |
2833 | if (q->repeat_same_read_ptr > MAX_REPEAT) { | 2837 | if (q->read_ptr == q->last_read_ptr) { |
2834 | IWL_ERR(priv, | 2838 | /* a queue has not been read from last time */ |
2835 | "queue %d stuck %d time. Fw reload.\n", | 2839 | if (q->repeat_same_read_ptr > MAX_REPEAT) { |
2836 | q->id, q->repeat_same_read_ptr); | 2840 | IWL_ERR(priv, |
2837 | q->repeat_same_read_ptr = 0; | 2841 | "queue %d stuck %d time. Fw reload.\n", |
2838 | iwl_force_reset(priv, IWL_FW_RESET, false); | 2842 | q->id, q->repeat_same_read_ptr); |
2839 | } else { | ||
2840 | q->repeat_same_read_ptr++; | ||
2841 | IWL_DEBUG_RADIO(priv, | ||
2842 | "queue %d, not read %d time\n", | ||
2843 | q->id, | ||
2844 | q->repeat_same_read_ptr); | ||
2845 | if (!priv->cfg->advanced_bt_coexist) { | ||
2846 | mod_timer(&priv->monitor_recover, | ||
2847 | jiffies + msecs_to_jiffies( | ||
2848 | IWL_ONE_HUNDRED_MSECS)); | ||
2849 | return 1; | ||
2850 | } | ||
2851 | } | ||
2852 | return 0; | ||
2853 | } else { | ||
2854 | q->last_read_ptr = q->read_ptr; | ||
2855 | q->repeat_same_read_ptr = 0; | 2843 | q->repeat_same_read_ptr = 0; |
2844 | iwl_force_reset(priv, IWL_FW_RESET, false); | ||
2845 | } else { | ||
2846 | q->repeat_same_read_ptr++; | ||
2847 | IWL_DEBUG_RADIO(priv, | ||
2848 | "queue %d, not read %d time\n", | ||
2849 | q->id, | ||
2850 | q->repeat_same_read_ptr); | ||
2851 | if (priv->cfg->bt_params && | ||
2852 | !priv->cfg->bt_params->advanced_bt_coexist) { | ||
2853 | mod_timer(&priv->monitor_recover, | ||
2854 | jiffies + msecs_to_jiffies( | ||
2855 | IWL_ONE_HUNDRED_MSECS)); | ||
2856 | return 1; | ||
2857 | } | ||
2856 | } | 2858 | } |
2859 | } else { | ||
2860 | q->last_read_ptr = q->read_ptr; | ||
2861 | q->repeat_same_read_ptr = 0; | ||
2857 | } | 2862 | } |
2858 | return 0; | 2863 | return 0; |
2859 | } | 2864 | } |
@@ -2880,13 +2885,13 @@ void iwl_bg_monitor_recover(unsigned long data) | |||
2880 | return; | 2885 | return; |
2881 | } | 2886 | } |
2882 | } | 2887 | } |
2883 | if (priv->cfg->monitor_recover_period) { | 2888 | if (priv->cfg->base_params->monitor_recover_period) { |
2884 | /* | 2889 | /* |
2885 | * Reschedule the timer to occur in | 2890 | * Reschedule the timer to occur in |
2886 | * priv->cfg->monitor_recover_period | 2891 | * priv->cfg->base_params->monitor_recover_period |
2887 | */ | 2892 | */ |
2888 | mod_timer(&priv->monitor_recover, jiffies + msecs_to_jiffies( | 2893 | mod_timer(&priv->monitor_recover, jiffies + msecs_to_jiffies( |
2889 | priv->cfg->monitor_recover_period)); | 2894 | priv->cfg->base_params->monitor_recover_period)); |
2890 | } | 2895 | } |
2891 | } | 2896 | } |
2892 | EXPORT_SYMBOL(iwl_bg_monitor_recover); | 2897 | EXPORT_SYMBOL(iwl_bg_monitor_recover); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index f0302bfe85f5..6228b1c2ec96 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -137,7 +137,6 @@ struct iwl_debugfs_ops { | |||
137 | struct iwl_temp_ops { | 137 | struct iwl_temp_ops { |
138 | void (*temperature)(struct iwl_priv *priv); | 138 | void (*temperature)(struct iwl_priv *priv); |
139 | void (*set_ct_kill)(struct iwl_priv *priv); | 139 | void (*set_ct_kill)(struct iwl_priv *priv); |
140 | void (*set_calib_version)(struct iwl_priv *priv); | ||
141 | }; | 140 | }; |
142 | 141 | ||
143 | struct iwl_tt_ops { | 142 | struct iwl_tt_ops { |
@@ -233,11 +232,17 @@ struct iwl_led_ops { | |||
233 | int (*off)(struct iwl_priv *priv); | 232 | int (*off)(struct iwl_priv *priv); |
234 | }; | 233 | }; |
235 | 234 | ||
235 | /* NIC specific ops */ | ||
236 | struct iwl_nic_ops { | ||
237 | void (*additional_nic_config)(struct iwl_priv *priv); | ||
238 | }; | ||
239 | |||
236 | struct iwl_ops { | 240 | struct iwl_ops { |
237 | const struct iwl_lib_ops *lib; | 241 | const struct iwl_lib_ops *lib; |
238 | const struct iwl_hcmd_ops *hcmd; | 242 | const struct iwl_hcmd_ops *hcmd; |
239 | const struct iwl_hcmd_utils_ops *utils; | 243 | const struct iwl_hcmd_utils_ops *utils; |
240 | const struct iwl_led_ops *led; | 244 | const struct iwl_led_ops *led; |
245 | const struct iwl_nic_ops *nic; | ||
241 | }; | 246 | }; |
242 | 247 | ||
243 | struct iwl_mod_params { | 248 | struct iwl_mod_params { |
@@ -250,20 +255,12 @@ struct iwl_mod_params { | |||
250 | int restart_fw; /* def: 1 = restart firmware */ | 255 | int restart_fw; /* def: 1 = restart firmware */ |
251 | }; | 256 | }; |
252 | 257 | ||
253 | /** | 258 | /* |
254 | * struct iwl_cfg | ||
255 | * @fw_name_pre: Firmware filename prefix. The api version and extension | ||
256 | * (.ucode) will be added to filename before loading from disk. The | ||
257 | * filename is constructed as fw_name_pre<api>.ucode. | ||
258 | * @ucode_api_max: Highest version of uCode API supported by driver. | ||
259 | * @ucode_api_min: Lowest version of uCode API supported by driver. | ||
260 | * @pa_type: used by 6000 series only to identify the type of Power Amplifier | ||
261 | * @max_ll_items: max number of OTP blocks | 259 | * @max_ll_items: max number of OTP blocks |
262 | * @shadow_ram_support: shadow support for OTP memory | 260 | * @shadow_ram_support: shadow support for OTP memory |
263 | * @led_compensation: compensate on the led on/off time per HW according | 261 | * @led_compensation: compensate on the led on/off time per HW according |
264 | * to the deviation to achieve the desired led frequency. | 262 | * to the deviation to achieve the desired led frequency. |
265 | * The detail algorithm is described in iwl-led.c | 263 | * The detail algorithm is described in iwl-led.c |
266 | * @use_rts_for_aggregation: use rts/cts protection for HT traffic | ||
267 | * @chain_noise_num_beacons: number of beacons used to compute chain noise | 264 | * @chain_noise_num_beacons: number of beacons used to compute chain noise |
268 | * @adv_thermal_throttle: support advance thermal throttle | 265 | * @adv_thermal_throttle: support advance thermal throttle |
269 | * @support_ct_kill_exit: support ct kill exit condition | 266 | * @support_ct_kill_exit: support ct kill exit condition |
@@ -281,15 +278,73 @@ struct iwl_mod_params { | |||
281 | * sensitivity calibration operation | 278 | * sensitivity calibration operation |
282 | * @chain_noise_calib_by_driver: driver has the capability to perform | 279 | * @chain_noise_calib_by_driver: driver has the capability to perform |
283 | * chain noise calibration operation | 280 | * chain noise calibration operation |
284 | * @scan_antennas: available antenna for scan operation | 281 | */ |
282 | struct iwl_base_params { | ||
283 | int eeprom_size; | ||
284 | int num_of_queues; /* def: HW dependent */ | ||
285 | int num_of_ampdu_queues;/* def: HW dependent */ | ||
286 | /* for iwl_apm_init() */ | ||
287 | u32 pll_cfg_val; | ||
288 | bool set_l0s; | ||
289 | bool use_bsm; | ||
290 | |||
291 | bool use_isr_legacy; | ||
292 | const u16 max_ll_items; | ||
293 | const bool shadow_ram_support; | ||
294 | u16 led_compensation; | ||
295 | const bool broken_powersave; | ||
296 | int chain_noise_num_beacons; | ||
297 | const bool supports_idle; | ||
298 | bool adv_thermal_throttle; | ||
299 | bool support_ct_kill_exit; | ||
300 | const bool support_wimax_coexist; | ||
301 | u8 plcp_delta_threshold; | ||
302 | s32 chain_noise_scale; | ||
303 | /* timer period for monitor the driver queues */ | ||
304 | u32 monitor_recover_period; | ||
305 | bool temperature_kelvin; | ||
306 | u32 max_event_log_size; | ||
307 | const bool tx_power_by_driver; | ||
308 | const bool ucode_tracing; | ||
309 | const bool sensitivity_calib_by_driver; | ||
310 | const bool chain_noise_calib_by_driver; | ||
311 | }; | ||
312 | /* | ||
285 | * @advanced_bt_coexist: support advanced bt coexist | 313 | * @advanced_bt_coexist: support advanced bt coexist |
286 | * @bt_init_traffic_load: specify initial bt traffic load | 314 | * @bt_init_traffic_load: specify initial bt traffic load |
287 | * @bt_prio_boost: default bt priority boost value | 315 | * @bt_prio_boost: default bt priority boost value |
288 | * @need_dc_calib: need to perform init dc calibration | ||
289 | * @bt_statistics: use BT version of statistics notification | 316 | * @bt_statistics: use BT version of statistics notification |
290 | * @agg_time_limit: maximum number of uSec in aggregation | 317 | * @agg_time_limit: maximum number of uSec in aggregation |
291 | * @ampdu_factor: Maximum A-MPDU length factor | 318 | * @ampdu_factor: Maximum A-MPDU length factor |
292 | * @ampdu_density: Minimum A-MPDU spacing | 319 | * @ampdu_density: Minimum A-MPDU spacing |
320 | */ | ||
321 | struct iwl_bt_params { | ||
322 | bool advanced_bt_coexist; | ||
323 | u8 bt_init_traffic_load; | ||
324 | u8 bt_prio_boost; | ||
325 | const bool bt_statistics; | ||
326 | u16 agg_time_limit; | ||
327 | u8 ampdu_factor; | ||
328 | u8 ampdu_density; | ||
329 | }; | ||
330 | /* | ||
331 | * @use_rts_for_aggregation: use rts/cts protection for HT traffic | ||
332 | */ | ||
333 | struct iwl_ht_params { | ||
334 | const bool ht_greenfield_support; /* if used set to true */ | ||
335 | bool use_rts_for_aggregation; | ||
336 | }; | ||
337 | |||
338 | /** | ||
339 | * struct iwl_cfg | ||
340 | * @fw_name_pre: Firmware filename prefix. The api version and extension | ||
341 | * (.ucode) will be added to filename before loading from disk. The | ||
342 | * filename is constructed as fw_name_pre<api>.ucode. | ||
343 | * @ucode_api_max: Highest version of uCode API supported by driver. | ||
344 | * @ucode_api_min: Lowest version of uCode API supported by driver. | ||
345 | * @pa_type: used by 6000 series only to identify the type of Power Amplifier | ||
346 | * @need_dc_calib: need to perform init dc calibration | ||
347 | * @scan_antennas: available antenna for scan operation | ||
293 | * | 348 | * |
294 | * We enable the driver to be backward compatible wrt API version. The | 349 | * We enable the driver to be backward compatible wrt API version. The |
295 | * driver specifies which APIs it supports (with @ucode_api_max being the | 350 | * driver specifies which APIs it supports (with @ucode_api_max being the |
@@ -300,9 +355,9 @@ struct iwl_mod_params { | |||
300 | * | 355 | * |
301 | * For example, | 356 | * For example, |
302 | * if (IWL_UCODE_API(priv->ucode_ver) >= 2) { | 357 | * if (IWL_UCODE_API(priv->ucode_ver) >= 2) { |
303 | * Driver interacts with Firmware API version >= 2. | 358 | * Driver interacts with Firmware API version >= 2. |
304 | * } else { | 359 | * } else { |
305 | * Driver interacts with Firmware API version 1. | 360 | * Driver interacts with Firmware API version 1. |
306 | * } | 361 | * } |
307 | * | 362 | * |
308 | * The ideal usage of this infrastructure is to treat a new ucode API | 363 | * The ideal usage of this infrastructure is to treat a new ucode API |
@@ -313,59 +368,28 @@ struct iwl_mod_params { | |||
313 | * | 368 | * |
314 | */ | 369 | */ |
315 | struct iwl_cfg { | 370 | struct iwl_cfg { |
371 | /* params specific to an individual device within a device family */ | ||
316 | const char *name; | 372 | const char *name; |
317 | const char *fw_name_pre; | 373 | const char *fw_name_pre; |
318 | const unsigned int ucode_api_max; | 374 | const unsigned int ucode_api_max; |
319 | const unsigned int ucode_api_min; | 375 | const unsigned int ucode_api_min; |
376 | u8 valid_tx_ant; | ||
377 | u8 valid_rx_ant; | ||
320 | unsigned int sku; | 378 | unsigned int sku; |
321 | int eeprom_size; | ||
322 | u16 eeprom_ver; | 379 | u16 eeprom_ver; |
323 | u16 eeprom_calib_ver; | 380 | u16 eeprom_calib_ver; |
324 | int num_of_queues; /* def: HW dependent */ | ||
325 | int num_of_ampdu_queues;/* def: HW dependent */ | ||
326 | const struct iwl_ops *ops; | 381 | const struct iwl_ops *ops; |
382 | /* module based parameters which can be set from modprobe cmd */ | ||
327 | const struct iwl_mod_params *mod_params; | 383 | const struct iwl_mod_params *mod_params; |
328 | u8 valid_tx_ant; | 384 | /* params not likely to change within a device family */ |
329 | u8 valid_rx_ant; | 385 | struct iwl_base_params *base_params; |
330 | 386 | /* params likely to change within a device family */ | |
331 | /* for iwl_apm_init() */ | 387 | struct iwl_ht_params *ht_params; |
332 | u32 pll_cfg_val; | 388 | struct iwl_bt_params *bt_params; |
333 | bool set_l0s; | 389 | enum iwl_pa_type pa_type; /* if used set to IWL_PA_SYSTEM */ |
334 | bool use_bsm; | 390 | const bool need_dc_calib; /* if used set to true */ |
335 | |||
336 | bool use_isr_legacy; | ||
337 | enum iwl_pa_type pa_type; | ||
338 | const u16 max_ll_items; | ||
339 | const bool shadow_ram_support; | ||
340 | const bool ht_greenfield_support; | ||
341 | u16 led_compensation; | ||
342 | const bool broken_powersave; | ||
343 | bool use_rts_for_aggregation; | ||
344 | int chain_noise_num_beacons; | ||
345 | const bool supports_idle; | ||
346 | bool adv_thermal_throttle; | ||
347 | bool support_ct_kill_exit; | ||
348 | const bool support_wimax_coexist; | ||
349 | u8 plcp_delta_threshold; | ||
350 | s32 chain_noise_scale; | ||
351 | /* timer period for monitor the driver queues */ | ||
352 | u32 monitor_recover_period; | ||
353 | bool temperature_kelvin; | ||
354 | u32 max_event_log_size; | ||
355 | const bool tx_power_by_driver; | ||
356 | const bool ucode_tracing; | ||
357 | const bool sensitivity_calib_by_driver; | ||
358 | const bool chain_noise_calib_by_driver; | ||
359 | u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; | 391 | u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; |
360 | u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; | 392 | u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; |
361 | bool advanced_bt_coexist; | ||
362 | u8 bt_init_traffic_load; | ||
363 | u8 bt_prio_boost; | ||
364 | const bool need_dc_calib; | ||
365 | const bool bt_statistics; | ||
366 | u16 agg_time_limit; | ||
367 | u8 ampdu_factor; | ||
368 | u8 ampdu_density; | ||
369 | }; | 393 | }; |
370 | 394 | ||
371 | /*************************** | 395 | /*************************** |
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h index ecf98e7ac4ed..2aa15ab13892 100644 --- a/drivers/net/wireless/iwlwifi/iwl-csr.h +++ b/drivers/net/wireless/iwlwifi/iwl-csr.h | |||
@@ -371,7 +371,8 @@ | |||
371 | #define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_3x3_HYB (0x00000000) | 371 | #define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_3x3_HYB (0x00000000) |
372 | #define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_HYB (0x00000001) | 372 | #define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_HYB (0x00000001) |
373 | #define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA (0x00000002) | 373 | #define CSR_GP_DRIVER_REG_BIT_RADIO_SKU_2x2_IPA (0x00000002) |
374 | #define CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6 (0x00000004) | 374 | #define CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6 (0x00000004) |
375 | #define CSR_GP_DRIVER_REG_BIT_6050_1x2 (0x00000008) | ||
375 | 376 | ||
376 | /* GIO Chicken Bits (PCI Express bus link power management) */ | 377 | /* GIO Chicken Bits (PCI Express bus link power management) */ |
377 | #define CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX (0x00800000) | 378 | #define CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX (0x00800000) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index 265ad01a443f..fc340311ea0a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -356,7 +356,7 @@ static ssize_t iwl_dbgfs_nvm_read(struct file *file, | |||
356 | const u8 *ptr; | 356 | const u8 *ptr; |
357 | char *buf; | 357 | char *buf; |
358 | u16 eeprom_ver; | 358 | u16 eeprom_ver; |
359 | size_t eeprom_len = priv->cfg->eeprom_size; | 359 | size_t eeprom_len = priv->cfg->base_params->eeprom_size; |
360 | buf_size = 4 * eeprom_len + 256; | 360 | buf_size = 4 * eeprom_len + 256; |
361 | 361 | ||
362 | if (eeprom_len % 16) { | 362 | if (eeprom_len % 16) { |
@@ -872,7 +872,7 @@ static ssize_t iwl_dbgfs_traffic_log_read(struct file *file, | |||
872 | struct iwl_rx_queue *rxq = &priv->rxq; | 872 | struct iwl_rx_queue *rxq = &priv->rxq; |
873 | char *buf; | 873 | char *buf; |
874 | int bufsz = ((IWL_TRAFFIC_ENTRIES * IWL_TRAFFIC_ENTRY_SIZE * 64) * 2) + | 874 | int bufsz = ((IWL_TRAFFIC_ENTRIES * IWL_TRAFFIC_ENTRY_SIZE * 64) * 2) + |
875 | (priv->cfg->num_of_queues * 32 * 8) + 400; | 875 | (priv->cfg->base_params->num_of_queues * 32 * 8) + 400; |
876 | const u8 *ptr; | 876 | const u8 *ptr; |
877 | ssize_t ret; | 877 | ssize_t ret; |
878 | 878 | ||
@@ -971,7 +971,8 @@ static ssize_t iwl_dbgfs_tx_queue_read(struct file *file, | |||
971 | int pos = 0; | 971 | int pos = 0; |
972 | int cnt; | 972 | int cnt; |
973 | int ret; | 973 | int ret; |
974 | const size_t bufsz = sizeof(char) * 64 * priv->cfg->num_of_queues; | 974 | const size_t bufsz = sizeof(char) * 64 * |
975 | priv->cfg->base_params->num_of_queues; | ||
975 | 976 | ||
976 | if (!priv->txq) { | 977 | if (!priv->txq) { |
977 | IWL_ERR(priv, "txq not ready\n"); | 978 | IWL_ERR(priv, "txq not ready\n"); |
@@ -1415,7 +1416,7 @@ static ssize_t iwl_dbgfs_plcp_delta_read(struct file *file, | |||
1415 | const size_t bufsz = sizeof(buf); | 1416 | const size_t bufsz = sizeof(buf); |
1416 | 1417 | ||
1417 | pos += scnprintf(buf + pos, bufsz - pos, "%u\n", | 1418 | pos += scnprintf(buf + pos, bufsz - pos, "%u\n", |
1418 | priv->cfg->plcp_delta_threshold); | 1419 | priv->cfg->base_params->plcp_delta_threshold); |
1419 | 1420 | ||
1420 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); | 1421 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
1421 | } | 1422 | } |
@@ -1437,10 +1438,10 @@ static ssize_t iwl_dbgfs_plcp_delta_write(struct file *file, | |||
1437 | return -EINVAL; | 1438 | return -EINVAL; |
1438 | if ((plcp < IWL_MAX_PLCP_ERR_THRESHOLD_MIN) || | 1439 | if ((plcp < IWL_MAX_PLCP_ERR_THRESHOLD_MIN) || |
1439 | (plcp > IWL_MAX_PLCP_ERR_THRESHOLD_MAX)) | 1440 | (plcp > IWL_MAX_PLCP_ERR_THRESHOLD_MAX)) |
1440 | priv->cfg->plcp_delta_threshold = | 1441 | priv->cfg->base_params->plcp_delta_threshold = |
1441 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE; | 1442 | IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE; |
1442 | else | 1443 | else |
1443 | priv->cfg->plcp_delta_threshold = plcp; | 1444 | priv->cfg->base_params->plcp_delta_threshold = plcp; |
1444 | return count; | 1445 | return count; |
1445 | } | 1446 | } |
1446 | 1447 | ||
@@ -1550,13 +1551,14 @@ static ssize_t iwl_dbgfs_monitor_period_write(struct file *file, | |||
1550 | if (sscanf(buf, "%d", &period) != 1) | 1551 | if (sscanf(buf, "%d", &period) != 1) |
1551 | return -EINVAL; | 1552 | return -EINVAL; |
1552 | if (period < 0 || period > IWL_MAX_MONITORING_PERIOD) | 1553 | if (period < 0 || period > IWL_MAX_MONITORING_PERIOD) |
1553 | priv->cfg->monitor_recover_period = IWL_DEF_MONITORING_PERIOD; | 1554 | priv->cfg->base_params->monitor_recover_period = |
1555 | IWL_DEF_MONITORING_PERIOD; | ||
1554 | else | 1556 | else |
1555 | priv->cfg->monitor_recover_period = period; | 1557 | priv->cfg->base_params->monitor_recover_period = period; |
1556 | 1558 | ||
1557 | if (priv->cfg->monitor_recover_period) | 1559 | if (priv->cfg->base_params->monitor_recover_period) |
1558 | mod_timer(&priv->monitor_recover, jiffies + msecs_to_jiffies( | 1560 | mod_timer(&priv->monitor_recover, jiffies + msecs_to_jiffies( |
1559 | priv->cfg->monitor_recover_period)); | 1561 | priv->cfg->base_params->monitor_recover_period)); |
1560 | else | 1562 | else |
1561 | del_timer_sync(&priv->monitor_recover); | 1563 | del_timer_sync(&priv->monitor_recover); |
1562 | return count; | 1564 | return count; |
@@ -1614,9 +1616,14 @@ static ssize_t iwl_dbgfs_protection_mode_read(struct file *file, | |||
1614 | char buf[40]; | 1616 | char buf[40]; |
1615 | const size_t bufsz = sizeof(buf); | 1617 | const size_t bufsz = sizeof(buf); |
1616 | 1618 | ||
1617 | pos += scnprintf(buf + pos, bufsz - pos, "use %s for aggregation\n", | 1619 | if (priv->cfg->ht_params) |
1618 | (priv->cfg->use_rts_for_aggregation) ? "rts/cts" : | 1620 | pos += scnprintf(buf + pos, bufsz - pos, |
1619 | "cts-to-self"); | 1621 | "use %s for aggregation\n", |
1622 | (priv->cfg->ht_params->use_rts_for_aggregation) ? | ||
1623 | "rts/cts" : "cts-to-self"); | ||
1624 | else | ||
1625 | pos += scnprintf(buf + pos, bufsz - pos, "N/A"); | ||
1626 | |||
1620 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); | 1627 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |
1621 | } | 1628 | } |
1622 | 1629 | ||
@@ -1629,6 +1636,9 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file, | |||
1629 | int buf_size; | 1636 | int buf_size; |
1630 | int rts; | 1637 | int rts; |
1631 | 1638 | ||
1639 | if (!priv->cfg->ht_params) | ||
1640 | return -EINVAL; | ||
1641 | |||
1632 | memset(buf, 0, sizeof(buf)); | 1642 | memset(buf, 0, sizeof(buf)); |
1633 | buf_size = min(count, sizeof(buf) - 1); | 1643 | buf_size = min(count, sizeof(buf) - 1); |
1634 | if (copy_from_user(buf, user_buf, buf_size)) | 1644 | if (copy_from_user(buf, user_buf, buf_size)) |
@@ -1636,9 +1646,9 @@ static ssize_t iwl_dbgfs_protection_mode_write(struct file *file, | |||
1636 | if (sscanf(buf, "%d", &rts) != 1) | 1646 | if (sscanf(buf, "%d", &rts) != 1) |
1637 | return -EINVAL; | 1647 | return -EINVAL; |
1638 | if (rts) | 1648 | if (rts) |
1639 | priv->cfg->use_rts_for_aggregation = true; | 1649 | priv->cfg->ht_params->use_rts_for_aggregation = true; |
1640 | else | 1650 | else |
1641 | priv->cfg->use_rts_for_aggregation = false; | 1651 | priv->cfg->ht_params->use_rts_for_aggregation = false; |
1642 | return count; | 1652 | return count; |
1643 | } | 1653 | } |
1644 | 1654 | ||
@@ -1716,7 +1726,7 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
1716 | DEBUGFS_ADD_FILE(interrupt, dir_data, S_IWUSR | S_IRUSR); | 1726 | DEBUGFS_ADD_FILE(interrupt, dir_data, S_IWUSR | S_IRUSR); |
1717 | DEBUGFS_ADD_FILE(qos, dir_data, S_IRUSR); | 1727 | DEBUGFS_ADD_FILE(qos, dir_data, S_IRUSR); |
1718 | DEBUGFS_ADD_FILE(led, dir_data, S_IRUSR); | 1728 | DEBUGFS_ADD_FILE(led, dir_data, S_IRUSR); |
1719 | if (!priv->cfg->broken_powersave) { | 1729 | if (!priv->cfg->base_params->broken_powersave) { |
1720 | DEBUGFS_ADD_FILE(sleep_level_override, dir_data, | 1730 | DEBUGFS_ADD_FILE(sleep_level_override, dir_data, |
1721 | S_IWUSR | S_IRUSR); | 1731 | S_IWUSR | S_IRUSR); |
1722 | DEBUGFS_ADD_FILE(current_sleep_command, dir_data, S_IRUSR); | 1732 | DEBUGFS_ADD_FILE(current_sleep_command, dir_data, S_IRUSR); |
@@ -1743,27 +1753,27 @@ int iwl_dbgfs_register(struct iwl_priv *priv, const char *name) | |||
1743 | DEBUGFS_ADD_FILE(txfifo_flush, dir_debug, S_IWUSR); | 1753 | DEBUGFS_ADD_FILE(txfifo_flush, dir_debug, S_IWUSR); |
1744 | DEBUGFS_ADD_FILE(protection_mode, dir_debug, S_IWUSR | S_IRUSR); | 1754 | DEBUGFS_ADD_FILE(protection_mode, dir_debug, S_IWUSR | S_IRUSR); |
1745 | 1755 | ||
1746 | if (priv->cfg->sensitivity_calib_by_driver) | 1756 | if (priv->cfg->base_params->sensitivity_calib_by_driver) |
1747 | DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR); | 1757 | DEBUGFS_ADD_FILE(sensitivity, dir_debug, S_IRUSR); |
1748 | if (priv->cfg->chain_noise_calib_by_driver) | 1758 | if (priv->cfg->base_params->chain_noise_calib_by_driver) |
1749 | DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR); | 1759 | DEBUGFS_ADD_FILE(chain_noise, dir_debug, S_IRUSR); |
1750 | if (priv->cfg->ucode_tracing) | 1760 | if (priv->cfg->base_params->ucode_tracing) |
1751 | DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, S_IWUSR | S_IRUSR); | 1761 | DEBUGFS_ADD_FILE(ucode_tracing, dir_debug, S_IWUSR | S_IRUSR); |
1752 | if (priv->cfg->bt_statistics) | 1762 | if (priv->cfg->bt_params && priv->cfg->bt_params->bt_statistics) |
1753 | DEBUGFS_ADD_FILE(ucode_bt_stats, dir_debug, S_IRUSR); | 1763 | DEBUGFS_ADD_FILE(ucode_bt_stats, dir_debug, S_IRUSR); |
1754 | DEBUGFS_ADD_FILE(reply_tx_error, dir_debug, S_IRUSR); | 1764 | DEBUGFS_ADD_FILE(reply_tx_error, dir_debug, S_IRUSR); |
1755 | DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); | 1765 | DEBUGFS_ADD_FILE(rxon_flags, dir_debug, S_IWUSR); |
1756 | DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); | 1766 | DEBUGFS_ADD_FILE(rxon_filter_flags, dir_debug, S_IWUSR); |
1757 | DEBUGFS_ADD_FILE(monitor_period, dir_debug, S_IWUSR); | 1767 | DEBUGFS_ADD_FILE(monitor_period, dir_debug, S_IWUSR); |
1758 | if (priv->cfg->advanced_bt_coexist) | 1768 | if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist) |
1759 | DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR); | 1769 | DEBUGFS_ADD_FILE(bt_traffic, dir_debug, S_IRUSR); |
1760 | if (priv->cfg->sensitivity_calib_by_driver) | 1770 | if (priv->cfg->base_params->sensitivity_calib_by_driver) |
1761 | DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf, | 1771 | DEBUGFS_ADD_BOOL(disable_sensitivity, dir_rf, |
1762 | &priv->disable_sens_cal); | 1772 | &priv->disable_sens_cal); |
1763 | if (priv->cfg->chain_noise_calib_by_driver) | 1773 | if (priv->cfg->base_params->chain_noise_calib_by_driver) |
1764 | DEBUGFS_ADD_BOOL(disable_chain_noise, dir_rf, | 1774 | DEBUGFS_ADD_BOOL(disable_chain_noise, dir_rf, |
1765 | &priv->disable_chain_noise_cal); | 1775 | &priv->disable_chain_noise_cal); |
1766 | if (priv->cfg->tx_power_by_driver) | 1776 | if (priv->cfg->base_params->tx_power_by_driver) |
1767 | DEBUGFS_ADD_BOOL(disable_tx_power, dir_rf, | 1777 | DEBUGFS_ADD_BOOL(disable_tx_power, dir_rf, |
1768 | &priv->disable_tx_power_cal); | 1778 | &priv->disable_tx_power_cal); |
1769 | return 0; | 1779 | return 0; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 74d25bcbfcb2..90a37a94c698 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -684,6 +684,7 @@ struct iwl_sensitivity_ranges { | |||
684 | * @ct_kill_threshold: temperature threshold | 684 | * @ct_kill_threshold: temperature threshold |
685 | * @beacon_time_tsf_bits: number of valid tsf bits for beacon time | 685 | * @beacon_time_tsf_bits: number of valid tsf bits for beacon time |
686 | * @calib_init_cfg: setup initial calibrations for the hw | 686 | * @calib_init_cfg: setup initial calibrations for the hw |
687 | * @calib_rt_cfg: setup runtime calibrations for the hw | ||
687 | * @struct iwl_sensitivity_ranges: range of sensitivity values | 688 | * @struct iwl_sensitivity_ranges: range of sensitivity values |
688 | */ | 689 | */ |
689 | struct iwl_hw_params { | 690 | struct iwl_hw_params { |
@@ -710,6 +711,7 @@ struct iwl_hw_params { | |||
710 | /* for 1000, 6000 series and up */ | 711 | /* for 1000, 6000 series and up */ |
711 | u16 beacon_time_tsf_bits; | 712 | u16 beacon_time_tsf_bits; |
712 | u32 calib_init_cfg; | 713 | u32 calib_init_cfg; |
714 | u32 calib_rt_cfg; | ||
713 | const struct iwl_sensitivity_ranges *sens; | 715 | const struct iwl_sensitivity_ranges *sens; |
714 | }; | 716 | }; |
715 | 717 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index a45d02e555cf..88f4a80d4733 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -332,7 +332,7 @@ EXPORT_SYMBOL(iwlcore_eeprom_release_semaphore); | |||
332 | 332 | ||
333 | const u8 *iwlcore_eeprom_query_addr(const struct iwl_priv *priv, size_t offset) | 333 | const u8 *iwlcore_eeprom_query_addr(const struct iwl_priv *priv, size_t offset) |
334 | { | 334 | { |
335 | BUG_ON(offset >= priv->cfg->eeprom_size); | 335 | BUG_ON(offset >= priv->cfg->base_params->eeprom_size); |
336 | return &priv->eeprom[offset]; | 336 | return &priv->eeprom[offset]; |
337 | } | 337 | } |
338 | EXPORT_SYMBOL(iwlcore_eeprom_query_addr); | 338 | EXPORT_SYMBOL(iwlcore_eeprom_query_addr); |
@@ -364,7 +364,7 @@ static int iwl_init_otp_access(struct iwl_priv *priv) | |||
364 | * CSR auto clock gate disable bit - | 364 | * CSR auto clock gate disable bit - |
365 | * this is only applicable for HW with OTP shadow RAM | 365 | * this is only applicable for HW with OTP shadow RAM |
366 | */ | 366 | */ |
367 | if (priv->cfg->shadow_ram_support) | 367 | if (priv->cfg->base_params->shadow_ram_support) |
368 | iwl_set_bit(priv, CSR_DBG_LINK_PWR_MGMT_REG, | 368 | iwl_set_bit(priv, CSR_DBG_LINK_PWR_MGMT_REG, |
369 | CSR_RESET_LINK_PWR_MGMT_DISABLED); | 369 | CSR_RESET_LINK_PWR_MGMT_DISABLED); |
370 | } | 370 | } |
@@ -484,7 +484,7 @@ static int iwl_find_otp_image(struct iwl_priv *priv, | |||
484 | } | 484 | } |
485 | /* more in the link list, continue */ | 485 | /* more in the link list, continue */ |
486 | usedblocks++; | 486 | usedblocks++; |
487 | } while (usedblocks <= priv->cfg->max_ll_items); | 487 | } while (usedblocks <= priv->cfg->base_params->max_ll_items); |
488 | 488 | ||
489 | /* OTP has no valid blocks */ | 489 | /* OTP has no valid blocks */ |
490 | IWL_DEBUG_INFO(priv, "OTP has no valid blocks\n"); | 490 | IWL_DEBUG_INFO(priv, "OTP has no valid blocks\n"); |
@@ -512,8 +512,8 @@ int iwl_eeprom_init(struct iwl_priv *priv) | |||
512 | if (priv->nvm_device_type == -ENOENT) | 512 | if (priv->nvm_device_type == -ENOENT) |
513 | return -ENOENT; | 513 | return -ENOENT; |
514 | /* allocate eeprom */ | 514 | /* allocate eeprom */ |
515 | IWL_DEBUG_INFO(priv, "NVM size = %d\n", priv->cfg->eeprom_size); | 515 | sz = priv->cfg->base_params->eeprom_size; |
516 | sz = priv->cfg->eeprom_size; | 516 | IWL_DEBUG_INFO(priv, "NVM size = %d\n", sz); |
517 | priv->eeprom = kzalloc(sz, GFP_KERNEL); | 517 | priv->eeprom = kzalloc(sz, GFP_KERNEL); |
518 | if (!priv->eeprom) { | 518 | if (!priv->eeprom) { |
519 | ret = -ENOMEM; | 519 | ret = -ENOMEM; |
@@ -554,7 +554,7 @@ int iwl_eeprom_init(struct iwl_priv *priv) | |||
554 | CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK | | 554 | CSR_OTP_GP_REG_ECC_CORR_STATUS_MSK | |
555 | CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK); | 555 | CSR_OTP_GP_REG_ECC_UNCORR_STATUS_MSK); |
556 | /* traversing the linked list if no shadow ram supported */ | 556 | /* traversing the linked list if no shadow ram supported */ |
557 | if (!priv->cfg->shadow_ram_support) { | 557 | if (!priv->cfg->base_params->shadow_ram_support) { |
558 | if (iwl_find_otp_image(priv, &validblockaddr)) { | 558 | if (iwl_find_otp_image(priv, &validblockaddr)) { |
559 | ret = -ENOENT; | 559 | ret = -ENOENT; |
560 | goto done; | 560 | goto done; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-led.c b/drivers/net/wireless/iwlwifi/iwl-led.c index db5bfcb036ca..86c2b6fed0c6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-led.c +++ b/drivers/net/wireless/iwlwifi/iwl-led.c | |||
@@ -108,13 +108,13 @@ static int iwl_led_pattern(struct iwl_priv *priv, unsigned int idx) | |||
108 | BUG_ON(idx > IWL_MAX_BLINK_TBL); | 108 | BUG_ON(idx > IWL_MAX_BLINK_TBL); |
109 | 109 | ||
110 | IWL_DEBUG_LED(priv, "Led blink time compensation= %u\n", | 110 | IWL_DEBUG_LED(priv, "Led blink time compensation= %u\n", |
111 | priv->cfg->led_compensation); | 111 | priv->cfg->base_params->led_compensation); |
112 | led_cmd.on = | 112 | led_cmd.on = |
113 | iwl_blink_compensation(priv, blink_tbl[idx].on_time, | 113 | iwl_blink_compensation(priv, blink_tbl[idx].on_time, |
114 | priv->cfg->led_compensation); | 114 | priv->cfg->base_params->led_compensation); |
115 | led_cmd.off = | 115 | led_cmd.off = |
116 | iwl_blink_compensation(priv, blink_tbl[idx].off_time, | 116 | iwl_blink_compensation(priv, blink_tbl[idx].off_time, |
117 | priv->cfg->led_compensation); | 117 | priv->cfg->base_params->led_compensation); |
118 | 118 | ||
119 | return priv->cfg->ops->led->cmd(priv, &led_cmd); | 119 | return priv->cfg->ops->led->cmd(priv, &led_cmd); |
120 | } | 120 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 63c0ab46261f..49d7788937a9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -278,9 +278,9 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force) | |||
278 | 278 | ||
279 | dtimper = priv->hw->conf.ps_dtim_period ?: 1; | 279 | dtimper = priv->hw->conf.ps_dtim_period ?: 1; |
280 | 280 | ||
281 | if (priv->cfg->broken_powersave) | 281 | if (priv->cfg->base_params->broken_powersave) |
282 | iwl_power_sleep_cam_cmd(priv, &cmd); | 282 | iwl_power_sleep_cam_cmd(priv, &cmd); |
283 | else if (priv->cfg->supports_idle && | 283 | else if (priv->cfg->base_params->supports_idle && |
284 | priv->hw->conf.flags & IEEE80211_CONF_IDLE) | 284 | priv->hw->conf.flags & IEEE80211_CONF_IDLE) |
285 | iwl_static_sleep_cmd(priv, &cmd, IWL_POWER_INDEX_5, 20); | 285 | iwl_static_sleep_cmd(priv, &cmd, IWL_POWER_INDEX_5, 20); |
286 | else if (priv->cfg->ops->lib->tt_ops.lower_power_detection && | 286 | else if (priv->cfg->ops->lib->tt_ops.lower_power_detection && |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index c54c20023e7c..eaae49ee0c60 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
@@ -259,7 +259,8 @@ static void iwl_rx_scan_complete_notif(struct iwl_priv *priv, | |||
259 | queue_work(priv->workqueue, &priv->scan_completed); | 259 | queue_work(priv->workqueue, &priv->scan_completed); |
260 | 260 | ||
261 | if (priv->iw_mode != NL80211_IFTYPE_ADHOC && | 261 | if (priv->iw_mode != NL80211_IFTYPE_ADHOC && |
262 | priv->cfg->advanced_bt_coexist && | 262 | priv->cfg->bt_params && |
263 | priv->cfg->bt_params->advanced_bt_coexist && | ||
263 | priv->bt_status != scan_notif->bt_status) { | 264 | priv->bt_status != scan_notif->bt_status) { |
264 | if (scan_notif->bt_status) { | 265 | if (scan_notif->bt_status) { |
265 | /* BT on */ | 266 | /* BT on */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 116777122a79..43db5f38e3e6 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -1581,16 +1581,16 @@ int iwl3945_dump_nic_event_log(struct iwl_priv *priv, bool full_log, | |||
1581 | num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32))); | 1581 | num_wraps = iwl_read_targ_mem(priv, base + (2 * sizeof(u32))); |
1582 | next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32))); | 1582 | next_entry = iwl_read_targ_mem(priv, base + (3 * sizeof(u32))); |
1583 | 1583 | ||
1584 | if (capacity > priv->cfg->max_event_log_size) { | 1584 | if (capacity > priv->cfg->base_params->max_event_log_size) { |
1585 | IWL_ERR(priv, "Log capacity %d is bogus, limit to %d entries\n", | 1585 | IWL_ERR(priv, "Log capacity %d is bogus, limit to %d entries\n", |
1586 | capacity, priv->cfg->max_event_log_size); | 1586 | capacity, priv->cfg->base_params->max_event_log_size); |
1587 | capacity = priv->cfg->max_event_log_size; | 1587 | capacity = priv->cfg->base_params->max_event_log_size; |
1588 | } | 1588 | } |
1589 | 1589 | ||
1590 | if (next_entry > priv->cfg->max_event_log_size) { | 1590 | if (next_entry > priv->cfg->base_params->max_event_log_size) { |
1591 | IWL_ERR(priv, "Log write index %d is bogus, limit to %d\n", | 1591 | IWL_ERR(priv, "Log write index %d is bogus, limit to %d\n", |
1592 | next_entry, priv->cfg->max_event_log_size); | 1592 | next_entry, priv->cfg->base_params->max_event_log_size); |
1593 | next_entry = priv->cfg->max_event_log_size; | 1593 | next_entry = priv->cfg->base_params->max_event_log_size; |
1594 | } | 1594 | } |
1595 | 1595 | ||
1596 | size = num_wraps ? capacity : next_entry; | 1596 | size = num_wraps ? capacity : next_entry; |
@@ -2519,7 +2519,8 @@ static void iwl3945_alive_start(struct iwl_priv *priv) | |||
2519 | /* Enable timer to monitor the driver queues */ | 2519 | /* Enable timer to monitor the driver queues */ |
2520 | mod_timer(&priv->monitor_recover, | 2520 | mod_timer(&priv->monitor_recover, |
2521 | jiffies + | 2521 | jiffies + |
2522 | msecs_to_jiffies(priv->cfg->monitor_recover_period)); | 2522 | msecs_to_jiffies( |
2523 | priv->cfg->base_params->monitor_recover_period)); | ||
2523 | } | 2524 | } |
2524 | 2525 | ||
2525 | if (iwl_is_rfkill(priv)) | 2526 | if (iwl_is_rfkill(priv)) |
@@ -3881,7 +3882,7 @@ static int iwl3945_setup_mac(struct iwl_priv *priv) | |||
3881 | hw->flags = IEEE80211_HW_SIGNAL_DBM | | 3882 | hw->flags = IEEE80211_HW_SIGNAL_DBM | |
3882 | IEEE80211_HW_SPECTRUM_MGMT; | 3883 | IEEE80211_HW_SPECTRUM_MGMT; |
3883 | 3884 | ||
3884 | if (!priv->cfg->broken_powersave) | 3885 | if (!priv->cfg->base_params->broken_powersave) |
3885 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | | 3886 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | |
3886 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; | 3887 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; |
3887 | 3888 | ||
@@ -3966,7 +3967,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
3966 | * "the hard way", rather than using device's scan. | 3967 | * "the hard way", rather than using device's scan. |
3967 | */ | 3968 | */ |
3968 | if (iwl3945_mod_params.disable_hw_scan) { | 3969 | if (iwl3945_mod_params.disable_hw_scan) { |
3969 | IWL_DEBUG_INFO(priv, "Disabling hw_scan\n"); | 3970 | IWL_ERR(priv, "sw scan support is deprecated\n"); |
3970 | iwl3945_hw_ops.hw_scan = NULL; | 3971 | iwl3945_hw_ops.hw_scan = NULL; |
3971 | } | 3972 | } |
3972 | 3973 | ||
@@ -4291,7 +4292,8 @@ MODULE_PARM_DESC(debug, "debug output mask"); | |||
4291 | #endif | 4292 | #endif |
4292 | module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, | 4293 | module_param_named(disable_hw_scan, iwl3945_mod_params.disable_hw_scan, |
4293 | int, S_IRUGO); | 4294 | int, S_IRUGO); |
4294 | MODULE_PARM_DESC(disable_hw_scan, "disable hardware scanning (default 0)"); | 4295 | MODULE_PARM_DESC(disable_hw_scan, |
4296 | "disable hardware scanning (default 0) (deprecated)"); | ||
4295 | module_param_named(fw_restart3945, iwl3945_mod_params.restart_fw, int, S_IRUGO); | 4297 | module_param_named(fw_restart3945, iwl3945_mod_params.restart_fw, int, S_IRUGO); |
4296 | MODULE_PARM_DESC(fw_restart3945, "restart firmware in case of error"); | 4298 | MODULE_PARM_DESC(fw_restart3945, "restart firmware in case of error"); |
4297 | 4299 | ||