diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-12-15 16:37:55 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-15 16:40:49 -0500 |
commit | 17b3c17ecde36db5db7760a2802990b3129a4d65 (patch) | |
tree | 36f7c593ff1a8a0a8b9f8324248d760c2341ad12 /drivers | |
parent | 1fcfe76a760e78d7774a254608557c84071b0cfb (diff) | |
parent | 65af8dea26aa89ae4a810bdaa05545a8e670b636 (diff) |
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6
Conflicts:
drivers/net/wireless/iwlwifi/iwl-1000.c
drivers/net/wireless/iwlwifi/iwl-6000.c
drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
drivers/net/wireless/iwlwifi/iwl-core.h
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 71 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 88 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 338 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c | 304 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-lib.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 17 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.h | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom.c | 25 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-eeprom.h | 53 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-prph.h | 2 |
17 files changed, 262 insertions, 675 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index af85458401a4..ba78bc8a259f 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -147,7 +147,11 @@ static int iwl1000_hw_set_hw_params(struct iwl_priv *priv) | |||
147 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | 147 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; |
148 | 148 | ||
149 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); | 149 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); |
150 | priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); | 150 | if (priv->cfg->rx_with_siso_diversity) |
151 | priv->hw_params.rx_chains_num = 1; | ||
152 | else | ||
153 | priv->hw_params.rx_chains_num = | ||
154 | num_of_ant(priv->cfg->valid_rx_ant); | ||
151 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; | 155 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; |
152 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; | 156 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; |
153 | 157 | ||
@@ -272,60 +276,49 @@ static struct iwl_ht_params iwl1000_ht_params = { | |||
272 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | 276 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
273 | }; | 277 | }; |
274 | 278 | ||
279 | #define IWL_DEVICE_1000 \ | ||
280 | .fw_name_pre = IWL1000_FW_PRE, \ | ||
281 | .ucode_api_max = IWL1000_UCODE_API_MAX, \ | ||
282 | .ucode_api_min = IWL1000_UCODE_API_MIN, \ | ||
283 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ | ||
284 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ | ||
285 | .ops = &iwl1000_ops, \ | ||
286 | .mod_params = &iwlagn_mod_params, \ | ||
287 | .base_params = &iwl1000_base_params, \ | ||
288 | .led_mode = IWL_LED_BLINK | ||
289 | |||
275 | struct iwl_cfg iwl1000_bgn_cfg = { | 290 | struct iwl_cfg iwl1000_bgn_cfg = { |
276 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", | 291 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BGN", |
277 | .fw_name_pre = IWL1000_FW_PRE, | 292 | IWL_DEVICE_1000, |
278 | .ucode_api_max = IWL1000_UCODE_API_MAX, | ||
279 | .ucode_api_min = IWL1000_UCODE_API_MIN, | ||
280 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | ||
281 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | ||
282 | .ops = &iwl1000_ops, | ||
283 | .mod_params = &iwlagn_mod_params, | ||
284 | .base_params = &iwl1000_base_params, | ||
285 | .ht_params = &iwl1000_ht_params, | 293 | .ht_params = &iwl1000_ht_params, |
286 | .led_mode = IWL_LED_BLINK, | ||
287 | }; | 294 | }; |
288 | 295 | ||
289 | struct iwl_cfg iwl1000_bg_cfg = { | 296 | struct iwl_cfg iwl1000_bg_cfg = { |
290 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", | 297 | .name = "Intel(R) Centrino(R) Wireless-N 1000 BG", |
291 | .fw_name_pre = IWL1000_FW_PRE, | 298 | IWL_DEVICE_1000, |
292 | .ucode_api_max = IWL1000_UCODE_API_MAX, | ||
293 | .ucode_api_min = IWL1000_UCODE_API_MIN, | ||
294 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | ||
295 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | ||
296 | .ops = &iwl1000_ops, | ||
297 | .mod_params = &iwlagn_mod_params, | ||
298 | .base_params = &iwl1000_base_params, | ||
299 | .led_mode = IWL_LED_BLINK, | ||
300 | }; | 299 | }; |
301 | 300 | ||
301 | #define IWL_DEVICE_100 \ | ||
302 | .fw_name_pre = IWL100_FW_PRE, \ | ||
303 | .ucode_api_max = IWL100_UCODE_API_MAX, \ | ||
304 | .ucode_api_min = IWL100_UCODE_API_MIN, \ | ||
305 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, \ | ||
306 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, \ | ||
307 | .ops = &iwl1000_ops, \ | ||
308 | .mod_params = &iwlagn_mod_params, \ | ||
309 | .base_params = &iwl1000_base_params, \ | ||
310 | .led_mode = IWL_LED_RF_STATE, \ | ||
311 | .rx_with_siso_diversity = true | ||
312 | |||
302 | struct iwl_cfg iwl100_bgn_cfg = { | 313 | struct iwl_cfg iwl100_bgn_cfg = { |
303 | .name = "Intel(R) Centrino(R) Wireless-N 100 BGN", | 314 | .name = "Intel(R) Centrino(R) Wireless-N 100 BGN", |
304 | .fw_name_pre = IWL100_FW_PRE, | 315 | IWL_DEVICE_100, |
305 | .ucode_api_max = IWL100_UCODE_API_MAX, | ||
306 | .ucode_api_min = IWL100_UCODE_API_MIN, | ||
307 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | ||
308 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | ||
309 | .ops = &iwl1000_ops, | ||
310 | .mod_params = &iwlagn_mod_params, | ||
311 | .base_params = &iwl1000_base_params, | ||
312 | .ht_params = &iwl1000_ht_params, | 316 | .ht_params = &iwl1000_ht_params, |
313 | .led_mode = IWL_LED_RF_STATE, | ||
314 | .use_new_eeprom_reading = true, | ||
315 | }; | 317 | }; |
316 | 318 | ||
317 | struct iwl_cfg iwl100_bg_cfg = { | 319 | struct iwl_cfg iwl100_bg_cfg = { |
318 | .name = "Intel(R) Centrino(R) Wireless-N 100 BG", | 320 | .name = "Intel(R) Centrino(R) Wireless-N 100 BG", |
319 | .fw_name_pre = IWL100_FW_PRE, | 321 | IWL_DEVICE_100, |
320 | .ucode_api_max = IWL100_UCODE_API_MAX, | ||
321 | .ucode_api_min = IWL100_UCODE_API_MIN, | ||
322 | .eeprom_ver = EEPROM_1000_EEPROM_VERSION, | ||
323 | .eeprom_calib_ver = EEPROM_1000_TX_POWER_VERSION, | ||
324 | .ops = &iwl1000_ops, | ||
325 | .mod_params = &iwlagn_mod_params, | ||
326 | .base_params = &iwl1000_base_params, | ||
327 | .led_mode = IWL_LED_RF_STATE, | ||
328 | .use_new_eeprom_reading = true, | ||
329 | }; | 322 | }; |
330 | 323 | ||
331 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); | 324 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index 8435e5a4e69d..79ab0a6b1386 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -520,65 +520,44 @@ static struct iwl_ht_params iwl5000_ht_params = { | |||
520 | .use_rts_for_aggregation = true, /* use rts/cts protection */ | 520 | .use_rts_for_aggregation = true, /* use rts/cts protection */ |
521 | }; | 521 | }; |
522 | 522 | ||
523 | #define IWL_DEVICE_5000 \ | ||
524 | .fw_name_pre = IWL5000_FW_PRE, \ | ||
525 | .ucode_api_max = IWL5000_UCODE_API_MAX, \ | ||
526 | .ucode_api_min = IWL5000_UCODE_API_MIN, \ | ||
527 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, \ | ||
528 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, \ | ||
529 | .ops = &iwl5000_ops, \ | ||
530 | .mod_params = &iwlagn_mod_params, \ | ||
531 | .base_params = &iwl5000_base_params, \ | ||
532 | .led_mode = IWL_LED_BLINK | ||
533 | |||
523 | struct iwl_cfg iwl5300_agn_cfg = { | 534 | struct iwl_cfg iwl5300_agn_cfg = { |
524 | .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", | 535 | .name = "Intel(R) Ultimate N WiFi Link 5300 AGN", |
525 | .fw_name_pre = IWL5000_FW_PRE, | 536 | IWL_DEVICE_5000, |
526 | .ucode_api_max = IWL5000_UCODE_API_MAX, | ||
527 | .ucode_api_min = IWL5000_UCODE_API_MIN, | ||
528 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | ||
529 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | ||
530 | .ops = &iwl5000_ops, | ||
531 | .mod_params = &iwlagn_mod_params, | ||
532 | .base_params = &iwl5000_base_params, | ||
533 | .ht_params = &iwl5000_ht_params, | 537 | .ht_params = &iwl5000_ht_params, |
534 | .led_mode = IWL_LED_BLINK, | ||
535 | }; | 538 | }; |
536 | 539 | ||
537 | struct iwl_cfg iwl5100_bgn_cfg = { | 540 | struct iwl_cfg iwl5100_bgn_cfg = { |
538 | .name = "Intel(R) WiFi Link 5100 BGN", | 541 | .name = "Intel(R) WiFi Link 5100 BGN", |
539 | .fw_name_pre = IWL5000_FW_PRE, | 542 | IWL_DEVICE_5000, |
540 | .ucode_api_max = IWL5000_UCODE_API_MAX, | ||
541 | .ucode_api_min = IWL5000_UCODE_API_MIN, | ||
542 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ | 543 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
543 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ | 544 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ |
544 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | ||
545 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | ||
546 | .ops = &iwl5000_ops, | ||
547 | .mod_params = &iwlagn_mod_params, | ||
548 | .base_params = &iwl5000_base_params, | ||
549 | .ht_params = &iwl5000_ht_params, | 545 | .ht_params = &iwl5000_ht_params, |
550 | .led_mode = IWL_LED_BLINK, | ||
551 | }; | 546 | }; |
552 | 547 | ||
553 | struct iwl_cfg iwl5100_abg_cfg = { | 548 | struct iwl_cfg iwl5100_abg_cfg = { |
554 | .name = "Intel(R) WiFi Link 5100 ABG", | 549 | .name = "Intel(R) WiFi Link 5100 ABG", |
555 | .fw_name_pre = IWL5000_FW_PRE, | 550 | IWL_DEVICE_5000, |
556 | .ucode_api_max = IWL5000_UCODE_API_MAX, | ||
557 | .ucode_api_min = IWL5000_UCODE_API_MIN, | ||
558 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ | 551 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
559 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ | 552 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ |
560 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | ||
561 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | ||
562 | .ops = &iwl5000_ops, | ||
563 | .mod_params = &iwlagn_mod_params, | ||
564 | .base_params = &iwl5000_base_params, | ||
565 | .led_mode = IWL_LED_BLINK, | ||
566 | }; | 553 | }; |
567 | 554 | ||
568 | struct iwl_cfg iwl5100_agn_cfg = { | 555 | struct iwl_cfg iwl5100_agn_cfg = { |
569 | .name = "Intel(R) WiFi Link 5100 AGN", | 556 | .name = "Intel(R) WiFi Link 5100 AGN", |
570 | .fw_name_pre = IWL5000_FW_PRE, | 557 | IWL_DEVICE_5000, |
571 | .ucode_api_max = IWL5000_UCODE_API_MAX, | ||
572 | .ucode_api_min = IWL5000_UCODE_API_MIN, | ||
573 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ | 558 | .valid_tx_ant = ANT_B, /* .cfg overwrite */ |
574 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ | 559 | .valid_rx_ant = ANT_AB, /* .cfg overwrite */ |
575 | .eeprom_ver = EEPROM_5000_EEPROM_VERSION, | ||
576 | .eeprom_calib_ver = EEPROM_5000_TX_POWER_VERSION, | ||
577 | .ops = &iwl5000_ops, | ||
578 | .mod_params = &iwlagn_mod_params, | ||
579 | .base_params = &iwl5000_base_params, | ||
580 | .ht_params = &iwl5000_ht_params, | 560 | .ht_params = &iwl5000_ht_params, |
581 | .led_mode = IWL_LED_BLINK, | ||
582 | }; | 561 | }; |
583 | 562 | ||
584 | struct iwl_cfg iwl5350_agn_cfg = { | 563 | struct iwl_cfg iwl5350_agn_cfg = { |
@@ -593,35 +572,32 @@ struct iwl_cfg iwl5350_agn_cfg = { | |||
593 | .base_params = &iwl5000_base_params, | 572 | .base_params = &iwl5000_base_params, |
594 | .ht_params = &iwl5000_ht_params, | 573 | .ht_params = &iwl5000_ht_params, |
595 | .led_mode = IWL_LED_BLINK, | 574 | .led_mode = IWL_LED_BLINK, |
575 | .internal_wimax_coex = true, | ||
596 | }; | 576 | }; |
597 | 577 | ||
578 | #define IWL_DEVICE_5150 \ | ||
579 | .fw_name_pre = IWL5150_FW_PRE, \ | ||
580 | .ucode_api_max = IWL5150_UCODE_API_MAX, \ | ||
581 | .ucode_api_min = IWL5150_UCODE_API_MIN, \ | ||
582 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, \ | ||
583 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, \ | ||
584 | .ops = &iwl5150_ops, \ | ||
585 | .mod_params = &iwlagn_mod_params, \ | ||
586 | .base_params = &iwl5000_base_params, \ | ||
587 | .need_dc_calib = true, \ | ||
588 | .led_mode = IWL_LED_BLINK, \ | ||
589 | .internal_wimax_coex = true | ||
590 | |||
598 | struct iwl_cfg iwl5150_agn_cfg = { | 591 | struct iwl_cfg iwl5150_agn_cfg = { |
599 | .name = "Intel(R) WiMAX/WiFi Link 5150 AGN", | 592 | .name = "Intel(R) WiMAX/WiFi Link 5150 AGN", |
600 | .fw_name_pre = IWL5150_FW_PRE, | 593 | IWL_DEVICE_5150, |
601 | .ucode_api_max = IWL5150_UCODE_API_MAX, | ||
602 | .ucode_api_min = IWL5150_UCODE_API_MIN, | ||
603 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, | ||
604 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, | ||
605 | .ops = &iwl5150_ops, | ||
606 | .mod_params = &iwlagn_mod_params, | ||
607 | .base_params = &iwl5000_base_params, | ||
608 | .ht_params = &iwl5000_ht_params, | 594 | .ht_params = &iwl5000_ht_params, |
609 | .need_dc_calib = true, | 595 | |
610 | .led_mode = IWL_LED_BLINK, | ||
611 | }; | 596 | }; |
612 | 597 | ||
613 | struct iwl_cfg iwl5150_abg_cfg = { | 598 | struct iwl_cfg iwl5150_abg_cfg = { |
614 | .name = "Intel(R) WiMAX/WiFi Link 5150 ABG", | 599 | .name = "Intel(R) WiMAX/WiFi Link 5150 ABG", |
615 | .fw_name_pre = IWL5150_FW_PRE, | 600 | IWL_DEVICE_5150, |
616 | .ucode_api_max = IWL5150_UCODE_API_MAX, | ||
617 | .ucode_api_min = IWL5150_UCODE_API_MIN, | ||
618 | .eeprom_ver = EEPROM_5050_EEPROM_VERSION, | ||
619 | .eeprom_calib_ver = EEPROM_5050_TX_POWER_VERSION, | ||
620 | .ops = &iwl5150_ops, | ||
621 | .mod_params = &iwlagn_mod_params, | ||
622 | .base_params = &iwl5000_base_params, | ||
623 | .need_dc_calib = true, | ||
624 | .led_mode = IWL_LED_BLINK, | ||
625 | }; | 601 | }; |
626 | 602 | ||
627 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); | 603 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index a848ca06dc6f..f4bec3201ef9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -182,7 +182,11 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv) | |||
182 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; | 182 | priv->hw_params.rx_wrt_ptr_reg = FH_RSCSR_CHNL0_WPTR; |
183 | 183 | ||
184 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); | 184 | priv->hw_params.tx_chains_num = num_of_ant(priv->cfg->valid_tx_ant); |
185 | priv->hw_params.rx_chains_num = num_of_ant(priv->cfg->valid_rx_ant); | 185 | if (priv->cfg->rx_with_siso_diversity) |
186 | priv->hw_params.rx_chains_num = 1; | ||
187 | else | ||
188 | priv->hw_params.rx_chains_num = | ||
189 | num_of_ant(priv->cfg->valid_rx_ant); | ||
186 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; | 190 | priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; |
187 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; | 191 | priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; |
188 | 192 | ||
@@ -511,7 +515,7 @@ static struct iwl_base_params iwl6050_base_params = { | |||
511 | .chain_noise_calib_by_driver = true, | 515 | .chain_noise_calib_by_driver = true, |
512 | .shadow_reg_enable = true, | 516 | .shadow_reg_enable = true, |
513 | }; | 517 | }; |
514 | static struct iwl_base_params iwl6000_coex_base_params = { | 518 | static struct iwl_base_params iwl6000_g2_base_params = { |
515 | .eeprom_size = OTP_LOW_IMAGE_SIZE, | 519 | .eeprom_size = OTP_LOW_IMAGE_SIZE, |
516 | .num_of_queues = IWLAGN_NUM_QUEUES, | 520 | .num_of_queues = IWLAGN_NUM_QUEUES, |
517 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, | 521 | .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES, |
@@ -520,7 +524,7 @@ static struct iwl_base_params iwl6000_coex_base_params = { | |||
520 | .use_bsm = false, | 524 | .use_bsm = false, |
521 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, | 525 | .max_ll_items = OTP_MAX_LL_ITEMS_6x00, |
522 | .shadow_ram_support = true, | 526 | .shadow_ram_support = true, |
523 | .led_compensation = 51, | 527 | .led_compensation = 57, |
524 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, | 528 | .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS, |
525 | .supports_idle = true, | 529 | .supports_idle = true, |
526 | .adv_thermal_throttle = true, | 530 | .adv_thermal_throttle = true, |
@@ -550,243 +554,156 @@ static struct iwl_bt_params iwl6000_bt_params = { | |||
550 | .bt_sco_disable = true, | 554 | .bt_sco_disable = true, |
551 | }; | 555 | }; |
552 | 556 | ||
557 | #define IWL_DEVICE_6005 \ | ||
558 | .fw_name_pre = IWL6000G2A_FW_PRE, \ | ||
559 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ | ||
560 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ | ||
561 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, \ | ||
562 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, \ | ||
563 | .ops = &iwl6000_ops, \ | ||
564 | .mod_params = &iwlagn_mod_params, \ | ||
565 | .base_params = &iwl6000_g2_base_params, \ | ||
566 | .need_dc_calib = true, \ | ||
567 | .need_temp_offset_calib = true, \ | ||
568 | .led_mode = IWL_LED_RF_STATE | ||
569 | |||
553 | struct iwl_cfg iwl6005_2agn_cfg = { | 570 | struct iwl_cfg iwl6005_2agn_cfg = { |
554 | .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN", | 571 | .name = "Intel(R) Centrino(R) Advanced-N 6205 AGN", |
555 | .fw_name_pre = IWL6000G2A_FW_PRE, | 572 | IWL_DEVICE_6005, |
556 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
557 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
558 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
559 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
560 | .ops = &iwl6000_ops, | ||
561 | .mod_params = &iwlagn_mod_params, | ||
562 | .base_params = &iwl6000_base_params, | ||
563 | .ht_params = &iwl6000_ht_params, | 573 | .ht_params = &iwl6000_ht_params, |
564 | .need_dc_calib = true, | ||
565 | .need_temp_offset_calib = true, | ||
566 | .led_mode = IWL_LED_RF_STATE, | ||
567 | .use_new_eeprom_reading = true, | ||
568 | }; | 574 | }; |
569 | 575 | ||
570 | struct iwl_cfg iwl6005_2abg_cfg = { | 576 | struct iwl_cfg iwl6005_2abg_cfg = { |
571 | .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG", | 577 | .name = "Intel(R) Centrino(R) Advanced-N 6205 ABG", |
572 | .fw_name_pre = IWL6000G2A_FW_PRE, | 578 | IWL_DEVICE_6005, |
573 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
574 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
575 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
576 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
577 | .ops = &iwl6000_ops, | ||
578 | .mod_params = &iwlagn_mod_params, | ||
579 | .base_params = &iwl6000_base_params, | ||
580 | .need_dc_calib = true, | ||
581 | .need_temp_offset_calib = true, | ||
582 | .led_mode = IWL_LED_RF_STATE, | ||
583 | .use_new_eeprom_reading = true, | ||
584 | }; | 579 | }; |
585 | 580 | ||
586 | struct iwl_cfg iwl6005_2bg_cfg = { | 581 | struct iwl_cfg iwl6005_2bg_cfg = { |
587 | .name = "Intel(R) Centrino(R) Advanced-N 6205 BG", | 582 | .name = "Intel(R) Centrino(R) Advanced-N 6205 BG", |
588 | .fw_name_pre = IWL6000G2A_FW_PRE, | 583 | IWL_DEVICE_6005, |
589 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 584 | }; |
590 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 585 | |
591 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 586 | #define IWL_DEVICE_6030 \ |
592 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 587 | .fw_name_pre = IWL6000G2B_FW_PRE, \ |
593 | .ops = &iwl6000_ops, | 588 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ |
594 | .mod_params = &iwlagn_mod_params, | 589 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ |
595 | .base_params = &iwl6000_base_params, | 590 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, \ |
596 | .need_dc_calib = true, | 591 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, \ |
597 | .need_temp_offset_calib = true, | 592 | .ops = &iwl6000g2b_ops, \ |
598 | .led_mode = IWL_LED_RF_STATE, | 593 | .mod_params = &iwlagn_mod_params, \ |
599 | .use_new_eeprom_reading = true, | 594 | .base_params = &iwl6000_g2_base_params, \ |
600 | }; | 595 | .bt_params = &iwl6000_bt_params, \ |
596 | .need_dc_calib = true, \ | ||
597 | .need_temp_offset_calib = true, \ | ||
598 | .led_mode = IWL_LED_RF_STATE, \ | ||
599 | .adv_pm = true, \ | ||
600 | /* \ | ||
601 | *Due to bluetooth, we transmit 2.4 GHz probes \ | ||
602 | * only on antenna A \ | ||
603 | */ \ | ||
604 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A | ||
601 | 605 | ||
602 | struct iwl_cfg iwl6030_2agn_cfg = { | 606 | struct iwl_cfg iwl6030_2agn_cfg = { |
603 | .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN", | 607 | .name = "Intel(R) Centrino(R) Advanced-N 6230 AGN", |
604 | .fw_name_pre = IWL6000G2B_FW_PRE, | 608 | IWL_DEVICE_6030, |
605 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
606 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
607 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
608 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
609 | .ops = &iwl6000g2b_ops, | ||
610 | .mod_params = &iwlagn_mod_params, | ||
611 | .base_params = &iwl6000_coex_base_params, | ||
612 | .bt_params = &iwl6000_bt_params, | ||
613 | .ht_params = &iwl6000_ht_params, | 609 | .ht_params = &iwl6000_ht_params, |
614 | .need_dc_calib = true, | ||
615 | .need_temp_offset_calib = true, | ||
616 | .led_mode = IWL_LED_RF_STATE, | ||
617 | .adv_pm = true, | ||
618 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
619 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | ||
620 | .use_new_eeprom_reading = true, | ||
621 | }; | 610 | }; |
622 | 611 | ||
623 | struct iwl_cfg iwl6030_2abg_cfg = { | 612 | struct iwl_cfg iwl6030_2abg_cfg = { |
624 | .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG", | 613 | .name = "Intel(R) Centrino(R) Advanced-N 6230 ABG", |
625 | .fw_name_pre = IWL6000G2B_FW_PRE, | 614 | IWL_DEVICE_6030, |
626 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
627 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
628 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
629 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
630 | .ops = &iwl6000g2b_ops, | ||
631 | .mod_params = &iwlagn_mod_params, | ||
632 | .base_params = &iwl6000_coex_base_params, | ||
633 | .bt_params = &iwl6000_bt_params, | ||
634 | .need_dc_calib = true, | ||
635 | .need_temp_offset_calib = true, | ||
636 | .led_mode = IWL_LED_RF_STATE, | ||
637 | .adv_pm = true, | ||
638 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
639 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | ||
640 | .use_new_eeprom_reading = true, | ||
641 | }; | 615 | }; |
642 | 616 | ||
643 | struct iwl_cfg iwl6030_2bgn_cfg = { | 617 | struct iwl_cfg iwl6030_2bgn_cfg = { |
644 | .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN", | 618 | .name = "Intel(R) Centrino(R) Advanced-N 6230 BGN", |
645 | .fw_name_pre = IWL6000G2B_FW_PRE, | 619 | IWL_DEVICE_6030, |
646 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
647 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
648 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
649 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
650 | .ops = &iwl6000g2b_ops, | ||
651 | .mod_params = &iwlagn_mod_params, | ||
652 | .base_params = &iwl6000_coex_base_params, | ||
653 | .bt_params = &iwl6000_bt_params, | ||
654 | .ht_params = &iwl6000_ht_params, | 620 | .ht_params = &iwl6000_ht_params, |
655 | .need_dc_calib = true, | ||
656 | .need_temp_offset_calib = true, | ||
657 | .led_mode = IWL_LED_RF_STATE, | ||
658 | .adv_pm = true, | ||
659 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
660 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | ||
661 | .use_new_eeprom_reading = true, | ||
662 | }; | 621 | }; |
663 | 622 | ||
664 | struct iwl_cfg iwl6030_2bg_cfg = { | 623 | struct iwl_cfg iwl6030_2bg_cfg = { |
665 | .name = "Intel(R) Centrino(R) Advanced-N 6230 BG", | 624 | .name = "Intel(R) Centrino(R) Advanced-N 6230 BG", |
666 | .fw_name_pre = IWL6000G2B_FW_PRE, | 625 | IWL_DEVICE_6030, |
667 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
668 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
669 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
670 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
671 | .ops = &iwl6000g2b_ops, | ||
672 | .mod_params = &iwlagn_mod_params, | ||
673 | .base_params = &iwl6000_coex_base_params, | ||
674 | .bt_params = &iwl6000_bt_params, | ||
675 | .need_dc_calib = true, | ||
676 | .need_temp_offset_calib = true, | ||
677 | .led_mode = IWL_LED_RF_STATE, | ||
678 | .adv_pm = true, | ||
679 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
680 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | ||
681 | .use_new_eeprom_reading = true, | ||
682 | }; | 626 | }; |
683 | 627 | ||
684 | struct iwl_cfg iwl1030_bgn_cfg = { | 628 | struct iwl_cfg iwl1030_bgn_cfg = { |
685 | .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN", | 629 | .name = "Intel(R) Centrino(R) Wireless-N 1030 BGN", |
686 | .fw_name_pre = IWL6000G2B_FW_PRE, | 630 | IWL_DEVICE_6030, |
687 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
688 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
689 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
690 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
691 | .ops = &iwl6000g2b_ops, | ||
692 | .mod_params = &iwlagn_mod_params, | ||
693 | .base_params = &iwl6000_coex_base_params, | ||
694 | .bt_params = &iwl6000_bt_params, | ||
695 | .ht_params = &iwl6000_ht_params, | 631 | .ht_params = &iwl6000_ht_params, |
696 | .need_dc_calib = true, | ||
697 | .need_temp_offset_calib = true, | ||
698 | .led_mode = IWL_LED_RF_STATE, | ||
699 | .adv_pm = true, | ||
700 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
701 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | ||
702 | .use_new_eeprom_reading = true, | ||
703 | }; | 632 | }; |
704 | 633 | ||
705 | struct iwl_cfg iwl1030_bg_cfg = { | 634 | struct iwl_cfg iwl1030_bg_cfg = { |
706 | .name = "Intel(R) Centrino(R) Wireless-N 1030 BG", | 635 | .name = "Intel(R) Centrino(R) Wireless-N 1030 BG", |
707 | .fw_name_pre = IWL6000G2B_FW_PRE, | 636 | IWL_DEVICE_6030, |
708 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | 637 | }; |
709 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | 638 | |
710 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | 639 | struct iwl_cfg iwl130_bgn_cfg = { |
711 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | 640 | .name = "Intel(R) Centrino(R) Wireless-N 130 BGN", |
712 | .ops = &iwl6000g2b_ops, | 641 | IWL_DEVICE_6030, |
713 | .mod_params = &iwlagn_mod_params, | 642 | .ht_params = &iwl6000_ht_params, |
714 | .base_params = &iwl6000_coex_base_params, | 643 | .rx_with_siso_diversity = true, |
715 | .bt_params = &iwl6000_bt_params, | 644 | }; |
716 | .need_dc_calib = true, | 645 | |
717 | .need_temp_offset_calib = true, | 646 | struct iwl_cfg iwl130_bg_cfg = { |
718 | .led_mode = IWL_LED_RF_STATE, | 647 | .name = "Intel(R) Centrino(R) Wireless-N 130 BG", |
719 | .adv_pm = true, | 648 | IWL_DEVICE_6030, |
720 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | 649 | .rx_with_siso_diversity = true, |
721 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | ||
722 | .use_new_eeprom_reading = true, | ||
723 | }; | 650 | }; |
724 | 651 | ||
725 | /* | 652 | /* |
726 | * "i": Internal configuration, use internal Power Amplifier | 653 | * "i": Internal configuration, use internal Power Amplifier |
727 | */ | 654 | */ |
655 | #define IWL_DEVICE_6000i \ | ||
656 | .fw_name_pre = IWL6000_FW_PRE, \ | ||
657 | .ucode_api_max = IWL6000_UCODE_API_MAX, \ | ||
658 | .ucode_api_min = IWL6000_UCODE_API_MIN, \ | ||
659 | .valid_tx_ant = ANT_BC, /* .cfg overwrite */ \ | ||
660 | .valid_rx_ant = ANT_BC, /* .cfg overwrite */ \ | ||
661 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, \ | ||
662 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, \ | ||
663 | .ops = &iwl6000_ops, \ | ||
664 | .mod_params = &iwlagn_mod_params, \ | ||
665 | .base_params = &iwl6000_base_params, \ | ||
666 | .pa_type = IWL_PA_INTERNAL, \ | ||
667 | .led_mode = IWL_LED_BLINK | ||
668 | |||
728 | struct iwl_cfg iwl6000i_2agn_cfg = { | 669 | struct iwl_cfg iwl6000i_2agn_cfg = { |
729 | .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN", | 670 | .name = "Intel(R) Centrino(R) Advanced-N 6200 AGN", |
730 | .fw_name_pre = IWL6000_FW_PRE, | 671 | IWL_DEVICE_6000i, |
731 | .ucode_api_max = IWL6000_UCODE_API_MAX, | ||
732 | .ucode_api_min = IWL6000_UCODE_API_MIN, | ||
733 | .valid_tx_ant = ANT_BC, /* .cfg overwrite */ | ||
734 | .valid_rx_ant = ANT_BC, /* .cfg overwrite */ | ||
735 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | ||
736 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | ||
737 | .ops = &iwl6000_ops, | ||
738 | .mod_params = &iwlagn_mod_params, | ||
739 | .base_params = &iwl6000_base_params, | ||
740 | .ht_params = &iwl6000_ht_params, | 672 | .ht_params = &iwl6000_ht_params, |
741 | .pa_type = IWL_PA_INTERNAL, | ||
742 | .led_mode = IWL_LED_BLINK, | ||
743 | }; | 673 | }; |
744 | 674 | ||
745 | struct iwl_cfg iwl6000i_2abg_cfg = { | 675 | struct iwl_cfg iwl6000i_2abg_cfg = { |
746 | .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG", | 676 | .name = "Intel(R) Centrino(R) Advanced-N 6200 ABG", |
747 | .fw_name_pre = IWL6000_FW_PRE, | 677 | IWL_DEVICE_6000i, |
748 | .ucode_api_max = IWL6000_UCODE_API_MAX, | ||
749 | .ucode_api_min = IWL6000_UCODE_API_MIN, | ||
750 | .valid_tx_ant = ANT_BC, /* .cfg overwrite */ | ||
751 | .valid_rx_ant = ANT_BC, /* .cfg overwrite */ | ||
752 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | ||
753 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | ||
754 | .ops = &iwl6000_ops, | ||
755 | .mod_params = &iwlagn_mod_params, | ||
756 | .base_params = &iwl6000_base_params, | ||
757 | .pa_type = IWL_PA_INTERNAL, | ||
758 | .led_mode = IWL_LED_BLINK, | ||
759 | }; | 678 | }; |
760 | 679 | ||
761 | struct iwl_cfg iwl6000i_2bg_cfg = { | 680 | struct iwl_cfg iwl6000i_2bg_cfg = { |
762 | .name = "Intel(R) Centrino(R) Advanced-N 6200 BG", | 681 | .name = "Intel(R) Centrino(R) Advanced-N 6200 BG", |
763 | .fw_name_pre = IWL6000_FW_PRE, | 682 | IWL_DEVICE_6000i, |
764 | .ucode_api_max = IWL6000_UCODE_API_MAX, | 683 | }; |
765 | .ucode_api_min = IWL6000_UCODE_API_MIN, | 684 | |
766 | .valid_tx_ant = ANT_BC, /* .cfg overwrite */ | 685 | #define IWL_DEVICE_6050 \ |
767 | .valid_rx_ant = ANT_BC, /* .cfg overwrite */ | 686 | .fw_name_pre = IWL6050_FW_PRE, \ |
768 | .eeprom_ver = EEPROM_6000_EEPROM_VERSION, | 687 | .ucode_api_max = IWL6050_UCODE_API_MAX, \ |
769 | .eeprom_calib_ver = EEPROM_6000_TX_POWER_VERSION, | 688 | .ucode_api_min = IWL6050_UCODE_API_MIN, \ |
770 | .ops = &iwl6000_ops, | 689 | .ops = &iwl6050_ops, \ |
771 | .mod_params = &iwlagn_mod_params, | 690 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, \ |
772 | .base_params = &iwl6000_base_params, | 691 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, \ |
773 | .pa_type = IWL_PA_INTERNAL, | 692 | .mod_params = &iwlagn_mod_params, \ |
774 | .led_mode = IWL_LED_BLINK, | 693 | .base_params = &iwl6050_base_params, \ |
775 | }; | 694 | .need_dc_calib = true, \ |
695 | .led_mode = IWL_LED_BLINK, \ | ||
696 | .internal_wimax_coex = true | ||
776 | 697 | ||
777 | struct iwl_cfg iwl6050_2agn_cfg = { | 698 | struct iwl_cfg iwl6050_2agn_cfg = { |
778 | .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN", | 699 | .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 AGN", |
779 | .fw_name_pre = IWL6050_FW_PRE, | 700 | IWL_DEVICE_6050, |
780 | .ucode_api_max = IWL6050_UCODE_API_MAX, | ||
781 | .ucode_api_min = IWL6050_UCODE_API_MIN, | ||
782 | .ops = &iwl6050_ops, | ||
783 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, | ||
784 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, | ||
785 | .mod_params = &iwlagn_mod_params, | ||
786 | .base_params = &iwl6050_base_params, | ||
787 | .ht_params = &iwl6000_ht_params, | 701 | .ht_params = &iwl6000_ht_params, |
788 | .need_dc_calib = true, | 702 | }; |
789 | .led_mode = IWL_LED_BLINK, | 703 | |
704 | struct iwl_cfg iwl6050_2abg_cfg = { | ||
705 | .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG", | ||
706 | IWL_DEVICE_6050, | ||
790 | }; | 707 | }; |
791 | 708 | ||
792 | struct iwl_cfg iwl6150_bgn_cfg = { | 709 | struct iwl_cfg iwl6150_bgn_cfg = { |
@@ -802,21 +719,7 @@ struct iwl_cfg iwl6150_bgn_cfg = { | |||
802 | .ht_params = &iwl6000_ht_params, | 719 | .ht_params = &iwl6000_ht_params, |
803 | .need_dc_calib = true, | 720 | .need_dc_calib = true, |
804 | .led_mode = IWL_LED_RF_STATE, | 721 | .led_mode = IWL_LED_RF_STATE, |
805 | .use_new_eeprom_reading = true, | 722 | .internal_wimax_coex = true, |
806 | }; | ||
807 | |||
808 | struct iwl_cfg iwl6050_2abg_cfg = { | ||
809 | .name = "Intel(R) Centrino(R) Advanced-N + WiMAX 6250 ABG", | ||
810 | .fw_name_pre = IWL6050_FW_PRE, | ||
811 | .ucode_api_max = IWL6050_UCODE_API_MAX, | ||
812 | .ucode_api_min = IWL6050_UCODE_API_MIN, | ||
813 | .eeprom_ver = EEPROM_6050_EEPROM_VERSION, | ||
814 | .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, | ||
815 | .ops = &iwl6050_ops, | ||
816 | .mod_params = &iwlagn_mod_params, | ||
817 | .base_params = &iwl6050_base_params, | ||
818 | .need_dc_calib = true, | ||
819 | .led_mode = IWL_LED_BLINK, | ||
820 | }; | 723 | }; |
821 | 724 | ||
822 | struct iwl_cfg iwl6000_3agn_cfg = { | 725 | struct iwl_cfg iwl6000_3agn_cfg = { |
@@ -834,45 +737,6 @@ struct iwl_cfg iwl6000_3agn_cfg = { | |||
834 | .led_mode = IWL_LED_BLINK, | 737 | .led_mode = IWL_LED_BLINK, |
835 | }; | 738 | }; |
836 | 739 | ||
837 | struct iwl_cfg iwl130_bgn_cfg = { | ||
838 | .name = "Intel(R) Centrino(R) Wireless-N 130 BGN", | ||
839 | .fw_name_pre = IWL6000G2B_FW_PRE, | ||
840 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
841 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
842 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
843 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
844 | .ops = &iwl6000g2b_ops, | ||
845 | .mod_params = &iwlagn_mod_params, | ||
846 | .base_params = &iwl6000_coex_base_params, | ||
847 | .bt_params = &iwl6000_bt_params, | ||
848 | .ht_params = &iwl6000_ht_params, | ||
849 | .need_dc_calib = true, | ||
850 | .led_mode = IWL_LED_RF_STATE, | ||
851 | .adv_pm = true, | ||
852 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
853 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | ||
854 | .use_new_eeprom_reading = true, | ||
855 | }; | ||
856 | |||
857 | struct iwl_cfg iwl130_bg_cfg = { | ||
858 | .name = "Intel(R) Centrino(R) Wireless-N 130 BG", | ||
859 | .fw_name_pre = IWL6000G2B_FW_PRE, | ||
860 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, | ||
861 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, | ||
862 | .eeprom_ver = EEPROM_6000G2_EEPROM_VERSION, | ||
863 | .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, | ||
864 | .ops = &iwl6000g2b_ops, | ||
865 | .mod_params = &iwlagn_mod_params, | ||
866 | .base_params = &iwl6000_coex_base_params, | ||
867 | .bt_params = &iwl6000_bt_params, | ||
868 | .need_dc_calib = true, | ||
869 | .led_mode = IWL_LED_RF_STATE, | ||
870 | .adv_pm = true, | ||
871 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
872 | .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, | ||
873 | .use_new_eeprom_reading = true, | ||
874 | }; | ||
875 | |||
876 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); | 740 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_MAX)); |
877 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); | 741 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); |
878 | MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); | 742 | MODULE_FIRMWARE(IWL6000G2A_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c index a358d4334a1a..a6dbd8983dac 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c | |||
@@ -856,6 +856,9 @@ ssize_t iwl_ucode_bt_stats_read(struct file *file, | |||
856 | if (!iwl_is_alive(priv)) | 856 | if (!iwl_is_alive(priv)) |
857 | return -EAGAIN; | 857 | return -EAGAIN; |
858 | 858 | ||
859 | if (!priv->bt_enable_flag) | ||
860 | return -EINVAL; | ||
861 | |||
859 | /* make request to uCode to retrieve statistics information */ | 862 | /* make request to uCode to retrieve statistics information */ |
860 | mutex_lock(&priv->mutex); | 863 | mutex_lock(&priv->mutex); |
861 | ret = iwl_send_statistics_request(priv, CMD_SYNC, false); | 864 | ret = iwl_send_statistics_request(priv, CMD_SYNC, false); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c index cf9194baadac..97906dd442e6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c | |||
@@ -75,109 +75,6 @@ | |||
75 | #include "iwl-agn.h" | 75 | #include "iwl-agn.h" |
76 | #include "iwl-io.h" | 76 | #include "iwl-io.h" |
77 | 77 | ||
78 | /************************** EEPROM BANDS **************************** | ||
79 | * | ||
80 | * The iwl_eeprom_band definitions below provide the mapping from the | ||
81 | * EEPROM contents to the specific channel number supported for each | ||
82 | * band. | ||
83 | * | ||
84 | * For example, iwl_priv->eeprom.band_3_channels[4] from the band_3 | ||
85 | * definition below maps to physical channel 42 in the 5.2GHz spectrum. | ||
86 | * The specific geography and calibration information for that channel | ||
87 | * is contained in the eeprom map itself. | ||
88 | * | ||
89 | * During init, we copy the eeprom information and channel map | ||
90 | * information into priv->channel_info_24/52 and priv->channel_map_24/52 | ||
91 | * | ||
92 | * channel_map_24/52 provides the index in the channel_info array for a | ||
93 | * given channel. We have to have two separate maps as there is channel | ||
94 | * overlap with the 2.4GHz and 5.2GHz spectrum as seen in band_1 and | ||
95 | * band_2 | ||
96 | * | ||
97 | * A value of 0xff stored in the channel_map indicates that the channel | ||
98 | * is not supported by the hardware at all. | ||
99 | * | ||
100 | * A value of 0xfe in the channel_map indicates that the channel is not | ||
101 | * valid for Tx with the current hardware. This means that | ||
102 | * while the system can tune and receive on a given channel, it may not | ||
103 | * be able to associate or transmit any frames on that | ||
104 | * channel. There is no corresponding channel information for that | ||
105 | * entry. | ||
106 | * | ||
107 | *********************************************************************/ | ||
108 | |||
109 | /** | ||
110 | * struct iwl_txpwr_section: eeprom section information | ||
111 | * @offset: indirect address into eeprom image | ||
112 | * @count: number of "struct iwl_eeprom_enhanced_txpwr" in this section | ||
113 | * @band: band type for the section | ||
114 | * @is_common - true: common section, false: channel section | ||
115 | * @is_cck - true: cck section, false: not cck section | ||
116 | * @is_ht_40 - true: all channel in the section are HT40 channel, | ||
117 | * false: legacy or HT 20 MHz | ||
118 | * ignore if it is common section | ||
119 | * @iwl_eeprom_section_channel: channel array in the section, | ||
120 | * ignore if common section | ||
121 | */ | ||
122 | struct iwl_txpwr_section { | ||
123 | u32 offset; | ||
124 | u8 count; | ||
125 | enum ieee80211_band band; | ||
126 | bool is_common; | ||
127 | bool is_cck; | ||
128 | bool is_ht40; | ||
129 | u8 iwl_eeprom_section_channel[EEPROM_MAX_TXPOWER_SECTION_ELEMENTS]; | ||
130 | }; | ||
131 | |||
132 | /** | ||
133 | * section 1 - 3 are regulatory tx power apply to all channels based on | ||
134 | * modulation: CCK, OFDM | ||
135 | * Band: 2.4GHz, 5.2GHz | ||
136 | * section 4 - 10 are regulatory tx power apply to specified channels | ||
137 | * For example: | ||
138 | * 1L - Channel 1 Legacy | ||
139 | * 1HT - Channel 1 HT | ||
140 | * (1,+1) - Channel 1 HT40 "_above_" | ||
141 | * | ||
142 | * Section 1: all CCK channels | ||
143 | * Section 2: all 2.4 GHz OFDM (Legacy, HT and HT40) channels | ||
144 | * Section 3: all 5.2 GHz OFDM (Legacy, HT and HT40) channels | ||
145 | * Section 4: 2.4 GHz 20MHz channels: 1L, 1HT, 2L, 2HT, 10L, 10HT, 11L, 11HT | ||
146 | * Section 5: 2.4 GHz 40MHz channels: (1,+1) (2,+1) (6,+1) (7,+1) (9,+1) | ||
147 | * Section 6: 5.2 GHz 20MHz channels: 36L, 64L, 100L, 36HT, 64HT, 100HT | ||
148 | * Section 7: 5.2 GHz 40MHz channels: (36,+1) (60,+1) (100,+1) | ||
149 | * Section 8: 2.4 GHz channel: 13L, 13HT | ||
150 | * Section 9: 2.4 GHz channel: 140L, 140HT | ||
151 | * Section 10: 2.4 GHz 40MHz channels: (132,+1) (44,+1) | ||
152 | * | ||
153 | */ | ||
154 | static const struct iwl_txpwr_section enhinfo[] = { | ||
155 | { EEPROM_LB_CCK_20_COMMON, 1, IEEE80211_BAND_2GHZ, true, true, false }, | ||
156 | { EEPROM_LB_OFDM_COMMON, 3, IEEE80211_BAND_2GHZ, true, false, false }, | ||
157 | { EEPROM_HB_OFDM_COMMON, 3, IEEE80211_BAND_5GHZ, true, false, false }, | ||
158 | { EEPROM_LB_OFDM_20_BAND, 8, IEEE80211_BAND_2GHZ, | ||
159 | false, false, false, | ||
160 | {1, 1, 2, 2, 10, 10, 11, 11 } }, | ||
161 | { EEPROM_LB_OFDM_HT40_BAND, 5, IEEE80211_BAND_2GHZ, | ||
162 | false, false, true, | ||
163 | { 1, 2, 6, 7, 9 } }, | ||
164 | { EEPROM_HB_OFDM_20_BAND, 6, IEEE80211_BAND_5GHZ, | ||
165 | false, false, false, | ||
166 | { 36, 64, 100, 36, 64, 100 } }, | ||
167 | { EEPROM_HB_OFDM_HT40_BAND, 3, IEEE80211_BAND_5GHZ, | ||
168 | false, false, true, | ||
169 | { 36, 60, 100 } }, | ||
170 | { EEPROM_LB_OFDM_20_CHANNEL_13, 2, IEEE80211_BAND_2GHZ, | ||
171 | false, false, false, | ||
172 | { 13, 13 } }, | ||
173 | { EEPROM_HB_OFDM_20_CHANNEL_140, 2, IEEE80211_BAND_5GHZ, | ||
174 | false, false, false, | ||
175 | { 140, 140 } }, | ||
176 | { EEPROM_HB_OFDM_HT40_BAND_1, 2, IEEE80211_BAND_5GHZ, | ||
177 | false, false, true, | ||
178 | { 132, 44 } }, | ||
179 | }; | ||
180 | |||
181 | /****************************************************************************** | 78 | /****************************************************************************** |
182 | * | 79 | * |
183 | * EEPROM related functions | 80 | * EEPROM related functions |
@@ -306,15 +203,6 @@ static s8 iwl_get_max_txpower_avg(struct iwl_priv *priv, | |||
306 | { | 203 | { |
307 | s8 max_txpower_avg = 0; /* (dBm) */ | 204 | s8 max_txpower_avg = 0; /* (dBm) */ |
308 | 205 | ||
309 | IWL_DEBUG_INFO(priv, "%d - " | ||
310 | "chain_a: %d dB chain_b: %d dB " | ||
311 | "chain_c: %d dB mimo2: %d dB mimo3: %d dB\n", | ||
312 | element, | ||
313 | enhanced_txpower[element].chain_a_max >> 1, | ||
314 | enhanced_txpower[element].chain_b_max >> 1, | ||
315 | enhanced_txpower[element].chain_c_max >> 1, | ||
316 | enhanced_txpower[element].mimo2_max >> 1, | ||
317 | enhanced_txpower[element].mimo3_max >> 1); | ||
318 | /* Take the highest tx power from any valid chains */ | 206 | /* Take the highest tx power from any valid chains */ |
319 | if ((priv->cfg->valid_tx_ant & ANT_A) && | 207 | if ((priv->cfg->valid_tx_ant & ANT_A) && |
320 | (enhanced_txpower[element].chain_a_max > max_txpower_avg)) | 208 | (enhanced_txpower[element].chain_a_max > max_txpower_avg)) |
@@ -344,157 +232,6 @@ static s8 iwl_get_max_txpower_avg(struct iwl_priv *priv, | |||
344 | return (max_txpower_avg & 0x01) + (max_txpower_avg >> 1); | 232 | return (max_txpower_avg & 0x01) + (max_txpower_avg >> 1); |
345 | } | 233 | } |
346 | 234 | ||
347 | /** | ||
348 | * iwl_update_common_txpower: update channel tx power | ||
349 | * update tx power per band based on EEPROM enhanced tx power info. | ||
350 | */ | ||
351 | static s8 iwl_update_common_txpower(struct iwl_priv *priv, | ||
352 | struct iwl_eeprom_enhanced_txpwr *enhanced_txpower, | ||
353 | int section, int element, s8 *max_txpower_in_half_dbm) | ||
354 | { | ||
355 | struct iwl_channel_info *ch_info; | ||
356 | int ch; | ||
357 | bool is_ht40 = false; | ||
358 | s8 max_txpower_avg; /* (dBm) */ | ||
359 | |||
360 | /* it is common section, contain all type (Legacy, HT and HT40) | ||
361 | * based on the element in the section to determine | ||
362 | * is it HT 40 or not | ||
363 | */ | ||
364 | if (element == EEPROM_TXPOWER_COMMON_HT40_INDEX) | ||
365 | is_ht40 = true; | ||
366 | max_txpower_avg = | ||
367 | iwl_get_max_txpower_avg(priv, enhanced_txpower, | ||
368 | element, max_txpower_in_half_dbm); | ||
369 | |||
370 | ch_info = priv->channel_info; | ||
371 | |||
372 | for (ch = 0; ch < priv->channel_count; ch++) { | ||
373 | /* find matching band and update tx power if needed */ | ||
374 | if ((ch_info->band == enhinfo[section].band) && | ||
375 | (ch_info->max_power_avg < max_txpower_avg) && | ||
376 | (!is_ht40)) { | ||
377 | /* Update regulatory-based run-time data */ | ||
378 | ch_info->max_power_avg = ch_info->curr_txpow = | ||
379 | max_txpower_avg; | ||
380 | ch_info->scan_power = max_txpower_avg; | ||
381 | } | ||
382 | if ((ch_info->band == enhinfo[section].band) && is_ht40 && | ||
383 | (ch_info->ht40_max_power_avg < max_txpower_avg)) { | ||
384 | /* Update regulatory-based run-time data */ | ||
385 | ch_info->ht40_max_power_avg = max_txpower_avg; | ||
386 | } | ||
387 | ch_info++; | ||
388 | } | ||
389 | return max_txpower_avg; | ||
390 | } | ||
391 | |||
392 | /** | ||
393 | * iwl_update_channel_txpower: update channel tx power | ||
394 | * update channel tx power based on EEPROM enhanced tx power info. | ||
395 | */ | ||
396 | static s8 iwl_update_channel_txpower(struct iwl_priv *priv, | ||
397 | struct iwl_eeprom_enhanced_txpwr *enhanced_txpower, | ||
398 | int section, int element, s8 *max_txpower_in_half_dbm) | ||
399 | { | ||
400 | struct iwl_channel_info *ch_info; | ||
401 | int ch; | ||
402 | u8 channel; | ||
403 | s8 max_txpower_avg; /* (dBm) */ | ||
404 | |||
405 | channel = enhinfo[section].iwl_eeprom_section_channel[element]; | ||
406 | max_txpower_avg = | ||
407 | iwl_get_max_txpower_avg(priv, enhanced_txpower, | ||
408 | element, max_txpower_in_half_dbm); | ||
409 | |||
410 | ch_info = priv->channel_info; | ||
411 | for (ch = 0; ch < priv->channel_count; ch++) { | ||
412 | /* find matching channel and update tx power if needed */ | ||
413 | if (ch_info->channel == channel) { | ||
414 | if ((ch_info->max_power_avg < max_txpower_avg) && | ||
415 | (!enhinfo[section].is_ht40)) { | ||
416 | /* Update regulatory-based run-time data */ | ||
417 | ch_info->max_power_avg = max_txpower_avg; | ||
418 | ch_info->curr_txpow = max_txpower_avg; | ||
419 | ch_info->scan_power = max_txpower_avg; | ||
420 | } | ||
421 | if ((enhinfo[section].is_ht40) && | ||
422 | (ch_info->ht40_max_power_avg < max_txpower_avg)) { | ||
423 | /* Update regulatory-based run-time data */ | ||
424 | ch_info->ht40_max_power_avg = max_txpower_avg; | ||
425 | } | ||
426 | break; | ||
427 | } | ||
428 | ch_info++; | ||
429 | } | ||
430 | return max_txpower_avg; | ||
431 | } | ||
432 | |||
433 | /** | ||
434 | * iwlcore_eeprom_enhanced_txpower: process enhanced tx power info | ||
435 | */ | ||
436 | static void iwlcore_eeprom_enhanced_txpower_old(struct iwl_priv *priv) | ||
437 | { | ||
438 | int eeprom_section_count = 0; | ||
439 | int section, element; | ||
440 | struct iwl_eeprom_enhanced_txpwr *enhanced_txpower; | ||
441 | u32 offset; | ||
442 | s8 max_txpower_avg; /* (dBm) */ | ||
443 | s8 max_txpower_in_half_dbm; /* (half-dBm) */ | ||
444 | |||
445 | /* Loop through all the sections | ||
446 | * adjust bands and channel's max tx power | ||
447 | * Set the tx_power_user_lmt to the highest power | ||
448 | * supported by any channels and chains | ||
449 | */ | ||
450 | for (section = 0; section < ARRAY_SIZE(enhinfo); section++) { | ||
451 | eeprom_section_count = enhinfo[section].count; | ||
452 | offset = enhinfo[section].offset; | ||
453 | enhanced_txpower = (struct iwl_eeprom_enhanced_txpwr *) | ||
454 | iwl_eeprom_query_addr(priv, offset); | ||
455 | |||
456 | /* | ||
457 | * check for valid entry - | ||
458 | * different version of EEPROM might contain different set | ||
459 | * of enhanced tx power table | ||
460 | * always check for valid entry before process | ||
461 | * the information | ||
462 | */ | ||
463 | if (!(enhanced_txpower->flags || enhanced_txpower->channel) || | ||
464 | enhanced_txpower->delta_20_in_40) | ||
465 | continue; | ||
466 | |||
467 | for (element = 0; element < eeprom_section_count; element++) { | ||
468 | if (enhinfo[section].is_common) | ||
469 | max_txpower_avg = | ||
470 | iwl_update_common_txpower(priv, | ||
471 | enhanced_txpower, section, | ||
472 | element, | ||
473 | &max_txpower_in_half_dbm); | ||
474 | else | ||
475 | max_txpower_avg = | ||
476 | iwl_update_channel_txpower(priv, | ||
477 | enhanced_txpower, section, | ||
478 | element, | ||
479 | &max_txpower_in_half_dbm); | ||
480 | |||
481 | /* Update the tx_power_user_lmt to the highest power | ||
482 | * supported by any channel */ | ||
483 | if (max_txpower_avg > priv->tx_power_user_lmt) | ||
484 | priv->tx_power_user_lmt = max_txpower_avg; | ||
485 | |||
486 | /* | ||
487 | * Update the tx_power_lmt_in_half_dbm to | ||
488 | * the highest power supported by any channel | ||
489 | */ | ||
490 | if (max_txpower_in_half_dbm > | ||
491 | priv->tx_power_lmt_in_half_dbm) | ||
492 | priv->tx_power_lmt_in_half_dbm = | ||
493 | max_txpower_in_half_dbm; | ||
494 | } | ||
495 | } | ||
496 | } | ||
497 | |||
498 | static void | 235 | static void |
499 | iwlcore_eeprom_enh_txp_read_element(struct iwl_priv *priv, | 236 | iwlcore_eeprom_enh_txp_read_element(struct iwl_priv *priv, |
500 | struct iwl_eeprom_enhanced_txpwr *txp, | 237 | struct iwl_eeprom_enhanced_txpwr *txp, |
@@ -533,7 +270,10 @@ iwlcore_eeprom_enh_txp_read_element(struct iwl_priv *priv, | |||
533 | #define EEPROM_TXP_ENTRY_LEN sizeof(struct iwl_eeprom_enhanced_txpwr) | 270 | #define EEPROM_TXP_ENTRY_LEN sizeof(struct iwl_eeprom_enhanced_txpwr) |
534 | #define EEPROM_TXP_SZ_OFFS (0x00 | INDIRECT_ADDRESS | INDIRECT_TXP_LIMIT_SIZE) | 271 | #define EEPROM_TXP_SZ_OFFS (0x00 | INDIRECT_ADDRESS | INDIRECT_TXP_LIMIT_SIZE) |
535 | 272 | ||
536 | static void iwlcore_eeprom_enhanced_txpower_new(struct iwl_priv *priv) | 273 | #define TXP_CHECK_AND_PRINT(x) ((txp->flags & IWL_EEPROM_ENH_TXP_FL_##x) \ |
274 | ? # x " " : "") | ||
275 | |||
276 | void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv) | ||
537 | { | 277 | { |
538 | struct iwl_eeprom_enhanced_txpwr *txp_array, *txp; | 278 | struct iwl_eeprom_enhanced_txpwr *txp_array, *txp; |
539 | int idx, entries; | 279 | int idx, entries; |
@@ -547,13 +287,39 @@ static void iwlcore_eeprom_enhanced_txpower_new(struct iwl_priv *priv) | |||
547 | entries = le16_to_cpup(txp_len) * 2 / EEPROM_TXP_ENTRY_LEN; | 287 | entries = le16_to_cpup(txp_len) * 2 / EEPROM_TXP_ENTRY_LEN; |
548 | 288 | ||
549 | txp_array = (void *) iwlagn_eeprom_query_addr(priv, EEPROM_TXP_OFFS); | 289 | txp_array = (void *) iwlagn_eeprom_query_addr(priv, EEPROM_TXP_OFFS); |
290 | |||
550 | for (idx = 0; idx < entries; idx++) { | 291 | for (idx = 0; idx < entries; idx++) { |
551 | txp = &txp_array[idx]; | 292 | txp = &txp_array[idx]; |
552 | |||
553 | /* skip invalid entries */ | 293 | /* skip invalid entries */ |
554 | if (!(txp->flags & IWL_EEPROM_ENH_TXP_FL_VALID)) | 294 | if (!(txp->flags & IWL_EEPROM_ENH_TXP_FL_VALID)) |
555 | continue; | 295 | continue; |
556 | 296 | ||
297 | IWL_DEBUG_EEPROM(priv, "%s %d:\t %s%s%s%s%s%s%s%s (0x%02x)\n", | ||
298 | (txp->channel && (txp->flags & | ||
299 | IWL_EEPROM_ENH_TXP_FL_COMMON_TYPE)) ? | ||
300 | "Common " : (txp->channel) ? | ||
301 | "Channel" : "Common", | ||
302 | (txp->channel), | ||
303 | TXP_CHECK_AND_PRINT(VALID), | ||
304 | TXP_CHECK_AND_PRINT(BAND_52G), | ||
305 | TXP_CHECK_AND_PRINT(OFDM), | ||
306 | TXP_CHECK_AND_PRINT(40MHZ), | ||
307 | TXP_CHECK_AND_PRINT(HT_AP), | ||
308 | TXP_CHECK_AND_PRINT(RES1), | ||
309 | TXP_CHECK_AND_PRINT(RES2), | ||
310 | TXP_CHECK_AND_PRINT(COMMON_TYPE), | ||
311 | txp->flags); | ||
312 | IWL_DEBUG_EEPROM(priv, "\t\t chain_A: 0x%02x " | ||
313 | "chain_B: 0X%02x chain_C: 0X%02x\n", | ||
314 | txp->chain_a_max, txp->chain_b_max, | ||
315 | txp->chain_c_max); | ||
316 | IWL_DEBUG_EEPROM(priv, "\t\t MIMO2: 0x%02x " | ||
317 | "MIMO3: 0x%02x High 20_on_40: 0x%02x " | ||
318 | "Low 20_on_40: 0x%02x\n", | ||
319 | txp->mimo2_max, txp->mimo3_max, | ||
320 | ((txp->delta_20_in_40 & 0xf0) >> 4), | ||
321 | (txp->delta_20_in_40 & 0x0f)); | ||
322 | |||
557 | max_txp_avg = iwl_get_max_txpower_avg(priv, txp_array, idx, | 323 | max_txp_avg = iwl_get_max_txpower_avg(priv, txp_array, idx, |
558 | &max_txp_avg_halfdbm); | 324 | &max_txp_avg_halfdbm); |
559 | 325 | ||
@@ -569,11 +335,3 @@ static void iwlcore_eeprom_enhanced_txpower_new(struct iwl_priv *priv) | |||
569 | iwlcore_eeprom_enh_txp_read_element(priv, txp, max_txp_avg); | 335 | iwlcore_eeprom_enh_txp_read_element(priv, txp, max_txp_avg); |
570 | } | 336 | } |
571 | } | 337 | } |
572 | |||
573 | void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv) | ||
574 | { | ||
575 | if (priv->cfg->use_new_eeprom_reading) | ||
576 | iwlcore_eeprom_enhanced_txpower_new(priv); | ||
577 | else | ||
578 | iwlcore_eeprom_enhanced_txpower_old(priv); | ||
579 | } | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c index 7c8010f7ce56..4bc82fcf1652 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c | |||
@@ -1845,6 +1845,7 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv) | |||
1845 | bt_cmd.flags |= IWLAGN_BT_FLAG_CHANNEL_INHIBITION; | 1845 | bt_cmd.flags |= IWLAGN_BT_FLAG_CHANNEL_INHIBITION; |
1846 | IWL_DEBUG_INFO(priv, "BT coex flag: 0X%x\n", bt_cmd.flags); | 1846 | IWL_DEBUG_INFO(priv, "BT coex flag: 0X%x\n", bt_cmd.flags); |
1847 | } | 1847 | } |
1848 | priv->bt_enable_flag = bt_cmd.flags; | ||
1848 | if (priv->bt_full_concurrent) | 1849 | if (priv->bt_full_concurrent) |
1849 | memcpy(bt_cmd.bt3_lookup_table, iwlagn_concurrent_lookup, | 1850 | memcpy(bt_cmd.bt3_lookup_table, iwlagn_concurrent_lookup, |
1850 | sizeof(iwlagn_concurrent_lookup)); | 1851 | sizeof(iwlagn_concurrent_lookup)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index f450adc72361..ee123482e1d5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
@@ -2873,6 +2873,8 @@ void iwl_rs_rate_init(struct iwl_priv *priv, struct ieee80211_sta *sta, u8 sta_i | |||
2873 | lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE; | 2873 | lq_sta->last_txrate_idx += IWL_FIRST_OFDM_RATE; |
2874 | lq_sta->is_agg = 0; | 2874 | lq_sta->is_agg = 0; |
2875 | 2875 | ||
2876 | lq_sta->dbg_fixed_rate = 0; | ||
2877 | |||
2876 | rs_initialize_lq(priv, conf, sta, lq_sta); | 2878 | rs_initialize_lq(priv, conf, sta, lq_sta); |
2877 | } | 2879 | } |
2878 | 2880 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c index 4865b82355d7..769479eb6ea9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rxon.c | |||
@@ -518,7 +518,14 @@ void iwlagn_bss_info_changed(struct ieee80211_hw *hw, | |||
518 | 518 | ||
519 | mutex_lock(&priv->mutex); | 519 | mutex_lock(&priv->mutex); |
520 | 520 | ||
521 | if (WARN_ON(!ctx->vif)) { | 521 | if (unlikely(!iwl_is_ready(priv))) { |
522 | IWL_DEBUG_MAC80211(priv, "leave - not ready\n"); | ||
523 | mutex_unlock(&priv->mutex); | ||
524 | return; | ||
525 | } | ||
526 | |||
527 | if (unlikely(!ctx->vif)) { | ||
528 | IWL_DEBUG_MAC80211(priv, "leave - vif is NULL\n"); | ||
522 | mutex_unlock(&priv->mutex); | 529 | mutex_unlock(&priv->mutex); |
523 | return; | 530 | return; |
524 | } | 531 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c index 72b1f262796c..24a11b8f73bc 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c | |||
@@ -1237,7 +1237,6 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv, | |||
1237 | int i, sh, ack; | 1237 | int i, sh, ack; |
1238 | u16 seq_ctl = le16_to_cpu(ba_resp->seq_ctl); | 1238 | u16 seq_ctl = le16_to_cpu(ba_resp->seq_ctl); |
1239 | u16 scd_flow = le16_to_cpu(ba_resp->scd_flow); | 1239 | u16 scd_flow = le16_to_cpu(ba_resp->scd_flow); |
1240 | u64 bitmap, sent_bitmap; | ||
1241 | int successes = 0; | 1240 | int successes = 0; |
1242 | struct ieee80211_tx_info *info; | 1241 | struct ieee80211_tx_info *info; |
1243 | 1242 | ||
@@ -1278,6 +1277,8 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv, | |||
1278 | IWL_DEBUG_HT(priv, "agg frames sent:%d, acked:%d\n", | 1277 | IWL_DEBUG_HT(priv, "agg frames sent:%d, acked:%d\n", |
1279 | ba_resp->txed, ba_resp->txed_2_done); | 1278 | ba_resp->txed, ba_resp->txed_2_done); |
1280 | } else { | 1279 | } else { |
1280 | u64 bitmap, sent_bitmap; | ||
1281 | |||
1281 | /* don't use 64-bit values for now */ | 1282 | /* don't use 64-bit values for now */ |
1282 | bitmap = le64_to_cpu(ba_resp->bitmap) >> sh; | 1283 | bitmap = le64_to_cpu(ba_resp->bitmap) >> sh; |
1283 | 1284 | ||
@@ -1298,7 +1299,11 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv, | |||
1298 | sent_bitmap >>= 1; | 1299 | sent_bitmap >>= 1; |
1299 | ++i; | 1300 | ++i; |
1300 | } | 1301 | } |
1302 | |||
1303 | IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", | ||
1304 | (unsigned long long)bitmap); | ||
1301 | } | 1305 | } |
1306 | |||
1302 | info = IEEE80211_SKB_CB(priv->txq[scd_flow].txb[agg->start_idx].skb); | 1307 | info = IEEE80211_SKB_CB(priv->txq[scd_flow].txb[agg->start_idx].skb); |
1303 | memset(&info->status, 0, sizeof(info->status)); | 1308 | memset(&info->status, 0, sizeof(info->status)); |
1304 | info->flags |= IEEE80211_TX_STAT_ACK; | 1309 | info->flags |= IEEE80211_TX_STAT_ACK; |
@@ -1313,8 +1318,6 @@ static int iwlagn_tx_status_reply_compressed_ba(struct iwl_priv *priv, | |||
1313 | } | 1318 | } |
1314 | iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info); | 1319 | iwlagn_hwrate_to_tx_control(priv, agg->rate_n_flags, info); |
1315 | 1320 | ||
1316 | IWL_DEBUG_TX_REPLY(priv, "Bitmap %llx\n", (unsigned long long)bitmap); | ||
1317 | |||
1318 | return 0; | 1321 | return 0; |
1319 | } | 1322 | } |
1320 | 1323 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index d62b92518417..efbde1f1a8bf 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -957,6 +957,22 @@ void iwl_irq_handle_error(struct iwl_priv *priv) | |||
957 | /* Cancel currently queued command. */ | 957 | /* Cancel currently queued command. */ |
958 | clear_bit(STATUS_HCMD_ACTIVE, &priv->status); | 958 | clear_bit(STATUS_HCMD_ACTIVE, &priv->status); |
959 | 959 | ||
960 | /* W/A for WiFi/WiMAX coex and WiMAX own the RF */ | ||
961 | if (priv->cfg->internal_wimax_coex && | ||
962 | (!(iwl_read_prph(priv, APMG_CLK_CTRL_REG) & | ||
963 | APMS_CLK_VAL_MRB_FUNC_MODE) || | ||
964 | (iwl_read_prph(priv, APMG_PS_CTRL_REG) & | ||
965 | APMG_PS_CTRL_VAL_RESET_REQ))) { | ||
966 | wake_up_interruptible(&priv->wait_command_queue); | ||
967 | /* | ||
968 | *Keep the restart process from trying to send host | ||
969 | * commands by clearing the INIT status bit | ||
970 | */ | ||
971 | clear_bit(STATUS_READY, &priv->status); | ||
972 | IWL_ERR(priv, "RF is used by WiMAX\n"); | ||
973 | return; | ||
974 | } | ||
975 | |||
960 | IWL_ERR(priv, "Loaded firmware version: %s\n", | 976 | IWL_ERR(priv, "Loaded firmware version: %s\n", |
961 | priv->hw->wiphy->fw_version); | 977 | priv->hw->wiphy->fw_version); |
962 | 978 | ||
@@ -1207,6 +1223,7 @@ void iwl_send_bt_config(struct iwl_priv *priv) | |||
1207 | else | 1223 | else |
1208 | bt_cmd.flags = BT_COEX_ENABLE; | 1224 | bt_cmd.flags = BT_COEX_ENABLE; |
1209 | 1225 | ||
1226 | priv->bt_enable_flag = bt_cmd.flags; | ||
1210 | IWL_DEBUG_INFO(priv, "BT coex %s\n", | 1227 | IWL_DEBUG_INFO(priv, "BT coex %s\n", |
1211 | (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); | 1228 | (bt_cmd.flags == BT_COEX_DISABLE) ? "disable" : "active"); |
1212 | 1229 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 9df33d6af8bb..f80685ad2674 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -364,6 +364,8 @@ struct iwl_ht_params { | |||
364 | * @scan_antennas: available antenna for scan operation | 364 | * @scan_antennas: available antenna for scan operation |
365 | * @led_mode: 0=blinking, 1=On(RF On)/Off(RF Off) | 365 | * @led_mode: 0=blinking, 1=On(RF On)/Off(RF Off) |
366 | * @adv_pm: advance power management | 366 | * @adv_pm: advance power management |
367 | * @rx_with_siso_diversity: 1x1 device with rx antenna diversity | ||
368 | * @internal_wimax_coex: internal wifi/wimax combo device | ||
367 | * | 369 | * |
368 | * We enable the driver to be backward compatible wrt API version. The | 370 | * We enable the driver to be backward compatible wrt API version. The |
369 | * driver specifies which APIs it supports (with @ucode_api_max being the | 371 | * driver specifies which APIs it supports (with @ucode_api_max being the |
@@ -412,7 +414,8 @@ struct iwl_cfg { | |||
412 | u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; | 414 | u8 scan_tx_antennas[IEEE80211_NUM_BANDS]; |
413 | enum iwl_led_mode led_mode; | 415 | enum iwl_led_mode led_mode; |
414 | const bool adv_pm; | 416 | const bool adv_pm; |
415 | const bool use_new_eeprom_reading; /* temporary, remove later */ | 417 | const bool rx_with_siso_diversity; |
418 | const bool internal_wimax_coex; | ||
416 | }; | 419 | }; |
417 | 420 | ||
418 | /*************************** | 421 | /*************************** |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.h b/drivers/net/wireless/iwlwifi/iwl-debug.h index 0b961a353ff6..ebdea3be3ef9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.h +++ b/drivers/net/wireless/iwlwifi/iwl-debug.h | |||
@@ -120,6 +120,7 @@ static inline void iwl_dbgfs_unregister(struct iwl_priv *priv) | |||
120 | /* 0x000000F0 - 0x00000010 */ | 120 | /* 0x000000F0 - 0x00000010 */ |
121 | #define IWL_DL_MACDUMP (1 << 4) | 121 | #define IWL_DL_MACDUMP (1 << 4) |
122 | #define IWL_DL_HCMD_DUMP (1 << 5) | 122 | #define IWL_DL_HCMD_DUMP (1 << 5) |
123 | #define IWL_DL_EEPROM (1 << 6) | ||
123 | #define IWL_DL_RADIO (1 << 7) | 124 | #define IWL_DL_RADIO (1 << 7) |
124 | /* 0x00000F00 - 0x00000100 */ | 125 | /* 0x00000F00 - 0x00000100 */ |
125 | #define IWL_DL_POWER (1 << 8) | 126 | #define IWL_DL_POWER (1 << 8) |
@@ -164,6 +165,7 @@ static inline void iwl_dbgfs_unregister(struct iwl_priv *priv) | |||
164 | #define IWL_DEBUG_WEP(p, f, a...) IWL_DEBUG(p, IWL_DL_WEP, f, ## a) | 165 | #define IWL_DEBUG_WEP(p, f, a...) IWL_DEBUG(p, IWL_DL_WEP, f, ## a) |
165 | #define IWL_DEBUG_HC(p, f, a...) IWL_DEBUG(p, IWL_DL_HCMD, f, ## a) | 166 | #define IWL_DEBUG_HC(p, f, a...) IWL_DEBUG(p, IWL_DL_HCMD, f, ## a) |
166 | #define IWL_DEBUG_HC_DUMP(p, f, a...) IWL_DEBUG(p, IWL_DL_HCMD_DUMP, f, ## a) | 167 | #define IWL_DEBUG_HC_DUMP(p, f, a...) IWL_DEBUG(p, IWL_DL_HCMD_DUMP, f, ## a) |
168 | #define IWL_DEBUG_EEPROM(p, f, a...) IWL_DEBUG(p, IWL_DL_EEPROM, f, ## a) | ||
167 | #define IWL_DEBUG_CALIB(p, f, a...) IWL_DEBUG(p, IWL_DL_CALIB, f, ## a) | 169 | #define IWL_DEBUG_CALIB(p, f, a...) IWL_DEBUG(p, IWL_DL_CALIB, f, ## a) |
168 | #define IWL_DEBUG_FW(p, f, a...) IWL_DEBUG(p, IWL_DL_FW, f, ## a) | 170 | #define IWL_DEBUG_FW(p, f, a...) IWL_DEBUG(p, IWL_DL_FW, f, ## a) |
169 | #define IWL_DEBUG_RF_KILL(p, f, a...) IWL_DEBUG(p, IWL_DL_RF_KILL, f, ## a) | 171 | #define IWL_DEBUG_RF_KILL(p, f, a...) IWL_DEBUG(p, IWL_DL_RF_KILL, f, ## a) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index d36836376e6b..6fe80b5e7a15 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c | |||
@@ -1567,6 +1567,13 @@ static ssize_t iwl_dbgfs_bt_traffic_read(struct file *file, | |||
1567 | const size_t bufsz = sizeof(buf); | 1567 | const size_t bufsz = sizeof(buf); |
1568 | ssize_t ret; | 1568 | ssize_t ret; |
1569 | 1569 | ||
1570 | if (!priv->bt_enable_flag) { | ||
1571 | pos += scnprintf(buf + pos, bufsz - pos, "BT coex disabled\n"); | ||
1572 | ret = simple_read_from_buffer(user_buf, count, ppos, buf, pos); | ||
1573 | return ret; | ||
1574 | } | ||
1575 | pos += scnprintf(buf + pos, bufsz - pos, "BT enable flag: 0x%x\n", | ||
1576 | priv->bt_enable_flag); | ||
1570 | pos += scnprintf(buf + pos, bufsz - pos, "BT in %s mode\n", | 1577 | pos += scnprintf(buf + pos, bufsz - pos, "BT in %s mode\n", |
1571 | priv->bt_full_concurrent ? "full concurrency" : "3-wire"); | 1578 | priv->bt_full_concurrent ? "full concurrency" : "3-wire"); |
1572 | pos += scnprintf(buf + pos, bufsz - pos, "BT status: %s, " | 1579 | pos += scnprintf(buf + pos, bufsz - pos, "BT status: %s, " |
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 836f1816b110..8dda67850af4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1468,6 +1468,7 @@ struct iwl_priv { | |||
1468 | }; | 1468 | }; |
1469 | 1469 | ||
1470 | /* bt coex */ | 1470 | /* bt coex */ |
1471 | u8 bt_enable_flag; | ||
1471 | u8 bt_status; | 1472 | u8 bt_status; |
1472 | u8 bt_traffic_load, last_bt_traffic_load; | 1473 | u8 bt_traffic_load, last_bt_traffic_load; |
1473 | bool bt_ch_announce; | 1474 | bool bt_ch_announce; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index 87cd10ff285d..358cfd7e5af1 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -147,7 +147,7 @@ static int iwl_eeprom_verify_signature(struct iwl_priv *priv) | |||
147 | u32 gp = iwl_read32(priv, CSR_EEPROM_GP) & CSR_EEPROM_GP_VALID_MSK; | 147 | u32 gp = iwl_read32(priv, CSR_EEPROM_GP) & CSR_EEPROM_GP_VALID_MSK; |
148 | int ret = 0; | 148 | int ret = 0; |
149 | 149 | ||
150 | IWL_DEBUG_INFO(priv, "EEPROM signature=0x%08x\n", gp); | 150 | IWL_DEBUG_EEPROM(priv, "EEPROM signature=0x%08x\n", gp); |
151 | switch (gp) { | 151 | switch (gp) { |
152 | case CSR_EEPROM_GP_BAD_SIG_EEP_GOOD_SIG_OTP: | 152 | case CSR_EEPROM_GP_BAD_SIG_EEP_GOOD_SIG_OTP: |
153 | if (priv->nvm_device_type != NVM_DEVICE_TYPE_OTP) { | 153 | if (priv->nvm_device_type != NVM_DEVICE_TYPE_OTP) { |
@@ -354,7 +354,7 @@ static int iwl_find_otp_image(struct iwl_priv *priv, | |||
354 | */ | 354 | */ |
355 | valid_addr = next_link_addr; | 355 | valid_addr = next_link_addr; |
356 | next_link_addr = le16_to_cpu(link_value) * sizeof(u16); | 356 | next_link_addr = le16_to_cpu(link_value) * sizeof(u16); |
357 | IWL_DEBUG_INFO(priv, "OTP blocks %d addr 0x%x\n", | 357 | IWL_DEBUG_EEPROM(priv, "OTP blocks %d addr 0x%x\n", |
358 | usedblocks, next_link_addr); | 358 | usedblocks, next_link_addr); |
359 | if (iwl_read_otp_word(priv, next_link_addr, &link_value)) | 359 | if (iwl_read_otp_word(priv, next_link_addr, &link_value)) |
360 | return -EINVAL; | 360 | return -EINVAL; |
@@ -374,7 +374,7 @@ static int iwl_find_otp_image(struct iwl_priv *priv, | |||
374 | } while (usedblocks <= priv->cfg->base_params->max_ll_items); | 374 | } while (usedblocks <= priv->cfg->base_params->max_ll_items); |
375 | 375 | ||
376 | /* OTP has no valid blocks */ | 376 | /* OTP has no valid blocks */ |
377 | IWL_DEBUG_INFO(priv, "OTP has no valid blocks\n"); | 377 | IWL_DEBUG_EEPROM(priv, "OTP has no valid blocks\n"); |
378 | return -EINVAL; | 378 | return -EINVAL; |
379 | } | 379 | } |
380 | 380 | ||
@@ -414,7 +414,7 @@ int iwl_eeprom_init(struct iwl_priv *priv) | |||
414 | return -ENOENT; | 414 | return -ENOENT; |
415 | /* allocate eeprom */ | 415 | /* allocate eeprom */ |
416 | sz = priv->cfg->base_params->eeprom_size; | 416 | sz = priv->cfg->base_params->eeprom_size; |
417 | IWL_DEBUG_INFO(priv, "NVM size = %d\n", sz); | 417 | IWL_DEBUG_EEPROM(priv, "NVM size = %d\n", sz); |
418 | priv->eeprom = kzalloc(sz, GFP_KERNEL); | 418 | priv->eeprom = kzalloc(sz, GFP_KERNEL); |
419 | if (!priv->eeprom) { | 419 | if (!priv->eeprom) { |
420 | ret = -ENOMEM; | 420 | ret = -ENOMEM; |
@@ -492,7 +492,7 @@ int iwl_eeprom_init(struct iwl_priv *priv) | |||
492 | } | 492 | } |
493 | } | 493 | } |
494 | 494 | ||
495 | IWL_DEBUG_INFO(priv, "NVM Type: %s, version: 0x%x\n", | 495 | IWL_DEBUG_EEPROM(priv, "NVM Type: %s, version: 0x%x\n", |
496 | (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP) | 496 | (priv->nvm_device_type == NVM_DEVICE_TYPE_OTP) |
497 | ? "OTP" : "EEPROM", | 497 | ? "OTP" : "EEPROM", |
498 | iwl_eeprom_query16(priv, EEPROM_VERSION)); | 498 | iwl_eeprom_query16(priv, EEPROM_VERSION)); |
@@ -594,7 +594,7 @@ static int iwl_mod_ht40_chan_info(struct iwl_priv *priv, | |||
594 | if (!is_channel_valid(ch_info)) | 594 | if (!is_channel_valid(ch_info)) |
595 | return -1; | 595 | return -1; |
596 | 596 | ||
597 | IWL_DEBUG_INFO(priv, "HT40 Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm):" | 597 | IWL_DEBUG_EEPROM(priv, "HT40 Ch. %d [%sGHz] %s%s%s%s%s(0x%02x %ddBm):" |
598 | " Ad-Hoc %ssupported\n", | 598 | " Ad-Hoc %ssupported\n", |
599 | ch_info->channel, | 599 | ch_info->channel, |
600 | is_channel_a_band(ch_info) ? | 600 | is_channel_a_band(ch_info) ? |
@@ -634,11 +634,11 @@ int iwl_init_channel_map(struct iwl_priv *priv) | |||
634 | struct iwl_channel_info *ch_info; | 634 | struct iwl_channel_info *ch_info; |
635 | 635 | ||
636 | if (priv->channel_count) { | 636 | if (priv->channel_count) { |
637 | IWL_DEBUG_INFO(priv, "Channel map already initialized.\n"); | 637 | IWL_DEBUG_EEPROM(priv, "Channel map already initialized.\n"); |
638 | return 0; | 638 | return 0; |
639 | } | 639 | } |
640 | 640 | ||
641 | IWL_DEBUG_INFO(priv, "Initializing regulatory info from EEPROM\n"); | 641 | IWL_DEBUG_EEPROM(priv, "Initializing regulatory info from EEPROM\n"); |
642 | 642 | ||
643 | priv->channel_count = | 643 | priv->channel_count = |
644 | ARRAY_SIZE(iwl_eeprom_band_1) + | 644 | ARRAY_SIZE(iwl_eeprom_band_1) + |
@@ -647,7 +647,8 @@ int iwl_init_channel_map(struct iwl_priv *priv) | |||
647 | ARRAY_SIZE(iwl_eeprom_band_4) + | 647 | ARRAY_SIZE(iwl_eeprom_band_4) + |
648 | ARRAY_SIZE(iwl_eeprom_band_5); | 648 | ARRAY_SIZE(iwl_eeprom_band_5); |
649 | 649 | ||
650 | IWL_DEBUG_INFO(priv, "Parsing data for %d channels.\n", priv->channel_count); | 650 | IWL_DEBUG_EEPROM(priv, "Parsing data for %d channels.\n", |
651 | priv->channel_count); | ||
651 | 652 | ||
652 | priv->channel_info = kzalloc(sizeof(struct iwl_channel_info) * | 653 | priv->channel_info = kzalloc(sizeof(struct iwl_channel_info) * |
653 | priv->channel_count, GFP_KERNEL); | 654 | priv->channel_count, GFP_KERNEL); |
@@ -686,7 +687,8 @@ int iwl_init_channel_map(struct iwl_priv *priv) | |||
686 | IEEE80211_CHAN_NO_HT40; | 687 | IEEE80211_CHAN_NO_HT40; |
687 | 688 | ||
688 | if (!(is_channel_valid(ch_info))) { | 689 | if (!(is_channel_valid(ch_info))) { |
689 | IWL_DEBUG_INFO(priv, "Ch. %d Flags %x [%sGHz] - " | 690 | IWL_DEBUG_EEPROM(priv, |
691 | "Ch. %d Flags %x [%sGHz] - " | ||
690 | "No traffic\n", | 692 | "No traffic\n", |
691 | ch_info->channel, | 693 | ch_info->channel, |
692 | ch_info->flags, | 694 | ch_info->flags, |
@@ -702,7 +704,8 @@ int iwl_init_channel_map(struct iwl_priv *priv) | |||
702 | ch_info->scan_power = eeprom_ch_info[ch].max_power_avg; | 704 | ch_info->scan_power = eeprom_ch_info[ch].max_power_avg; |
703 | ch_info->min_power = 0; | 705 | ch_info->min_power = 0; |
704 | 706 | ||
705 | IWL_DEBUG_INFO(priv, "Ch. %d [%sGHz] %s%s%s%s%s%s(0x%02x %ddBm):" | 707 | IWL_DEBUG_EEPROM(priv, "Ch. %d [%sGHz] " |
708 | "%s%s%s%s%s%s(0x%02x %ddBm):" | ||
706 | " Ad-Hoc %ssupported\n", | 709 | " Ad-Hoc %ssupported\n", |
707 | ch_info->channel, | 710 | ch_info->channel, |
708 | is_channel_a_band(ch_info) ? | 711 | is_channel_a_band(ch_info) ? |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h index 8994b5b23593..9e6f31355eee 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h | |||
@@ -231,59 +231,6 @@ struct iwl_eeprom_enhanced_txpwr { | |||
231 | #define EEPROM_6000_REG_BAND_24_HT40_CHANNELS ((0x80)\ | 231 | #define EEPROM_6000_REG_BAND_24_HT40_CHANNELS ((0x80)\ |
232 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 14 bytes */ | 232 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 14 bytes */ |
233 | 233 | ||
234 | /* 6000 and up regulatory tx power - indirect access */ | ||
235 | /* max. elements per section */ | ||
236 | #define EEPROM_MAX_TXPOWER_SECTION_ELEMENTS (8) | ||
237 | #define EEPROM_TXPOWER_COMMON_HT40_INDEX (2) | ||
238 | |||
239 | /** | ||
240 | * Partition the enhanced tx power portion of eeprom image into | ||
241 | * 10 sections based on band, modulation, frequency and channel | ||
242 | * | ||
243 | * Section 1: all CCK channels | ||
244 | * Section 2: all 2.4 GHz OFDM (Legacy, HT and HT40 ) channels | ||
245 | * Section 3: all 5.2 GHz OFDM (Legacy, HT and HT40) channels | ||
246 | * Section 4: 2.4 GHz 20MHz channels: 1, 2, 10, 11. Both Legacy and HT | ||
247 | * Section 5: 2.4 GHz 40MHz channels: 1, 2, 6, 7, 9, (_above_) | ||
248 | * Section 6: 5.2 GHz 20MHz channels: 36, 64, 100, both Legacy and HT | ||
249 | * Section 7: 5.2 GHz 40MHz channels: 36, 60, 100 (_above_) | ||
250 | * Section 8: 2.4 GHz channel 13, Both Legacy and HT | ||
251 | * Section 9: 2.4 GHz channel 140, Both Legacy and HT | ||
252 | * Section 10: 2.4 GHz 40MHz channels: 132, 44 (_above_) | ||
253 | */ | ||
254 | /* 2.4 GHz band: CCK */ | ||
255 | #define EEPROM_LB_CCK_20_COMMON ((0xA8)\ | ||
256 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 8 bytes */ | ||
257 | /* 2.4 GHz band: 20MHz-Legacy, 20MHz-HT, 40MHz-HT */ | ||
258 | #define EEPROM_LB_OFDM_COMMON ((0xB0)\ | ||
259 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 24 bytes */ | ||
260 | /* 5.2 GHz band: 20MHz-Legacy, 20MHz-HT, 40MHz-HT */ | ||
261 | #define EEPROM_HB_OFDM_COMMON ((0xC8)\ | ||
262 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 24 bytes */ | ||
263 | /* 2.4GHz band channels: | ||
264 | * 1Legacy, 1HT, 2Legacy, 2HT, 10Legacy, 10HT, 11Legacy, 11HT */ | ||
265 | #define EEPROM_LB_OFDM_20_BAND ((0xE0)\ | ||
266 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 64 bytes */ | ||
267 | /* 2.4 GHz band HT40 channels: (1,+1) (2,+1) (6,+1) (7,+1) (9,+1) */ | ||
268 | #define EEPROM_LB_OFDM_HT40_BAND ((0x120)\ | ||
269 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 40 bytes */ | ||
270 | /* 5.2GHz band channels: 36Legacy, 36HT, 64Legacy, 64HT, 100Legacy, 100HT */ | ||
271 | #define EEPROM_HB_OFDM_20_BAND ((0x148)\ | ||
272 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 48 bytes */ | ||
273 | /* 5.2 GHz band HT40 channels: (36,+1) (60,+1) (100,+1) */ | ||
274 | #define EEPROM_HB_OFDM_HT40_BAND ((0x178)\ | ||
275 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 24 bytes */ | ||
276 | /* 2.4 GHz band, channnel 13: Legacy, HT */ | ||
277 | #define EEPROM_LB_OFDM_20_CHANNEL_13 ((0x190)\ | ||
278 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 16 bytes */ | ||
279 | /* 5.2 GHz band, channnel 140: Legacy, HT */ | ||
280 | #define EEPROM_HB_OFDM_20_CHANNEL_140 ((0x1A0)\ | ||
281 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 16 bytes */ | ||
282 | /* 5.2 GHz band, HT40 channnels (132,+1) (44,+1) */ | ||
283 | #define EEPROM_HB_OFDM_HT40_BAND_1 ((0x1B0)\ | ||
284 | | INDIRECT_ADDRESS | INDIRECT_REGULATORY) /* 16 bytes */ | ||
285 | |||
286 | |||
287 | /* 5050 Specific */ | 234 | /* 5050 Specific */ |
288 | #define EEPROM_5050_TX_POWER_VERSION (4) | 235 | #define EEPROM_5050_TX_POWER_VERSION (4) |
289 | #define EEPROM_5050_EEPROM_VERSION (0x21E) | 236 | #define EEPROM_5050_EEPROM_VERSION (0x21E) |
diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h index 5469655646ae..86f5123bccda 100644 --- a/drivers/net/wireless/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/iwlwifi/iwl-prph.h | |||
@@ -83,10 +83,10 @@ | |||
83 | #define APMG_DIGITAL_SVR_REG (APMG_BASE + 0x0058) | 83 | #define APMG_DIGITAL_SVR_REG (APMG_BASE + 0x0058) |
84 | #define APMG_ANALOG_SVR_REG (APMG_BASE + 0x006C) | 84 | #define APMG_ANALOG_SVR_REG (APMG_BASE + 0x006C) |
85 | 85 | ||
86 | #define APMS_CLK_VAL_MRB_FUNC_MODE (0x00000001) | ||
86 | #define APMG_CLK_VAL_DMA_CLK_RQT (0x00000200) | 87 | #define APMG_CLK_VAL_DMA_CLK_RQT (0x00000200) |
87 | #define APMG_CLK_VAL_BSM_CLK_RQT (0x00000800) | 88 | #define APMG_CLK_VAL_BSM_CLK_RQT (0x00000800) |
88 | 89 | ||
89 | |||
90 | #define APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS (0x00400000) | 90 | #define APMG_PS_CTRL_EARLY_PWR_OFF_RESET_DIS (0x00400000) |
91 | #define APMG_PS_CTRL_VAL_RESET_REQ (0x04000000) | 91 | #define APMG_PS_CTRL_VAL_RESET_REQ (0x04000000) |
92 | #define APMG_PS_CTRL_MSK_PWR_SRC (0x03000000) | 92 | #define APMG_PS_CTRL_MSK_PWR_SRC (0x03000000) |