diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-10-06 11:10:00 -0400 |
---|---|---|
committer | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2010-10-06 11:10:00 -0400 |
commit | 7cb1b0887fcc61918e3d64827fbef968bb67a57a (patch) | |
tree | fa9103423af207c68be604523b3a362e1a6c3e14 /drivers/net | |
parent | 72645eff4b2ad6cf2b016b54f9d6817cca0a621d (diff) |
iwlagn: reduce redundant parameter definitions
move paramater definitions to a device paramater structure only
leaving the device name, which antennas are used and what firmware
file to use in the iwl_cfg structure. this will not completely
remove the redundancies but greatly reduce them for devices that
only vary by name or antennas. the parameters that are more
likely to change within a given device family are left in iwl_cfg.
also separate bt param structure added to help reduce more.
Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net')
24 files changed, 565 insertions, 887 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 19dbef06d52c..134f54541330 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -126,13 +126,13 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv) | |||
126 | { | 126 | { |
127 | 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 && |
128 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) | 128 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) |
129 | priv->cfg->num_of_queues = | 129 | priv->cfg->base_params->num_of_queues = |
130 | priv->cfg->mod_params->num_of_queues; | 130 | priv->cfg->mod_params->num_of_queues; |
131 | 131 | ||
132 | 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; |
133 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; | 133 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
134 | priv->hw_params.scd_bc_tbls_size = | 134 | priv->hw_params.scd_bc_tbls_size = |
135 | priv->cfg->num_of_queues * | 135 | priv->cfg->base_params->num_of_queues * |
136 | sizeof(struct iwlagn_scd_bc_tbl); | 136 | sizeof(struct iwlagn_scd_bc_tbl); |
137 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 137 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
138 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; | 138 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
@@ -250,29 +250,16 @@ static const struct iwl_ops iwl1000_ops = { | |||
250 | .led = &iwlagn_led_ops, | 250 | .led = &iwlagn_led_ops, |
251 | }; | 251 | }; |
252 | 252 | ||
253 | struct iwl_cfg iwl1000_bgn_cfg = { | 253 | static struct iwl_base_params iwl1000_base_params = { |
254 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", | ||
255 | .fw_name_pre = IWL1000_FW_PRE, | ||
256 | .ucode_api_max = IWL1000_UCODE_API_MAX, | ||
257 | .ucode_api_min = IWL1000_UCODE_API_MIN, | ||
258 | .sku = IWL_SKU_G|IWL_SKU_N, | ||
259 | .ops = &iwl1000_ops, | ||
260 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | ||
261 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | ||
262 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | ||
263 | .num_of_queues = IWLAGN_NUM_QUEUES, | 254 | .num_of_queues = IWLAGN_NUM_QUEUES, |
264 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 255 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
265 | .mod_params = &iwlagn_mod_params, | 256 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
266 | .valid_tx_ant = ANT_A, | ||
267 | .valid_rx_ant = ANT_AB, | ||
268 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | 257 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, |
269 | .set_l0s = true, | 258 | .set_l0s = true, |
270 | .use_bsm = false, | 259 | .use_bsm = false, |
271 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, | 260 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, |
272 | .shadow_ram_support = false, | 261 | .shadow_ram_support = false, |
273 | .ht_greenfield_support = true, | ||
274 | .led_compensation = 51, | 262 | .led_compensation = 51, |
275 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
276 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 263 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
277 | .support_ct_kill_exit = true, | 264 | .support_ct_kill_exit = true, |
278 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, | 265 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, |
@@ -283,6 +270,26 @@ struct iwl_cfg iwl1000_bgn_cfg = { | |||
283 | .sensitivity_calib_by_driver = true, | 270 | .sensitivity_calib_by_driver = true, |
284 | .chain_noise_calib_by_driver = true, | 271 | .chain_noise_calib_by_driver = true, |
285 | }; | 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 | }; | ||
286 | 293 | ||
287 | struct iwl_cfg iwl1000_bg_cfg = { | 294 | struct iwl_cfg iwl1000_bg_cfg = { |
288 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", | 295 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", |
@@ -290,30 +297,13 @@ struct iwl_cfg iwl1000_bg_cfg = { | |||
290 | .ucode_api_max = IWL1000_UCODE_API_MAX, | 297 | .ucode_api_max = IWL1000_UCODE_API_MAX, |
291 | .ucode_api_min = IWL1000_UCODE_API_MIN, | 298 | .ucode_api_min = IWL1000_UCODE_API_MIN, |
292 | .sku = IWL_SKU_G, | 299 | .sku = IWL_SKU_G, |
293 | .ops = &iwl1000_ops, | 300 | .valid_tx_ant = ANT_A, |
294 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 301 | .valid_rx_ant = ANT_AB, |
295 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | 302 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, |
296 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | 303 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, |
297 | .num_of_queues = IWLAGN_NUM_QUEUES, | 304 | .ops = &iwl1000_ops, |
298 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
299 | .mod_params = &iwlagn_mod_params, | 305 | .mod_params = &iwlagn_mod_params, |
300 | .valid_tx_ant = ANT_A, | 306 | .base_params = &iwl1000_base_params, |
301 | .valid_rx_ant = ANT_AB, | ||
302 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | ||
303 | .set_l0s = true, | ||
304 | .use_bsm = false, | ||
305 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, | ||
306 | .shadow_ram_support = false, | ||
307 | .led_compensation = 51, | ||
308 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
309 | .support_ct_kill_exit = true, | ||
310 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, | ||
311 | .chain_noise_scale = 1000, | ||
312 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
313 | .max_event_log_size = 128, | ||
314 | .ucode_tracing = true, | ||
315 | .sensitivity_calib_by_driver = true, | ||
316 | .chain_noise_calib_by_driver = true, | ||
317 | }; | 307 | }; |
318 | 308 | ||
319 | struct iwl_cfg iwl100_bgn_cfg = { | 309 | struct iwl_cfg iwl100_bgn_cfg = { |
@@ -322,32 +312,14 @@ struct iwl_cfg iwl100_bgn_cfg = { | |||
322 | .ucode_api_max = IWL100_UCODE_API_MAX, | 312 | .ucode_api_max = IWL100_UCODE_API_MAX, |
323 | .ucode_api_min = IWL100_UCODE_API_MIN, | 313 | .ucode_api_min = IWL100_UCODE_API_MIN, |
324 | .sku = IWL_SKU_G|IWL_SKU_N, | 314 | .sku = IWL_SKU_G|IWL_SKU_N, |
325 | .ops = &iwl1000_ops, | 315 | .valid_tx_ant = ANT_A, |
326 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 316 | .valid_rx_ant = ANT_A, |
327 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | 317 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, |
328 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | 318 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, |
329 | .num_of_queues = IWLAGN_NUM_QUEUES, | 319 | .ops = &iwl1000_ops, |
330 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
331 | .mod_params = &iwlagn_mod_params, | 320 | .mod_params = &iwlagn_mod_params, |
332 | .valid_tx_ant = ANT_A, | 321 | .base_params = &iwl1000_base_params, |
333 | .valid_rx_ant = ANT_A, | 322 | .ht_params = &iwl1000_ht_params, |
334 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | ||
335 | .set_l0s = true, | ||
336 | .use_bsm = false, | ||
337 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, | ||
338 | .shadow_ram_support = false, | ||
339 | .ht_greenfield_support = true, | ||
340 | .led_compensation = 51, | ||
341 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
342 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
343 | .support_ct_kill_exit = true, | ||
344 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, | ||
345 | .chain_noise_scale = 1000, | ||
346 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
347 | .max_event_log_size = 128, | ||
348 | .ucode_tracing = true, | ||
349 | .sensitivity_calib_by_driver = true, | ||
350 | .chain_noise_calib_by_driver = true, | ||
351 | }; | 323 | }; |
352 | 324 | ||
353 | struct iwl_cfg iwl100_bg_cfg = { | 325 | struct iwl_cfg iwl100_bg_cfg = { |
@@ -356,30 +328,13 @@ struct iwl_cfg iwl100_bg_cfg = { | |||
356 | .ucode_api_max = IWL100_UCODE_API_MAX, | 328 | .ucode_api_max = IWL100_UCODE_API_MAX, |
357 | .ucode_api_min = IWL100_UCODE_API_MIN, | 329 | .ucode_api_min = IWL100_UCODE_API_MIN, |
358 | .sku = IWL_SKU_G, | 330 | .sku = IWL_SKU_G, |
359 | .ops = &iwl1000_ops, | 331 | .valid_tx_ant = ANT_A, |
360 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 332 | .valid_rx_ant = ANT_A, |
361 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | 333 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, |
362 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | 334 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, |
363 | .num_of_queues = IWLAGN_NUM_QUEUES, | 335 | .ops = &iwl1000_ops, |
364 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
365 | .mod_params = &iwlagn_mod_params, | 336 | .mod_params = &iwlagn_mod_params, |
366 | .valid_tx_ant = ANT_A, | 337 | .base_params = &iwl1000_base_params, |
367 | .valid_rx_ant = ANT_A, | ||
368 | .pll_cfg_val = CSR50_ANA_PLL_CFG_VAL, | ||
369 | .set_l0s = true, | ||
370 | .use_bsm = false, | ||
371 | .max_ll_items = OTP_MAX_LL_ITEMS_1000, | ||
372 | .shadow_ram_support = false, | ||
373 | .led_compensation = 51, | ||
374 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
375 | .support_ct_kill_exit = true, | ||
376 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, | ||
377 | .chain_noise_scale = 1000, | ||
378 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
379 | .max_event_log_size = 128, | ||
380 | .ucode_tracing = true, | ||
381 | .sensitivity_calib_by_driver = true, | ||
382 | .chain_noise_calib_by_driver = true, | ||
383 | }; | 338 | }; |
384 | 339 | ||
385 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); | 340 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_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 4d45932e901e..5866ad868c32 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -162,13 +162,13 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |||
162 | { | 162 | { |
163 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && | 163 | if (priv->cfg->mod_params->num_of_queues >= IWL_MIN_NUM_QUEUES && |
164 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) | 164 | priv->cfg->mod_params->num_of_queues <= IWLAGN_NUM_QUEUES) |
165 | priv->cfg->num_of_queues = | 165 | priv->cfg->base_params->num_of_queues = |
166 | priv->cfg->mod_params->num_of_queues; | 166 | priv->cfg->mod_params->num_of_queues; |
167 | 167 | ||
168 | priv->hw_params.max_txq_num = priv->cfg->num_of_queues; | 168 | priv->hw_params.max_txq_num = priv->cfg->base_params->num_of_queues; |
169 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; | 169 | priv->hw_params.dma_chnl_num = FH50_TCSR_CHNL_NUM; |
170 | priv->hw_params.scd_bc_tbls_size = | 170 | priv->hw_params.scd_bc_tbls_size = |
171 | priv->cfg->num_of_queues * | 171 | priv->cfg->base_params->num_of_queues * |
172 | sizeof(struct iwlagn_scd_bc_tbl); | 172 | sizeof(struct iwlagn_scd_bc_tbl); |
173 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); | 173 | priv->hw_params.tfd_size = sizeof(struct iwl_tfd); |
174 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; | 174 | priv->hw_params.max_stations = IWLAGN_STATION_COUNT; |
@@ -466,30 +466,16 @@ static const struct iwl_ops iwl6000g2b_ops = { | |||
466 | .led = &iwlagn_led_ops, | 466 | .led = &iwlagn_led_ops, |
467 | }; | 467 | }; |
468 | 468 | ||
469 | struct iwl_cfg iwl6000g2a_2agn_cfg = { | 469 | static struct iwl_base_params iwl6000_base_params = { |
470 | .name = "6000 Series 2x2 AGN Gen2a", | ||
471 | .fw_name_pre = IWL6000G2A_FW_PRE, | ||
472 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
473 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
474 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
475 | .ops = &iwl6000_ops, | ||
476 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 470 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
477 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
478 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
479 | .num_of_queues = IWLAGN_NUM_QUEUES, | 471 | .num_of_queues = IWLAGN_NUM_QUEUES, |
480 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 472 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
481 | .mod_params = &iwlagn_mod_params, | ||
482 | .valid_tx_ant = ANT_AB, | ||
483 | .valid_rx_ant = ANT_AB, | ||
484 | .pll_cfg_val = 0, | 473 | .pll_cfg_val = 0, |
485 | .set_l0s = true, | 474 | .set_l0s = true, |
486 | .use_bsm = false, | 475 | .use_bsm = false, |
487 | .pa_type = IWL_PA_SYSTEM, | ||
488 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 476 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
489 | .shadow_ram_support = true, | 477 | .shadow_ram_support = true, |
490 | .ht_greenfield_support = true, | ||
491 | .led_compensation = 51, | 478 | .led_compensation = 51, |
492 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
493 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 479 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
494 | .supports_idle = true, | 480 | .supports_idle = true, |
495 | .adv_thermal_throttle = true, | 481 | .adv_thermal_throttle = true, |
@@ -501,29 +487,16 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = { | |||
501 | .ucode_tracing = true, | 487 | .ucode_tracing = true, |
502 | .sensitivity_calib_by_driver = true, | 488 | .sensitivity_calib_by_driver = true, |
503 | .chain_noise_calib_by_driver = true, | 489 | .chain_noise_calib_by_driver = true, |
504 | .need_dc_calib = true, | ||
505 | }; | 490 | }; |
506 | 491 | ||
507 | struct iwl_cfg iwl6000g2a_2abg_cfg = { | 492 | static struct iwl_base_params iwl6050_base_params = { |
508 | .name = "6000 Series 2x2 ABG Gen2a", | ||
509 | .fw_name_pre = IWL6000G2A_FW_PRE, | ||
510 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
511 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
512 | .sku = IWL_SKU_A|IWL_SKU_G, | ||
513 | .ops = &iwl6000_ops, | ||
514 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 493 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
515 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
516 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
517 | .num_of_queues = IWLAGN_NUM_QUEUES, | 494 | .num_of_queues = IWLAGN_NUM_QUEUES, |
518 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 495 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
519 | .mod_params = &iwlagn_mod_params, | ||
520 | .valid_tx_ant = ANT_AB, | ||
521 | .valid_rx_ant = ANT_AB, | ||
522 | .pll_cfg_val = 0, | 496 | .pll_cfg_val = 0, |
523 | .set_l0s = true, | 497 | .set_l0s = true, |
524 | .use_bsm = false, | 498 | .use_bsm = false, |
525 | .pa_type = IWL_PA_SYSTEM, | 499 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, |
526 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
527 | .shadow_ram_support = true, | 500 | .shadow_ram_support = true, |
528 | .led_compensation = 51, | 501 | .led_compensation = 51, |
529 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 502 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
@@ -531,11 +504,57 @@ struct iwl_cfg iwl6000g2a_2abg_cfg = { | |||
531 | .adv_thermal_throttle = true, | 504 | .adv_thermal_throttle = true, |
532 | .support_ct_kill_exit = true, | 505 | .support_ct_kill_exit = true, |
533 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | 506 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, |
534 | .chain_noise_scale = 1000, | 507 | .chain_noise_scale = 1500, |
535 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | 508 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, |
536 | .max_event_log_size = 512, | 509 | .max_event_log_size = 1024, |
510 | .ucode_tracing = true, | ||
537 | .sensitivity_calib_by_driver = true, | 511 | .sensitivity_calib_by_driver = true, |
538 | .chain_noise_calib_by_driver = true, | 512 | .chain_noise_calib_by_driver = true, |
513 | }; | ||
514 | |||
515 | static struct iwl_ht_params iwl6000_ht_params = { | ||
516 | .ht_greenfield_support = true, | ||
517 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
518 | }; | ||
519 | |||
520 | static struct iwl_bt_params iwl6000_bt_params = { | ||
521 | .bt_statistics = true, | ||
522 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
523 | .advanced_bt_coexist = true, | ||
524 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
525 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
526 | }; | ||
527 | |||
528 | struct iwl_cfg iwl6000g2a_2agn_cfg = { | ||
529 | .name = "6000 Series 2x2 AGN Gen2a", | ||
530 | .fw_name_pre = IWL6000G2A_FW_PRE, | ||
531 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
532 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
533 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | ||
534 | .valid_tx_ant = ANT_AB, | ||
535 | .valid_rx_ant = ANT_AB, | ||
536 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
537 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
538 | .ops = &iwl6000_ops, | ||
539 | .mod_params = &iwlagn_mod_params, | ||
540 | .base_params = &iwl6000_base_params, | ||
541 | .ht_params = &iwl6000_ht_params, | ||
542 | .need_dc_calib = true, | ||
543 | }; | ||
544 | |||
545 | struct iwl_cfg iwl6000g2a_2abg_cfg = { | ||
546 | .name = "6000 Series 2x2 ABG Gen2a", | ||
547 | .fw_name_pre = IWL6000G2A_FW_PRE, | ||
548 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
549 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
550 | .sku = IWL_SKU_A|IWL_SKU_G, | ||
551 | .valid_tx_ant = ANT_AB, | ||
552 | .valid_rx_ant = ANT_AB, | ||
553 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
554 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
555 | .ops = &iwl6000_ops, | ||
556 | .mod_params = &iwlagn_mod_params, | ||
557 | .base_params = &iwl6000_base_params, | ||
539 | .need_dc_calib = true, | 558 | .need_dc_calib = true, |
540 | }; | 559 | }; |
541 | 560 | ||
@@ -545,32 +564,13 @@ struct iwl_cfg iwl6000g2a_2bg_cfg = { | |||
545 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 564 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
546 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 565 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
547 | .sku = IWL_SKU_G, | 566 | .sku = IWL_SKU_G, |
548 | .ops = &iwl6000_ops, | 567 | .valid_tx_ant = ANT_AB, |
549 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 568 | .valid_rx_ant = ANT_AB, |
550 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 569 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
551 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 570 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
552 | .num_of_queues = IWLAGN_NUM_QUEUES, | 571 | .ops = &iwl6000_ops, |
553 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
554 | .mod_params = &iwlagn_mod_params, | 572 | .mod_params = &iwlagn_mod_params, |
555 | .valid_tx_ant = ANT_AB, | 573 | .base_params = &iwl6000_base_params, |
556 | .valid_rx_ant = ANT_AB, | ||
557 | .pll_cfg_val = 0, | ||
558 | .set_l0s = true, | ||
559 | .use_bsm = false, | ||
560 | .pa_type = IWL_PA_SYSTEM, | ||
561 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
562 | .shadow_ram_support = true, | ||
563 | .led_compensation = 51, | ||
564 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
565 | .supports_idle = true, | ||
566 | .adv_thermal_throttle = true, | ||
567 | .support_ct_kill_exit = true, | ||
568 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
569 | .chain_noise_scale = 1000, | ||
570 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
571 | .max_event_log_size = 512, | ||
572 | .sensitivity_calib_by_driver = true, | ||
573 | .chain_noise_calib_by_driver = true, | ||
574 | .need_dc_calib = true, | 574 | .need_dc_calib = true, |
575 | }; | 575 | }; |
576 | 576 | ||
@@ -580,41 +580,18 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = { | |||
580 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 580 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
581 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 581 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
582 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 582 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
583 | .ops = &iwl6000g2b_ops, | 583 | .valid_tx_ant = ANT_AB, |
584 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 584 | .valid_rx_ant = ANT_AB, |
585 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 585 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
586 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 586 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
587 | .num_of_queues = IWLAGN_NUM_QUEUES, | 587 | .ops = &iwl6000g2b_ops, |
588 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
589 | .mod_params = &iwlagn_mod_params, | 588 | .mod_params = &iwlagn_mod_params, |
590 | .valid_tx_ant = ANT_AB, | 589 | .base_params = &iwl6000_base_params, |
591 | .valid_rx_ant = ANT_AB, | 590 | .bt_params = &iwl6000_bt_params, |
592 | .pll_cfg_val = 0, | 591 | .ht_params = &iwl6000_ht_params, |
593 | .set_l0s = true, | ||
594 | .use_bsm = false, | ||
595 | .pa_type = IWL_PA_SYSTEM, | ||
596 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
597 | .shadow_ram_support = true, | ||
598 | .ht_greenfield_support = true, | ||
599 | .led_compensation = 51, | ||
600 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
601 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
602 | .supports_idle = true, | ||
603 | .adv_thermal_throttle = true, | ||
604 | .support_ct_kill_exit = true, | ||
605 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
606 | .chain_noise_scale = 1000, | ||
607 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
608 | .max_event_log_size = 512, | ||
609 | .sensitivity_calib_by_driver = true, | ||
610 | .chain_noise_calib_by_driver = true, | ||
611 | .need_dc_calib = true, | 592 | .need_dc_calib = true, |
612 | .bt_statistics = true, | ||
613 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 593 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
614 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 594 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
615 | .advanced_bt_coexist = true, | ||
616 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
617 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
618 | }; | 595 | }; |
619 | 596 | ||
620 | struct iwl_cfg iwl6000g2b_2abg_cfg = { | 597 | struct iwl_cfg iwl6000g2b_2abg_cfg = { |
@@ -623,39 +600,17 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = { | |||
623 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 600 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
624 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 601 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
625 | .sku = IWL_SKU_A|IWL_SKU_G, | 602 | .sku = IWL_SKU_A|IWL_SKU_G, |
626 | .ops = &iwl6000g2b_ops, | 603 | .valid_tx_ant = ANT_AB, |
627 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 604 | .valid_rx_ant = ANT_AB, |
628 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 605 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
629 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 606 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
630 | .num_of_queues = IWLAGN_NUM_QUEUES, | 607 | .ops = &iwl6000g2b_ops, |
631 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
632 | .mod_params = &iwlagn_mod_params, | 608 | .mod_params = &iwlagn_mod_params, |
633 | .valid_tx_ant = ANT_AB, | 609 | .base_params = &iwl6000_base_params, |
634 | .valid_rx_ant = ANT_AB, | 610 | .bt_params = &iwl6000_bt_params, |
635 | .pll_cfg_val = 0, | ||
636 | .set_l0s = true, | ||
637 | .use_bsm = false, | ||
638 | .pa_type = IWL_PA_SYSTEM, | ||
639 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
640 | .shadow_ram_support = true, | ||
641 | .led_compensation = 51, | ||
642 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
643 | .supports_idle = true, | ||
644 | .adv_thermal_throttle = true, | ||
645 | .support_ct_kill_exit = true, | ||
646 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
647 | .chain_noise_scale = 1000, | ||
648 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
649 | .max_event_log_size = 512, | ||
650 | .sensitivity_calib_by_driver = true, | ||
651 | .chain_noise_calib_by_driver = true, | ||
652 | .need_dc_calib = true, | 611 | .need_dc_calib = true, |
653 | .bt_statistics = true, | ||
654 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 612 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
655 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 613 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
656 | .advanced_bt_coexist = true, | ||
657 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
658 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
659 | }; | 614 | }; |
660 | 615 | ||
661 | struct iwl_cfg iwl6000g2b_2bgn_cfg = { | 616 | struct iwl_cfg iwl6000g2b_2bgn_cfg = { |
@@ -664,41 +619,18 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = { | |||
664 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 619 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
665 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 620 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
666 | .sku = IWL_SKU_G|IWL_SKU_N, | 621 | .sku = IWL_SKU_G|IWL_SKU_N, |
667 | .ops = &iwl6000g2b_ops, | 622 | .valid_tx_ant = ANT_AB, |
668 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 623 | .valid_rx_ant = ANT_AB, |
669 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 624 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
670 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 625 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
671 | .num_of_queues = IWLAGN_NUM_QUEUES, | 626 | .ops = &iwl6000g2b_ops, |
672 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
673 | .mod_params = &iwlagn_mod_params, | 627 | .mod_params = &iwlagn_mod_params, |
674 | .valid_tx_ant = ANT_AB, | 628 | .base_params = &iwl6000_base_params, |
675 | .valid_rx_ant = ANT_AB, | 629 | .bt_params = &iwl6000_bt_params, |
676 | .pll_cfg_val = 0, | 630 | .ht_params = &iwl6000_ht_params, |
677 | .set_l0s = true, | ||
678 | .use_bsm = false, | ||
679 | .pa_type = IWL_PA_SYSTEM, | ||
680 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
681 | .shadow_ram_support = true, | ||
682 | .ht_greenfield_support = true, | ||
683 | .led_compensation = 51, | ||
684 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
685 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
686 | .supports_idle = true, | ||
687 | .adv_thermal_throttle = true, | ||
688 | .support_ct_kill_exit = true, | ||
689 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
690 | .chain_noise_scale = 1000, | ||
691 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
692 | .max_event_log_size = 512, | ||
693 | .sensitivity_calib_by_driver = true, | ||
694 | .chain_noise_calib_by_driver = true, | ||
695 | .need_dc_calib = true, | 631 | .need_dc_calib = true, |
696 | .bt_statistics = true, | ||
697 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 632 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
698 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 633 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
699 | .advanced_bt_coexist = true, | ||
700 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
701 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
702 | }; | 634 | }; |
703 | 635 | ||
704 | struct iwl_cfg iwl6000g2b_2bg_cfg = { | 636 | struct iwl_cfg iwl6000g2b_2bg_cfg = { |
@@ -707,39 +639,17 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = { | |||
707 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 639 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
708 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 640 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
709 | .sku = IWL_SKU_G, | 641 | .sku = IWL_SKU_G, |
710 | .ops = &iwl6000g2b_ops, | 642 | .valid_tx_ant = ANT_AB, |
711 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 643 | .valid_rx_ant = ANT_AB, |
712 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 644 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
713 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 645 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
714 | .num_of_queues = IWLAGN_NUM_QUEUES, | 646 | .ops = &iwl6000g2b_ops, |
715 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
716 | .mod_params = &iwlagn_mod_params, | 647 | .mod_params = &iwlagn_mod_params, |
717 | .valid_tx_ant = ANT_AB, | 648 | .base_params = &iwl6000_base_params, |
718 | .valid_rx_ant = ANT_AB, | 649 | .bt_params = &iwl6000_bt_params, |
719 | .pll_cfg_val = 0, | ||
720 | .set_l0s = true, | ||
721 | .use_bsm = false, | ||
722 | .pa_type = IWL_PA_SYSTEM, | ||
723 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
724 | .shadow_ram_support = true, | ||
725 | .led_compensation = 51, | ||
726 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
727 | .supports_idle = true, | ||
728 | .adv_thermal_throttle = true, | ||
729 | .support_ct_kill_exit = true, | ||
730 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
731 | .chain_noise_scale = 1000, | ||
732 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
733 | .max_event_log_size = 512, | ||
734 | .sensitivity_calib_by_driver = true, | ||
735 | .chain_noise_calib_by_driver = true, | ||
736 | .need_dc_calib = true, | 650 | .need_dc_calib = true, |
737 | .bt_statistics = true, | ||
738 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 651 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
739 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 652 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
740 | .advanced_bt_coexist = true, | ||
741 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
742 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
743 | }; | 653 | }; |
744 | 654 | ||
745 | struct iwl_cfg iwl6000g2b_bgn_cfg = { | 655 | struct iwl_cfg iwl6000g2b_bgn_cfg = { |
@@ -748,41 +658,18 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = { | |||
748 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 658 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
749 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 659 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
750 | .sku = IWL_SKU_G|IWL_SKU_N, | 660 | .sku = IWL_SKU_G|IWL_SKU_N, |
751 | .ops = &iwl6000g2b_ops, | 661 | .valid_tx_ant = ANT_A, |
752 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 662 | .valid_rx_ant = ANT_AB, |
753 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 663 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
754 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 664 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
755 | .num_of_queues = IWLAGN_NUM_QUEUES, | 665 | .ops = &iwl6000g2b_ops, |
756 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
757 | .mod_params = &iwlagn_mod_params, | 666 | .mod_params = &iwlagn_mod_params, |
758 | .valid_tx_ant = ANT_A, | 667 | .base_params = &iwl6000_base_params, |
759 | .valid_rx_ant = ANT_AB, | 668 | .bt_params = &iwl6000_bt_params, |
760 | .pll_cfg_val = 0, | 669 | .ht_params = &iwl6000_ht_params, |
761 | .set_l0s = true, | ||
762 | .use_bsm = false, | ||
763 | .pa_type = IWL_PA_SYSTEM, | ||
764 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
765 | .shadow_ram_support = true, | ||
766 | .ht_greenfield_support = true, | ||
767 | .led_compensation = 51, | ||
768 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
769 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
770 | .supports_idle = true, | ||
771 | .adv_thermal_throttle = true, | ||
772 | .support_ct_kill_exit = true, | ||
773 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
774 | .chain_noise_scale = 1000, | ||
775 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
776 | .max_event_log_size = 512, | ||
777 | .sensitivity_calib_by_driver = true, | ||
778 | .chain_noise_calib_by_driver = true, | ||
779 | .need_dc_calib = true, | 670 | .need_dc_calib = true, |
780 | .bt_statistics = true, | ||
781 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 671 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
782 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 672 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
783 | .advanced_bt_coexist = true, | ||
784 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
785 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
786 | }; | 673 | }; |
787 | 674 | ||
788 | struct iwl_cfg iwl6000g2b_bg_cfg = { | 675 | struct iwl_cfg iwl6000g2b_bg_cfg = { |
@@ -791,39 +678,17 @@ struct iwl_cfg iwl6000g2b_bg_cfg = { | |||
791 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 678 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, |
792 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 679 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, |
793 | .sku = IWL_SKU_G, | 680 | .sku = IWL_SKU_G, |
794 | .ops = &iwl6000g2b_ops, | 681 | .valid_tx_ant = ANT_A, |
795 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 682 | .valid_rx_ant = ANT_AB, |
796 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 683 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, |
797 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 684 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, |
798 | .num_of_queues = IWLAGN_NUM_QUEUES, | 685 | .ops = &iwl6000g2b_ops, |
799 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
800 | .mod_params = &iwlagn_mod_params, | 686 | .mod_params = &iwlagn_mod_params, |
801 | .valid_tx_ant = ANT_A, | 687 | .base_params = &iwl6000_base_params, |
802 | .valid_rx_ant = ANT_AB, | 688 | .bt_params = &iwl6000_bt_params, |
803 | .pll_cfg_val = 0, | ||
804 | .set_l0s = true, | ||
805 | .use_bsm = false, | ||
806 | .pa_type = IWL_PA_SYSTEM, | ||
807 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
808 | .shadow_ram_support = true, | ||
809 | .led_compensation = 51, | ||
810 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
811 | .supports_idle = true, | ||
812 | .adv_thermal_throttle = true, | ||
813 | .support_ct_kill_exit = true, | ||
814 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DISABLE, | ||
815 | .chain_noise_scale = 1000, | ||
816 | .monitor_recover_period = IWL_LONG_MONITORING_PERIOD, | ||
817 | .max_event_log_size = 512, | ||
818 | .sensitivity_calib_by_driver = true, | ||
819 | .chain_noise_calib_by_driver = true, | ||
820 | .need_dc_calib = true, | 689 | .need_dc_calib = true, |
821 | .bt_statistics = true, | ||
822 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 690 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ |
823 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | 691 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, |
824 | .advanced_bt_coexist = true, | ||
825 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
826 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
827 | }; | 692 | }; |
828 | 693 | ||
829 | /* | 694 | /* |
@@ -835,35 +700,15 @@ struct iwl_cfg iwl6000i_2agn_cfg = { | |||
835 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 700 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
836 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 701 | .ucode_api_min = IWL6000_UCODE_API_MIN, |
837 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 702 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
838 | .ops = &iwl6000_ops, | 703 | .valid_tx_ant = ANT_BC, |
839 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 704 | .valid_rx_ant = ANT_BC, |
840 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 705 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
841 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 706 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
842 | .num_of_queues = IWLAGN_NUM_QUEUES, | 707 | .ops = &iwl6000_ops, |
843 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
844 | .mod_params = &iwlagn_mod_params, | 708 | .mod_params = &iwlagn_mod_params, |
845 | .valid_tx_ant = ANT_BC, | 709 | .base_params = &iwl6000_base_params, |
846 | .valid_rx_ant = ANT_BC, | 710 | .ht_params = &iwl6000_ht_params, |
847 | .pll_cfg_val = 0, | ||
848 | .set_l0s = true, | ||
849 | .use_bsm = false, | ||
850 | .pa_type = IWL_PA_INTERNAL, | 711 | .pa_type = IWL_PA_INTERNAL, |
851 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
852 | .shadow_ram_support = true, | ||
853 | .ht_greenfield_support = true, | ||
854 | .led_compensation = 51, | ||
855 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
856 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
857 | .supports_idle = true, | ||
858 | .adv_thermal_throttle = true, | ||
859 | .support_ct_kill_exit = true, | ||
860 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
861 | .chain_noise_scale = 1000, | ||
862 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
863 | .max_event_log_size = 1024, | ||
864 | .ucode_tracing = true, | ||
865 | .sensitivity_calib_by_driver = true, | ||
866 | .chain_noise_calib_by_driver = true, | ||
867 | }; | 712 | }; |
868 | 713 | ||
869 | struct iwl_cfg iwl6000i_2abg_cfg = { | 714 | struct iwl_cfg iwl6000i_2abg_cfg = { |
@@ -872,33 +717,14 @@ struct iwl_cfg iwl6000i_2abg_cfg = { | |||
872 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 717 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
873 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 718 | .ucode_api_min = IWL6000_UCODE_API_MIN, |
874 | .sku = IWL_SKU_A|IWL_SKU_G, | 719 | .sku = IWL_SKU_A|IWL_SKU_G, |
875 | .ops = &iwl6000_ops, | 720 | .valid_tx_ant = ANT_BC, |
876 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 721 | .valid_rx_ant = ANT_BC, |
877 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 722 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
878 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 723 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
879 | .num_of_queues = IWLAGN_NUM_QUEUES, | 724 | .ops = &iwl6000_ops, |
880 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
881 | .mod_params = &iwlagn_mod_params, | 725 | .mod_params = &iwlagn_mod_params, |
882 | .valid_tx_ant = ANT_BC, | 726 | .base_params = &iwl6000_base_params, |
883 | .valid_rx_ant = ANT_BC, | ||
884 | .pll_cfg_val = 0, | ||
885 | .set_l0s = true, | ||
886 | .use_bsm = false, | ||
887 | .pa_type = IWL_PA_INTERNAL, | 727 | .pa_type = IWL_PA_INTERNAL, |
888 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
889 | .shadow_ram_support = true, | ||
890 | .led_compensation = 51, | ||
891 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
892 | .supports_idle = true, | ||
893 | .adv_thermal_throttle = true, | ||
894 | .support_ct_kill_exit = true, | ||
895 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
896 | .chain_noise_scale = 1000, | ||
897 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
898 | .max_event_log_size = 1024, | ||
899 | .ucode_tracing = true, | ||
900 | .sensitivity_calib_by_driver = true, | ||
901 | .chain_noise_calib_by_driver = true, | ||
902 | }; | 728 | }; |
903 | 729 | ||
904 | struct iwl_cfg iwl6000i_2bg_cfg = { | 730 | struct iwl_cfg iwl6000i_2bg_cfg = { |
@@ -907,33 +733,14 @@ struct iwl_cfg iwl6000i_2bg_cfg = { | |||
907 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 733 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
908 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 734 | .ucode_api_min = IWL6000_UCODE_API_MIN, |
909 | .sku = IWL_SKU_G, | 735 | .sku = IWL_SKU_G, |
910 | .ops = &iwl6000_ops, | 736 | .valid_tx_ant = ANT_BC, |
911 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 737 | .valid_rx_ant = ANT_BC, |
912 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 738 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
913 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 739 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
914 | .num_of_queues = IWLAGN_NUM_QUEUES, | 740 | .ops = &iwl6000_ops, |
915 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
916 | .mod_params = &iwlagn_mod_params, | 741 | .mod_params = &iwlagn_mod_params, |
917 | .valid_tx_ant = ANT_BC, | 742 | .base_params = &iwl6000_base_params, |
918 | .valid_rx_ant = ANT_BC, | ||
919 | .pll_cfg_val = 0, | ||
920 | .set_l0s = true, | ||
921 | .use_bsm = false, | ||
922 | .pa_type = IWL_PA_INTERNAL, | 743 | .pa_type = IWL_PA_INTERNAL, |
923 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
924 | .shadow_ram_support = true, | ||
925 | .led_compensation = 51, | ||
926 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
927 | .supports_idle = true, | ||
928 | .adv_thermal_throttle = true, | ||
929 | .support_ct_kill_exit = true, | ||
930 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
931 | .chain_noise_scale = 1000, | ||
932 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
933 | .max_event_log_size = 1024, | ||
934 | .ucode_tracing = true, | ||
935 | .sensitivity_calib_by_driver = true, | ||
936 | .chain_noise_calib_by_driver = true, | ||
937 | }; | 744 | }; |
938 | 745 | ||
939 | struct iwl_cfg iwl6050_2agn_cfg = { | 746 | struct iwl_cfg iwl6050_2agn_cfg = { |
@@ -942,35 +749,14 @@ struct iwl_cfg iwl6050_2agn_cfg = { | |||
942 | .ucode_api_max = IWL6050_UCODE_API_MAX, | 749 | .ucode_api_max = IWL6050_UCODE_API_MAX, |
943 | .ucode_api_min = IWL6050_UCODE_API_MIN, | 750 | .ucode_api_min = IWL6050_UCODE_API_MIN, |
944 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 751 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
945 | .ops = &iwl6050_ops, | 752 | .valid_tx_ant = ANT_AB, |
946 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 753 | .valid_rx_ant = ANT_AB, |
754 | .ops = &iwl6000_ops, | ||
947 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, | 755 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
948 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, | 756 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, |
949 | .num_of_queues = IWLAGN_NUM_QUEUES, | ||
950 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
951 | .mod_params = &iwlagn_mod_params, | 757 | .mod_params = &iwlagn_mod_params, |
952 | .valid_tx_ant = ANT_AB, | 758 | .base_params = &iwl6050_base_params, |
953 | .valid_rx_ant = ANT_AB, | 759 | .ht_params = &iwl6000_ht_params, |
954 | .pll_cfg_val = 0, | ||
955 | .set_l0s = true, | ||
956 | .use_bsm = false, | ||
957 | .pa_type = IWL_PA_SYSTEM, | ||
958 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, | ||
959 | .shadow_ram_support = true, | ||
960 | .ht_greenfield_support = true, | ||
961 | .led_compensation = 51, | ||
962 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
963 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
964 | .supports_idle = true, | ||
965 | .adv_thermal_throttle = true, | ||
966 | .support_ct_kill_exit = true, | ||
967 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
968 | .chain_noise_scale = 1500, | ||
969 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
970 | .max_event_log_size = 1024, | ||
971 | .ucode_tracing = true, | ||
972 | .sensitivity_calib_by_driver = true, | ||
973 | .chain_noise_calib_by_driver = true, | ||
974 | .need_dc_calib = true, | 760 | .need_dc_calib = true, |
975 | }; | 761 | }; |
976 | 762 | ||
@@ -980,35 +766,14 @@ struct iwl_cfg iwl6050g2_bgn_cfg = { | |||
980 | .ucode_api_max = IWL6050_UCODE_API_MAX, | 766 | .ucode_api_max = IWL6050_UCODE_API_MAX, |
981 | .ucode_api_min = IWL6050_UCODE_API_MIN, | 767 | .ucode_api_min = IWL6050_UCODE_API_MIN, |
982 | .sku = IWL_SKU_G|IWL_SKU_N, | 768 | .sku = IWL_SKU_G|IWL_SKU_N, |
983 | .ops = &iwl6050g2_ops, | 769 | .valid_tx_ant = ANT_A, |
984 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 770 | .valid_rx_ant = ANT_AB, |
985 | .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION, | 771 | .eeprom_ver = EEPROM_6050G2_EEPROM_VERSION, |
986 | .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION, | 772 | .eeprom_calib_ver = EEPROM_6050G2_TX_POWER_VERSION, |
987 | .num_of_queues = IWLAGN_NUM_QUEUES, | 773 | .ops = &iwl6050g2_ops, |
988 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
989 | .mod_params = &iwlagn_mod_params, | 774 | .mod_params = &iwlagn_mod_params, |
990 | .valid_tx_ant = ANT_A, | 775 | .base_params = &iwl6050_base_params, |
991 | .valid_rx_ant = ANT_AB, | 776 | .ht_params = &iwl6000_ht_params, |
992 | .pll_cfg_val = 0, | ||
993 | .set_l0s = true, | ||
994 | .use_bsm = false, | ||
995 | .pa_type = IWL_PA_SYSTEM, | ||
996 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, | ||
997 | .shadow_ram_support = true, | ||
998 | .ht_greenfield_support = true, | ||
999 | .led_compensation = 51, | ||
1000 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
1001 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
1002 | .supports_idle = true, | ||
1003 | .adv_thermal_throttle = true, | ||
1004 | .support_ct_kill_exit = true, | ||
1005 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
1006 | .chain_noise_scale = 1500, | ||
1007 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
1008 | .max_event_log_size = 1024, | ||
1009 | .ucode_tracing = true, | ||
1010 | .sensitivity_calib_by_driver = true, | ||
1011 | .chain_noise_calib_by_driver = true, | ||
1012 | .need_dc_calib = true, | 777 | .need_dc_calib = true, |
1013 | }; | 778 | }; |
1014 | 779 | ||
@@ -1018,33 +783,13 @@ struct iwl_cfg iwl6050_2abg_cfg = { | |||
1018 | .ucode_api_max = IWL6050_UCODE_API_MAX, | 783 | .ucode_api_max = IWL6050_UCODE_API_MAX, |
1019 | .ucode_api_min = IWL6050_UCODE_API_MIN, | 784 | .ucode_api_min = IWL6050_UCODE_API_MIN, |
1020 | .sku = IWL_SKU_A|IWL_SKU_G, | 785 | .sku = IWL_SKU_A|IWL_SKU_G, |
1021 | .ops = &iwl6050_ops, | 786 | .valid_tx_ant = ANT_AB, |
1022 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 787 | .valid_rx_ant = ANT_AB, |
1023 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, | 788 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, |
1024 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, | 789 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, |
1025 | .num_of_queues = IWLAGN_NUM_QUEUES, | 790 | .ops = &iwl6050_ops, |
1026 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
1027 | .mod_params = &iwlagn_mod_params, | 791 | .mod_params = &iwlagn_mod_params, |
1028 | .valid_tx_ant = ANT_AB, | 792 | .base_params = &iwl6050_base_params, |
1029 | .valid_rx_ant = ANT_AB, | ||
1030 | .pll_cfg_val = 0, | ||
1031 | .set_l0s = true, | ||
1032 | .use_bsm = false, | ||
1033 | .pa_type = IWL_PA_SYSTEM, | ||
1034 | .max_ll_items = OTP_MAX_LL_ITEMS_6x50, | ||
1035 | .shadow_ram_support = true, | ||
1036 | .led_compensation = 51, | ||
1037 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
1038 | .supports_idle = true, | ||
1039 | .adv_thermal_throttle = true, | ||
1040 | .support_ct_kill_exit = true, | ||
1041 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
1042 | .chain_noise_scale = 1500, | ||
1043 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
1044 | .max_event_log_size = 1024, | ||
1045 | .ucode_tracing = true, | ||
1046 | .sensitivity_calib_by_driver = true, | ||
1047 | .chain_noise_calib_by_driver = true, | ||
1048 | .need_dc_calib = true, | 793 | .need_dc_calib = true, |
1049 | }; | 794 | }; |
1050 | 795 | ||
@@ -1054,35 +799,15 @@ struct iwl_cfg iwl6000_3agn_cfg = { | |||
1054 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 799 | .ucode_api_max = IWL6000_UCODE_API_MAX, |
1055 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 800 | .ucode_api_min = IWL6000_UCODE_API_MIN, |
1056 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, | 801 | .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, |
1057 | .ops = &iwl6000_ops, | 802 | .valid_tx_ant = ANT_ABC, |
1058 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 803 | .valid_rx_ant = ANT_ABC, |
1059 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 804 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, |
1060 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 805 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, |
1061 | .num_of_queues = IWLAGN_NUM_QUEUES, | 806 | .ops = &iwl6000_ops, |
1062 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | ||
1063 | .mod_params = &iwlagn_mod_params, | 807 | .mod_params = &iwlagn_mod_params, |
1064 | .valid_tx_ant = ANT_ABC, | 808 | .base_params = &iwl6000_base_params, |
1065 | .valid_rx_ant = ANT_ABC, | 809 | .ht_params = &iwl6000_ht_params, |
1066 | .pll_cfg_val = 0, | 810 | .need_dc_calib = true, |
1067 | .set_l0s = true, | ||
1068 | .use_bsm = false, | ||
1069 | .pa_type = IWL_PA_SYSTEM, | ||
1070 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | ||
1071 | .shadow_ram_support = true, | ||
1072 | .ht_greenfield_support = true, | ||
1073 | .led_compensation = 51, | ||
1074 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | ||
1075 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | ||
1076 | .supports_idle = true, | ||
1077 | .adv_thermal_throttle = true, | ||
1078 | .support_ct_kill_exit = true, | ||
1079 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
1080 | .chain_noise_scale = 1000, | ||
1081 | .monitor_recover_period = IWL_DEF_MONITORING_PERIOD, | ||
1082 | .max_event_log_size = 1024, | ||
1083 | .ucode_tracing = true, | ||
1084 | .sensitivity_calib_by_driver = true, | ||
1085 | .chain_noise_calib_by_driver = true, | ||
1086 | }; | 811 | }; |
1087 | 812 | ||
1088 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); | 813 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_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..29ed6049c0f7 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -422,7 +422,8 @@ static void iwlagn_rx_reply_tx(struct iwl_priv *priv, | |||
422 | * notification again. | 422 | * notification again. |
423 | */ | 423 | */ |
424 | if (tx_resp->bt_kill_count && tx_resp->frame_count == 1 && | 424 | if (tx_resp->bt_kill_count && tx_resp->frame_count == 1 && |
425 | priv->cfg->advanced_bt_coexist) { | 425 | priv->cfg->bt_params && |
426 | priv->cfg->bt_params->advanced_bt_coexist) { | ||
426 | IWL_WARN(priv, "receive reply tx with bt_kill\n"); | 427 | IWL_WARN(priv, "receive reply tx with bt_kill\n"); |
427 | } | 428 | } |
428 | iwlagn_tx_status_reply_tx(priv, agg, tx_resp, txq_id, index); | 429 | iwlagn_tx_status_reply_tx(priv, agg, tx_resp, txq_id, index); |
@@ -589,7 +590,7 @@ const u8 *iwlagn_eeprom_query_addr(const struct iwl_priv *priv, | |||
589 | size_t offset) | 590 | size_t offset) |
590 | { | 591 | { |
591 | u32 address = eeprom_indirect_address(priv, offset); | 592 | u32 address = eeprom_indirect_address(priv, offset); |
592 | BUG_ON(address >= priv->cfg->eeprom_size); | 593 | BUG_ON(address >= priv->cfg->base_params->eeprom_size); |
593 | return &priv->eeprom[address]; | 594 | return &priv->eeprom[address]; |
594 | } | 595 | } |
595 | 596 | ||
@@ -637,7 +638,7 @@ int iwlagn_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq) | |||
637 | const u32 rfdnlog = RX_QUEUE_SIZE_LOG; /* 256 RBDs */ | 638 | const u32 rfdnlog = RX_QUEUE_SIZE_LOG; /* 256 RBDs */ |
638 | u32 rb_timeout = 0; /* FIXME: RX_RB_TIMEOUT for all devices? */ | 639 | u32 rb_timeout = 0; /* FIXME: RX_RB_TIMEOUT for all devices? */ |
639 | 640 | ||
640 | if (!priv->cfg->use_isr_legacy) | 641 | if (!priv->cfg->base_params->use_isr_legacy) |
641 | rb_timeout = RX_RB_TIMEOUT; | 642 | rb_timeout = RX_RB_TIMEOUT; |
642 | 643 | ||
643 | if (priv->cfg->mod_params->amsdu_size_8K) | 644 | if (priv->cfg->mod_params->amsdu_size_8K) |
@@ -1424,7 +1425,8 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1424 | * Internal scans are passive, so we can indiscriminately set | 1425 | * Internal scans are passive, so we can indiscriminately set |
1425 | * the BT ignore flag on 2.4 GHz since it applies to TX only. | 1426 | * the BT ignore flag on 2.4 GHz since it applies to TX only. |
1426 | */ | 1427 | */ |
1427 | if (priv->cfg->advanced_bt_coexist) | 1428 | if (priv->cfg->bt_params && |
1429 | priv->cfg->bt_params->advanced_bt_coexist) | ||
1428 | scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; | 1430 | scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; |
1429 | scan->good_CRC_th = IWL_GOOD_CRC_TH_DISABLED; | 1431 | scan->good_CRC_th = IWL_GOOD_CRC_TH_DISABLED; |
1430 | break; | 1432 | break; |
@@ -1463,10 +1465,12 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1463 | if (priv->cfg->scan_tx_antennas[band]) | 1465 | if (priv->cfg->scan_tx_antennas[band]) |
1464 | scan_tx_antennas = priv->cfg->scan_tx_antennas[band]; | 1466 | scan_tx_antennas = priv->cfg->scan_tx_antennas[band]; |
1465 | 1467 | ||
1466 | if (priv->cfg->advanced_bt_coexist && priv->bt_full_concurrent) { | 1468 | if (priv->cfg->bt_params && |
1469 | priv->cfg->bt_params->advanced_bt_coexist && | ||
1470 | priv->bt_full_concurrent) { | ||
1467 | /* operated as 1x1 in full concurrency mode */ | 1471 | /* operated as 1x1 in full concurrency mode */ |
1468 | scan_tx_antennas = | 1472 | scan_tx_antennas = first_antenna( |
1469 | first_antenna(priv->cfg->scan_tx_antennas[band]); | 1473 | priv->cfg->scan_tx_antennas[band]); |
1470 | } | 1474 | } |
1471 | 1475 | ||
1472 | priv->scan_tx_ant[band] = iwl_toggle_tx_ant(priv, priv->scan_tx_ant[band], | 1476 | priv->scan_tx_ant[band] = iwl_toggle_tx_ant(priv, priv->scan_tx_ant[band], |
@@ -1487,7 +1491,9 @@ int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
1487 | 1491 | ||
1488 | rx_ant = first_antenna(active_chains); | 1492 | rx_ant = first_antenna(active_chains); |
1489 | } | 1493 | } |
1490 | if (priv->cfg->advanced_bt_coexist && priv->bt_full_concurrent) { | 1494 | if (priv->cfg->bt_params && |
1495 | priv->cfg->bt_params->advanced_bt_coexist && | ||
1496 | priv->bt_full_concurrent) { | ||
1491 | /* operated as 1x1 in full concurrency mode */ | 1497 | /* operated as 1x1 in full concurrency mode */ |
1492 | rx_ant = first_antenna(rx_ant); | 1498 | rx_ant = first_antenna(rx_ant); |
1493 | } | 1499 | } |
@@ -1777,7 +1783,10 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv) | |||
1777 | BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) != | 1783 | BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) != |
1778 | sizeof(bt_cmd.bt3_lookup_table)); | 1784 | sizeof(bt_cmd.bt3_lookup_table)); |
1779 | 1785 | ||
1780 | bt_cmd.prio_boost = priv->cfg->bt_prio_boost; | 1786 | if (priv->cfg->bt_params) |
1787 | bt_cmd.prio_boost = priv->cfg->bt_params->bt_prio_boost; | ||
1788 | else | ||
1789 | bt_cmd.prio_boost = 0; | ||
1781 | bt_cmd.kill_ack_mask = priv->kill_ack_mask; | 1790 | bt_cmd.kill_ack_mask = priv->kill_ack_mask; |
1782 | bt_cmd.kill_cts_mask = priv->kill_cts_mask; | 1791 | bt_cmd.kill_cts_mask = priv->kill_cts_mask; |
1783 | bt_cmd.valid = priv->bt_valid; | 1792 | 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 e7dc8b92db66..080121d3a3ae 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 = |
@@ -2776,9 +2778,7 @@ static int iwlagn_send_calib_cfg_rt(struct iwl_priv *priv, u32 cfg) | |||
2776 | 2778 | ||
2777 | memset(&calib_cfg_cmd, 0, sizeof(calib_cfg_cmd)); | 2779 | memset(&calib_cfg_cmd, 0, sizeof(calib_cfg_cmd)); |
2778 | calib_cfg_cmd.ucd_calib_cfg.once.is_enable = IWL_CALIB_INIT_CFG_ALL; | 2780 | calib_cfg_cmd.ucd_calib_cfg.once.is_enable = IWL_CALIB_INIT_CFG_ALL; |
2779 | calib_cfg_cmd.ucd_calib_cfg.once.start = cfg; | 2781 | calib_cfg_cmd.ucd_calib_cfg.once.start = cpu_to_le32(cfg); |
2780 | calib_cfg_cmd.ucd_calib_cfg.once.send_res = 0; | ||
2781 | calib_cfg_cmd.ucd_calib_cfg.flags = 0; | ||
2782 | 2782 | ||
2783 | return iwl_send_cmd(priv, &cmd); | 2783 | return iwl_send_cmd(priv, &cmd); |
2784 | } | 2784 | } |
@@ -2831,13 +2831,15 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2831 | /* Enable timer to monitor the driver queues */ | 2831 | /* Enable timer to monitor the driver queues */ |
2832 | mod_timer(&priv->monitor_recover, | 2832 | mod_timer(&priv->monitor_recover, |
2833 | jiffies + | 2833 | jiffies + |
2834 | msecs_to_jiffies(priv->cfg->monitor_recover_period)); | 2834 | msecs_to_jiffies( |
2835 | priv->cfg->base_params->monitor_recover_period)); | ||
2835 | } | 2836 | } |
2836 | 2837 | ||
2837 | if (iwl_is_rfkill(priv)) | 2838 | if (iwl_is_rfkill(priv)) |
2838 | return; | 2839 | return; |
2839 | 2840 | ||
2840 | if (priv->cfg->advanced_bt_coexist) { | 2841 | if (priv->cfg->bt_params && |
2842 | priv->cfg->bt_params->advanced_bt_coexist) { | ||
2841 | /* Configure Bluetooth device coexistence support */ | 2843 | /* Configure Bluetooth device coexistence support */ |
2842 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; | 2844 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; |
2843 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; | 2845 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; |
@@ -2877,7 +2879,8 @@ static void iwl_alive_start(struct iwl_priv *priv) | |||
2877 | priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx); | 2879 | priv->cfg->ops->hcmd->set_rxon_chain(priv, ctx); |
2878 | } | 2880 | } |
2879 | 2881 | ||
2880 | if (!priv->cfg->advanced_bt_coexist) { | 2882 | if (priv->cfg->bt_params && |
2883 | !priv->cfg->bt_params->advanced_bt_coexist) { | ||
2881 | /* Configure Bluetooth device coexistence support */ | 2884 | /* Configure Bluetooth device coexistence support */ |
2882 | priv->cfg->ops->hcmd->send_bt_config(priv); | 2885 | priv->cfg->ops->hcmd->send_bt_config(priv); |
2883 | } | 2886 | } |
@@ -2930,7 +2933,11 @@ static void __iwl_down(struct iwl_priv *priv) | |||
2930 | 2933 | ||
2931 | /* reset BT coex data */ | 2934 | /* reset BT coex data */ |
2932 | priv->bt_status = 0; | 2935 | priv->bt_status = 0; |
2933 | 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; | ||
2934 | priv->bt_sco_active = false; | 2941 | priv->bt_sco_active = false; |
2935 | priv->bt_full_concurrent = false; | 2942 | priv->bt_full_concurrent = false; |
2936 | priv->bt_ci_compliance = 0; | 2943 | priv->bt_ci_compliance = 0; |
@@ -3224,7 +3231,8 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work) | |||
3224 | } | 3231 | } |
3225 | 3232 | ||
3226 | if (priv->start_calib) { | 3233 | if (priv->start_calib) { |
3227 | if (priv->cfg->bt_statistics) { | 3234 | if (priv->cfg->bt_params && |
3235 | priv->cfg->bt_params->bt_statistics) { | ||
3228 | iwl_chain_noise_calibration(priv, | 3236 | iwl_chain_noise_calibration(priv, |
3229 | (void *)&priv->_agn.statistics_bt); | 3237 | (void *)&priv->_agn.statistics_bt); |
3230 | iwl_sensitivity_calibration(priv, | 3238 | iwl_sensitivity_calibration(priv, |
@@ -3423,7 +3431,7 @@ static int iwl_mac_setup_register(struct iwl_priv *priv, | |||
3423 | IEEE80211_HW_NEED_DTIM_PERIOD | | 3431 | IEEE80211_HW_NEED_DTIM_PERIOD | |
3424 | IEEE80211_HW_SPECTRUM_MGMT; | 3432 | IEEE80211_HW_SPECTRUM_MGMT; |
3425 | 3433 | ||
3426 | if (!priv->cfg->broken_powersave) | 3434 | if (!priv->cfg->base_params->broken_powersave) |
3427 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | | 3435 | hw->flags |= IEEE80211_HW_SUPPORTS_PS | |
3428 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; | 3436 | IEEE80211_HW_SUPPORTS_DYNAMIC_PS; |
3429 | 3437 | ||
@@ -3748,7 +3756,8 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3748 | } | 3756 | } |
3749 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 3757 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
3750 | ret = 0; | 3758 | ret = 0; |
3751 | if (priv->cfg->use_rts_for_aggregation) { | 3759 | if (priv->cfg->ht_params && |
3760 | priv->cfg->ht_params->use_rts_for_aggregation) { | ||
3752 | struct iwl_station_priv *sta_priv = | 3761 | struct iwl_station_priv *sta_priv = |
3753 | (void *) sta->drv_priv; | 3762 | (void *) sta->drv_priv; |
3754 | /* | 3763 | /* |
@@ -3762,7 +3771,8 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3762 | } | 3771 | } |
3763 | break; | 3772 | break; |
3764 | case IEEE80211_AMPDU_TX_OPERATIONAL: | 3773 | case IEEE80211_AMPDU_TX_OPERATIONAL: |
3765 | if (priv->cfg->use_rts_for_aggregation) { | 3774 | if (priv->cfg->ht_params && |
3775 | priv->cfg->ht_params->use_rts_for_aggregation) { | ||
3766 | struct iwl_station_priv *sta_priv = | 3776 | struct iwl_station_priv *sta_priv = |
3767 | (void *) sta->drv_priv; | 3777 | (void *) sta->drv_priv; |
3768 | 3778 | ||
@@ -4080,7 +4090,7 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) | |||
4080 | priv->cfg->ops->lib->recover_from_tx_stall; | 4090 | priv->cfg->ops->lib->recover_from_tx_stall; |
4081 | } | 4091 | } |
4082 | 4092 | ||
4083 | if (!priv->cfg->use_isr_legacy) | 4093 | if (!priv->cfg->base_params->use_isr_legacy) |
4084 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) | 4094 | tasklet_init(&priv->irq_tasklet, (void (*)(unsigned long)) |
4085 | iwl_irq_tasklet, (unsigned long)priv); | 4095 | iwl_irq_tasklet, (unsigned long)priv); |
4086 | else | 4096 | else |
@@ -4165,7 +4175,8 @@ static int iwl_init_drv(struct iwl_priv *priv) | |||
4165 | iwl_init_scan_params(priv); | 4175 | iwl_init_scan_params(priv); |
4166 | 4176 | ||
4167 | /* init bt coex */ | 4177 | /* init bt coex */ |
4168 | if (priv->cfg->advanced_bt_coexist) { | 4178 | if (priv->cfg->bt_params && |
4179 | priv->cfg->bt_params->advanced_bt_coexist) { | ||
4169 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; | 4180 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; |
4170 | priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT; | 4181 | priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT; |
4171 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; | 4182 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index b7adcf87280d..95cbc55a7a65 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 |
@@ -2054,7 +2060,8 @@ int iwl_mac_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif) | |||
2054 | goto out_err; | 2060 | goto out_err; |
2055 | } | 2061 | } |
2056 | 2062 | ||
2057 | if (priv->cfg->advanced_bt_coexist && | 2063 | if (priv->cfg->bt_params && |
2064 | priv->cfg->bt_params->advanced_bt_coexist && | ||
2058 | vif->type == NL80211_IFTYPE_ADHOC) { | 2065 | vif->type == NL80211_IFTYPE_ADHOC) { |
2059 | /* | 2066 | /* |
2060 | * pretend to have high BT traffic as long as we | 2067 | * pretend to have high BT traffic as long as we |
@@ -2317,7 +2324,8 @@ int iwl_alloc_txq_mem(struct iwl_priv *priv) | |||
2317 | { | 2324 | { |
2318 | if (!priv->txq) | 2325 | if (!priv->txq) |
2319 | priv->txq = kzalloc( | 2326 | priv->txq = kzalloc( |
2320 | sizeof(struct iwl_tx_queue) * priv->cfg->num_of_queues, | 2327 | sizeof(struct iwl_tx_queue) * |
2328 | priv->cfg->base_params->num_of_queues, | ||
2321 | GFP_KERNEL); | 2329 | GFP_KERNEL); |
2322 | if (!priv->txq) { | 2330 | if (!priv->txq) { |
2323 | IWL_ERR(priv, "Not enough memory for txq\n"); | 2331 | IWL_ERR(priv, "Not enough memory for txq\n"); |
@@ -2828,33 +2836,34 @@ static int iwl_check_stuck_queue(struct iwl_priv *priv, int cnt) | |||
2828 | txq = &priv->txq[cnt]; | 2836 | txq = &priv->txq[cnt]; |
2829 | q = &txq->q; | 2837 | q = &txq->q; |
2830 | /* queue is empty, skip */ | 2838 | /* queue is empty, skip */ |
2831 | if (q->read_ptr != q->write_ptr) { | 2839 | if (q->read_ptr == q->write_ptr) |
2832 | if (q->read_ptr == q->last_read_ptr) { | 2840 | return 0; |
2833 | /* a queue has not been read from last time */ | 2841 | |
2834 | if (q->repeat_same_read_ptr > MAX_REPEAT) { | 2842 | if (q->read_ptr == q->last_read_ptr) { |
2835 | IWL_ERR(priv, | 2843 | /* a queue has not been read from last time */ |
2836 | "queue %d stuck %d time. Fw reload.\n", | 2844 | if (q->repeat_same_read_ptr > MAX_REPEAT) { |
2837 | q->id, q->repeat_same_read_ptr); | 2845 | IWL_ERR(priv, |
2838 | q->repeat_same_read_ptr = 0; | 2846 | "queue %d stuck %d time. Fw reload.\n", |
2839 | iwl_force_reset(priv, IWL_FW_RESET, false); | 2847 | q->id, q->repeat_same_read_ptr); |
2840 | } else { | ||
2841 | q->repeat_same_read_ptr++; | ||
2842 | IWL_DEBUG_RADIO(priv, | ||
2843 | "queue %d, not read %d time\n", | ||
2844 | q->id, | ||
2845 | q->repeat_same_read_ptr); | ||
2846 | if (!priv->cfg->advanced_bt_coexist) { | ||
2847 | mod_timer(&priv->monitor_recover, | ||
2848 | jiffies + msecs_to_jiffies( | ||
2849 | IWL_ONE_HUNDRED_MSECS)); | ||
2850 | return 1; | ||
2851 | } | ||
2852 | } | ||
2853 | return 0; | ||
2854 | } else { | ||
2855 | q->last_read_ptr = q->read_ptr; | ||
2856 | q->repeat_same_read_ptr = 0; | 2848 | q->repeat_same_read_ptr = 0; |
2849 | iwl_force_reset(priv, IWL_FW_RESET, false); | ||
2850 | } else { | ||
2851 | q->repeat_same_read_ptr++; | ||
2852 | IWL_DEBUG_RADIO(priv, | ||
2853 | "queue %d, not read %d time\n", | ||
2854 | q->id, | ||
2855 | q->repeat_same_read_ptr); | ||
2856 | if (priv->cfg->bt_params && | ||
2857 | !priv->cfg->bt_params->advanced_bt_coexist) { | ||
2858 | mod_timer(&priv->monitor_recover, | ||
2859 | jiffies + msecs_to_jiffies( | ||
2860 | IWL_ONE_HUNDRED_MSECS)); | ||
2861 | return 1; | ||
2862 | } | ||
2857 | } | 2863 | } |
2864 | } else { | ||
2865 | q->last_read_ptr = q->read_ptr; | ||
2866 | q->repeat_same_read_ptr = 0; | ||
2858 | } | 2867 | } |
2859 | return 0; | 2868 | return 0; |
2860 | } | 2869 | } |
@@ -2881,13 +2890,13 @@ void iwl_bg_monitor_recover(unsigned long data) | |||
2881 | return; | 2890 | return; |
2882 | } | 2891 | } |
2883 | } | 2892 | } |
2884 | if (priv->cfg->monitor_recover_period) { | 2893 | if (priv->cfg->base_params->monitor_recover_period) { |
2885 | /* | 2894 | /* |
2886 | * Reschedule the timer to occur in | 2895 | * Reschedule the timer to occur in |
2887 | * priv->cfg->monitor_recover_period | 2896 | * priv->cfg->base_params->monitor_recover_period |
2888 | */ | 2897 | */ |
2889 | mod_timer(&priv->monitor_recover, jiffies + msecs_to_jiffies( | 2898 | mod_timer(&priv->monitor_recover, jiffies + msecs_to_jiffies( |
2890 | priv->cfg->monitor_recover_period)); | 2899 | priv->cfg->base_params->monitor_recover_period)); |
2891 | } | 2900 | } |
2892 | } | 2901 | } |
2893 | EXPORT_SYMBOL(iwl_bg_monitor_recover); | 2902 | 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 5daa1893fd03..6228b1c2ec96 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -255,20 +255,12 @@ struct iwl_mod_params { | |||
255 | int restart_fw; /* def: 1 = restart firmware */ | 255 | int restart_fw; /* def: 1 = restart firmware */ |
256 | }; | 256 | }; |
257 | 257 | ||
258 | /** | 258 | /* |
259 | * struct iwl_cfg | ||
260 | * @fw_name_pre: Firmware filename prefix. The api version and extension | ||
261 | * (.ucode) will be added to filename before loading from disk. The | ||
262 | * filename is constructed as fw_name_pre<api>.ucode. | ||
263 | * @ucode_api_max: Highest version of uCode API supported by driver. | ||
264 | * @ucode_api_min: Lowest version of uCode API supported by driver. | ||
265 | * @pa_type: used by 6000 series only to identify the type of Power Amplifier | ||
266 | * @max_ll_items: max number of OTP blocks | 259 | * @max_ll_items: max number of OTP blocks |
267 | * @shadow_ram_support: shadow support for OTP memory | 260 | * @shadow_ram_support: shadow support for OTP memory |
268 | * @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 |
269 | * to the deviation to achieve the desired led frequency. | 262 | * to the deviation to achieve the desired led frequency. |
270 | * The detail algorithm is described in iwl-led.c | 263 | * The detail algorithm is described in iwl-led.c |
271 | * @use_rts_for_aggregation: use rts/cts protection for HT traffic | ||
272 | * @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 |
273 | * @adv_thermal_throttle: support advance thermal throttle | 265 | * @adv_thermal_throttle: support advance thermal throttle |
274 | * @support_ct_kill_exit: support ct kill exit condition | 266 | * @support_ct_kill_exit: support ct kill exit condition |
@@ -286,15 +278,73 @@ struct iwl_mod_params { | |||
286 | * sensitivity calibration operation | 278 | * sensitivity calibration operation |
287 | * @chain_noise_calib_by_driver: driver has the capability to perform | 279 | * @chain_noise_calib_by_driver: driver has the capability to perform |
288 | * chain noise calibration operation | 280 | * chain noise calibration operation |
289 | * @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 | /* | ||
290 | * @advanced_bt_coexist: support advanced bt coexist | 313 | * @advanced_bt_coexist: support advanced bt coexist |
291 | * @bt_init_traffic_load: specify initial bt traffic load | 314 | * @bt_init_traffic_load: specify initial bt traffic load |
292 | * @bt_prio_boost: default bt priority boost value | 315 | * @bt_prio_boost: default bt priority boost value |
293 | * @need_dc_calib: need to perform init dc calibration | ||
294 | * @bt_statistics: use BT version of statistics notification | 316 | * @bt_statistics: use BT version of statistics notification |
295 | * @agg_time_limit: maximum number of uSec in aggregation | 317 | * @agg_time_limit: maximum number of uSec in aggregation |
296 | * @ampdu_factor: Maximum A-MPDU length factor | 318 | * @ampdu_factor: Maximum A-MPDU length factor |
297 | * @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 | ||
298 | * | 348 | * |
299 | * 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 |
300 | * 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 |
@@ -305,9 +355,9 @@ struct iwl_mod_params { | |||
305 | * | 355 | * |
306 | * For example, | 356 | * For example, |
307 | * if (IWL_UCODE_API(priv->ucode_ver) >= 2) { | 357 | * if (IWL_UCODE_API(priv->ucode_ver) >= 2) { |
308 | * Driver interacts with Firmware API version >= 2. | 358 | * Driver interacts with Firmware API version >= 2. |
309 | * } else { | 359 | * } else { |
310 | * Driver interacts with Firmware API version 1. | 360 | * Driver interacts with Firmware API version 1. |
311 | * } | 361 | * } |
312 | * | 362 | * |
313 | * 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 |
@@ -318,59 +368,28 @@ struct iwl_mod_params { | |||
318 | * | 368 | * |
319 | */ | 369 | */ |
320 | struct iwl_cfg { | 370 | struct iwl_cfg { |
371 | /* params specific to an individual device within a device family */ | ||
321 | const char *name; | 372 | const char *name; |
322 | const char *fw_name_pre; | 373 | const char *fw_name_pre; |
323 | const unsigned int ucode_api_max; | 374 | const unsigned int ucode_api_max; |
324 | const unsigned int ucode_api_min; | 375 | const unsigned int ucode_api_min; |
376 | u8 valid_tx_ant; | ||
377 | u8 valid_rx_ant; | ||
325 | unsigned int sku; | 378 | unsigned int sku; |
326 | int eeprom_size; | ||
327 | u16 eeprom_ver; | 379 | u16 eeprom_ver; |
328 | u16 eeprom_calib_ver; | 380 | u16 eeprom_calib_ver; |
329 | int num_of_queues; /* def: HW dependent */ | ||
330 | int num_of_ampdu_queues;/* def: HW dependent */ | ||
331 | const struct iwl_ops *ops; | 381 | const struct iwl_ops *ops; |
382 | /* module based parameters which can be set from modprobe cmd */ | ||
332 | const struct iwl_mod_params *mod_params; | 383 | const struct iwl_mod_params *mod_params; |
333 | u8 valid_tx_ant; | 384 | /* params not likely to change within a device family */ |
334 | u8 valid_rx_ant; | 385 | struct iwl_base_params *base_params; |
335 | 386 | /* params likely to change within a device family */ | |
336 | /* for iwl_apm_init() */ | 387 | struct iwl_ht_params *ht_params; |
337 | u32 pll_cfg_val; | 388 | struct iwl_bt_params *bt_params; |
338 | bool set_l0s; | 389 | enum iwl_pa_type pa_type; /* if used set to IWL_PA_SYSTEM */ |
339 | bool use_bsm; | 390 | const bool need_dc_calib; /* if used set to true */ |
340 | |||
341 | bool use_isr_legacy; | ||
342 | enum iwl_pa_type pa_type; | ||
343 | const u16 max_ll_items; | ||
344 | const bool shadow_ram_support; | ||
345 | const bool ht_greenfield_support; | ||
346 | u16 led_compensation; | ||
347 | const bool broken_powersave; | ||
348 | bool use_rts_for_aggregation; | ||
349 | int chain_noise_num_beacons; | ||
350 | const bool supports_idle; | ||
351 | bool adv_thermal_throttle; | ||
352 | bool support_ct_kill_exit; | ||
353 | const bool support_wimax_coexist; | ||
354 | u8 plcp_delta_threshold; | ||
355 | s32 chain_noise_scale; | ||
356 | /* timer period for monitor the driver queues */ | ||
357 | u32 monitor_recover_period; | ||
358 | bool temperature_kelvin; | ||
359 | u32 max_event_log_size; | ||
360 | const bool tx_power_by_driver; | ||
361 | const bool ucode_tracing; | ||
362 | const bool sensitivity_calib_by_driver; | ||
363 | const bool chain_noise_calib_by_driver; | ||
364 | u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; | 391 | u8 scan_rx_antennas[IEEE80211_NUM_BANDS]; |
365 | u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; | 392 | u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; |
366 | bool advanced_bt_coexist; | ||
367 | u8 bt_init_traffic_load; | ||
368 | u8 bt_prio_boost; | ||
369 | const bool need_dc_calib; | ||
370 | const bool bt_statistics; | ||
371 | u16 agg_time_limit; | ||
372 | u8 ampdu_factor; | ||
373 | u8 ampdu_density; | ||
374 | }; | 393 | }; |
375 | 394 | ||
376 | /*************************** | 395 | /*************************** |
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-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 8b6aa3d38db0..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 | ||