aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-6000.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-6000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c62
1 files changed, 43 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 6261aec5ebdc..11e6532fc573 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -192,8 +192,7 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
192 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant; 192 priv->hw_params.valid_tx_ant = priv->cfg->valid_tx_ant;
193 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant; 193 priv->hw_params.valid_rx_ant = priv->cfg->valid_rx_ant;
194 194
195 if (priv->cfg->ops->lib->temp_ops.set_ct_kill) 195 iwl6000_set_ct_threshold(priv);
196 priv->cfg->ops->lib->temp_ops.set_ct_kill(priv);
197 196
198 /* Set initial sensitivity parameters */ 197 /* Set initial sensitivity parameters */
199 /* Set initial calibration set */ 198 /* Set initial calibration set */
@@ -205,6 +204,8 @@ static int iwl6000_hw_set_hw_params(struct iwl_priv *priv)
205 BIT(IWL_CALIB_BASE_BAND); 204 BIT(IWL_CALIB_BASE_BAND);
206 if (priv->cfg->need_dc_calib) 205 if (priv->cfg->need_dc_calib)
207 priv->hw_params.calib_rt_cfg |= BIT(IWL_CALIB_CFG_DC_IDX); 206 priv->hw_params.calib_rt_cfg |= BIT(IWL_CALIB_CFG_DC_IDX);
207 if (priv->cfg->need_temp_offset_calib)
208 priv->hw_params.calib_init_cfg |= BIT(IWL_CALIB_TEMP_OFFSET);
208 209
209 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS; 210 priv->hw_params.beacon_time_tsf_bits = IWLAGN_EXT_BEACON_TIME_POS;
210 211
@@ -309,9 +310,7 @@ static struct iwl_lib_ops iwl6000_lib = {
309 .set_channel_switch = iwl6000_hw_channel_switch, 310 .set_channel_switch = iwl6000_hw_channel_switch,
310 .apm_ops = { 311 .apm_ops = {
311 .init = iwl_apm_init, 312 .init = iwl_apm_init,
312 .stop = iwl_apm_stop,
313 .config = iwl6000_nic_config, 313 .config = iwl6000_nic_config,
314 .set_pwr_src = iwl_set_pwr_src,
315 }, 314 },
316 .eeprom_ops = { 315 .eeprom_ops = {
317 .regulatory_bands = { 316 .regulatory_bands = {
@@ -323,7 +322,6 @@ static struct iwl_lib_ops iwl6000_lib = {
323 EEPROM_6000_REG_BAND_24_HT40_CHANNELS, 322 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
324 EEPROM_REG_BAND_52_HT40_CHANNELS 323 EEPROM_REG_BAND_52_HT40_CHANNELS
325 }, 324 },
326 .verify_signature = iwlcore_eeprom_verify_signature,
327 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, 325 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
328 .release_semaphore = iwlcore_eeprom_release_semaphore, 326 .release_semaphore = iwlcore_eeprom_release_semaphore,
329 .calib_version = iwlagn_eeprom_calib_version, 327 .calib_version = iwlagn_eeprom_calib_version,
@@ -335,7 +333,6 @@ static struct iwl_lib_ops iwl6000_lib = {
335 .config_ap = iwl_config_ap, 333 .config_ap = iwl_config_ap,
336 .temp_ops = { 334 .temp_ops = {
337 .temperature = iwlagn_temperature, 335 .temperature = iwlagn_temperature,
338 .set_ct_kill = iwl6000_set_ct_threshold,
339 }, 336 },
340 .manage_ibss_station = iwlagn_manage_ibss_station, 337 .manage_ibss_station = iwlagn_manage_ibss_station,
341 .update_bcast_stations = iwl_update_bcast_stations, 338 .update_bcast_stations = iwl_update_bcast_stations,
@@ -384,9 +381,7 @@ static struct iwl_lib_ops iwl6000g2b_lib = {
384 .set_channel_switch = iwl6000_hw_channel_switch, 381 .set_channel_switch = iwl6000_hw_channel_switch,
385 .apm_ops = { 382 .apm_ops = {
386 .init = iwl_apm_init, 383 .init = iwl_apm_init,
387 .stop = iwl_apm_stop,
388 .config = iwl6000_nic_config, 384 .config = iwl6000_nic_config,
389 .set_pwr_src = iwl_set_pwr_src,
390 }, 385 },
391 .eeprom_ops = { 386 .eeprom_ops = {
392 .regulatory_bands = { 387 .regulatory_bands = {
@@ -398,7 +393,6 @@ static struct iwl_lib_ops iwl6000g2b_lib = {
398 EEPROM_6000_REG_BAND_24_HT40_CHANNELS, 393 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
399 EEPROM_REG_BAND_52_HT40_CHANNELS 394 EEPROM_REG_BAND_52_HT40_CHANNELS
400 }, 395 },
401 .verify_signature = iwlcore_eeprom_verify_signature,
402 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore, 396 .acquire_semaphore = iwlcore_eeprom_acquire_semaphore,
403 .release_semaphore = iwlcore_eeprom_release_semaphore, 397 .release_semaphore = iwlcore_eeprom_release_semaphore,
404 .calib_version = iwlagn_eeprom_calib_version, 398 .calib_version = iwlagn_eeprom_calib_version,
@@ -410,7 +404,6 @@ static struct iwl_lib_ops iwl6000g2b_lib = {
410 .config_ap = iwl_config_ap, 404 .config_ap = iwl_config_ap,
411 .temp_ops = { 405 .temp_ops = {
412 .temperature = iwlagn_temperature, 406 .temperature = iwlagn_temperature,
413 .set_ct_kill = iwl6000_set_ct_threshold,
414 }, 407 },
415 .manage_ibss_station = iwlagn_manage_ibss_station, 408 .manage_ibss_station = iwlagn_manage_ibss_station,
416 .update_bcast_stations = iwl_update_bcast_stations, 409 .update_bcast_stations = iwl_update_bcast_stations,
@@ -516,6 +509,28 @@ static struct iwl_base_params iwl6050_base_params = {
516 .sensitivity_calib_by_driver = true, 509 .sensitivity_calib_by_driver = true,
517 .chain_noise_calib_by_driver = true, 510 .chain_noise_calib_by_driver = true,
518}; 511};
512static struct iwl_base_params iwl6000_coex_base_params = {
513 .eeprom_size = OTP_LOW_IMAGE_SIZE,
514 .num_of_queues = IWLAGN_NUM_QUEUES,
515 .num_of_ampdu_queues = IWLAGN_NUM_AMPDU_QUEUES,
516 .pll_cfg_val = 0,
517 .set_l0s = true,
518 .use_bsm = false,
519 .max_ll_items = OTP_MAX_LL_ITEMS_6x00,
520 .shadow_ram_support = true,
521 .led_compensation = 51,
522 .chain_noise_num_beacons = IWL_CAL_NUM_BEACONS,
523 .supports_idle = true,
524 .adv_thermal_throttle = true,
525 .support_ct_kill_exit = true,
526 .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF,
527 .chain_noise_scale = 1000,
528 .monitor_recover_period = IWL_LONG_MONITORING_PERIOD,
529 .max_event_log_size = 512,
530 .ucode_tracing = true,
531 .sensitivity_calib_by_driver = true,
532 .chain_noise_calib_by_driver = true,
533};
519 534
520static struct iwl_ht_params iwl6000_ht_params = { 535static struct iwl_ht_params iwl6000_ht_params = {
521 .ht_greenfield_support = true, 536 .ht_greenfield_support = true,
@@ -545,6 +560,7 @@ struct iwl_cfg iwl6000g2a_2agn_cfg = {
545 .base_params = &iwl6000_base_params, 560 .base_params = &iwl6000_base_params,
546 .ht_params = &iwl6000_ht_params, 561 .ht_params = &iwl6000_ht_params,
547 .need_dc_calib = true, 562 .need_dc_calib = true,
563 .need_temp_offset_calib = true,
548}; 564};
549 565
550struct iwl_cfg iwl6000g2a_2abg_cfg = { 566struct iwl_cfg iwl6000g2a_2abg_cfg = {
@@ -561,6 +577,7 @@ struct iwl_cfg iwl6000g2a_2abg_cfg = {
561 .mod_params = &iwlagn_mod_params, 577 .mod_params = &iwlagn_mod_params,
562 .base_params = &iwl6000_base_params, 578 .base_params = &iwl6000_base_params,
563 .need_dc_calib = true, 579 .need_dc_calib = true,
580 .need_temp_offset_calib = true,
564}; 581};
565 582
566struct iwl_cfg iwl6000g2a_2bg_cfg = { 583struct iwl_cfg iwl6000g2a_2bg_cfg = {
@@ -577,6 +594,7 @@ struct iwl_cfg iwl6000g2a_2bg_cfg = {
577 .mod_params = &iwlagn_mod_params, 594 .mod_params = &iwlagn_mod_params,
578 .base_params = &iwl6000_base_params, 595 .base_params = &iwl6000_base_params,
579 .need_dc_calib = true, 596 .need_dc_calib = true,
597 .need_temp_offset_calib = true,
580}; 598};
581 599
582struct iwl_cfg iwl6000g2b_2agn_cfg = { 600struct iwl_cfg iwl6000g2b_2agn_cfg = {
@@ -591,10 +609,11 @@ struct iwl_cfg iwl6000g2b_2agn_cfg = {
591 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, 609 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
592 .ops = &iwl6000g2b_ops, 610 .ops = &iwl6000g2b_ops,
593 .mod_params = &iwlagn_mod_params, 611 .mod_params = &iwlagn_mod_params,
594 .base_params = &iwl6000_base_params, 612 .base_params = &iwl6000_coex_base_params,
595 .bt_params = &iwl6000_bt_params, 613 .bt_params = &iwl6000_bt_params,
596 .ht_params = &iwl6000_ht_params, 614 .ht_params = &iwl6000_ht_params,
597 .need_dc_calib = true, 615 .need_dc_calib = true,
616 .need_temp_offset_calib = true,
598 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 617 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
599 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 618 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
600}; 619};
@@ -611,9 +630,10 @@ struct iwl_cfg iwl6000g2b_2abg_cfg = {
611 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, 630 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
612 .ops = &iwl6000g2b_ops, 631 .ops = &iwl6000g2b_ops,
613 .mod_params = &iwlagn_mod_params, 632 .mod_params = &iwlagn_mod_params,
614 .base_params = &iwl6000_base_params, 633 .base_params = &iwl6000_coex_base_params,
615 .bt_params = &iwl6000_bt_params, 634 .bt_params = &iwl6000_bt_params,
616 .need_dc_calib = true, 635 .need_dc_calib = true,
636 .need_temp_offset_calib = true,
617 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 637 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
618 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 638 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
619}; 639};
@@ -630,10 +650,11 @@ struct iwl_cfg iwl6000g2b_2bgn_cfg = {
630 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, 650 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
631 .ops = &iwl6000g2b_ops, 651 .ops = &iwl6000g2b_ops,
632 .mod_params = &iwlagn_mod_params, 652 .mod_params = &iwlagn_mod_params,
633 .base_params = &iwl6000_base_params, 653 .base_params = &iwl6000_coex_base_params,
634 .bt_params = &iwl6000_bt_params, 654 .bt_params = &iwl6000_bt_params,
635 .ht_params = &iwl6000_ht_params, 655 .ht_params = &iwl6000_ht_params,
636 .need_dc_calib = true, 656 .need_dc_calib = true,
657 .need_temp_offset_calib = true,
637 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 658 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
638 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 659 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
639}; 660};
@@ -650,9 +671,10 @@ struct iwl_cfg iwl6000g2b_2bg_cfg = {
650 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, 671 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
651 .ops = &iwl6000g2b_ops, 672 .ops = &iwl6000g2b_ops,
652 .mod_params = &iwlagn_mod_params, 673 .mod_params = &iwlagn_mod_params,
653 .base_params = &iwl6000_base_params, 674 .base_params = &iwl6000_coex_base_params,
654 .bt_params = &iwl6000_bt_params, 675 .bt_params = &iwl6000_bt_params,
655 .need_dc_calib = true, 676 .need_dc_calib = true,
677 .need_temp_offset_calib = true,
656 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 678 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
657 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 679 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
658}; 680};
@@ -669,10 +691,11 @@ struct iwl_cfg iwl6000g2b_bgn_cfg = {
669 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, 691 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
670 .ops = &iwl6000g2b_ops, 692 .ops = &iwl6000g2b_ops,
671 .mod_params = &iwlagn_mod_params, 693 .mod_params = &iwlagn_mod_params,
672 .base_params = &iwl6000_base_params, 694 .base_params = &iwl6000_coex_base_params,
673 .bt_params = &iwl6000_bt_params, 695 .bt_params = &iwl6000_bt_params,
674 .ht_params = &iwl6000_ht_params, 696 .ht_params = &iwl6000_ht_params,
675 .need_dc_calib = true, 697 .need_dc_calib = true,
698 .need_temp_offset_calib = true,
676 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 699 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
677 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 700 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
678}; 701};
@@ -689,9 +712,10 @@ struct iwl_cfg iwl6000g2b_bg_cfg = {
689 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, 712 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
690 .ops = &iwl6000g2b_ops, 713 .ops = &iwl6000g2b_ops,
691 .mod_params = &iwlagn_mod_params, 714 .mod_params = &iwlagn_mod_params,
692 .base_params = &iwl6000_base_params, 715 .base_params = &iwl6000_coex_base_params,
693 .bt_params = &iwl6000_bt_params, 716 .bt_params = &iwl6000_bt_params,
694 .need_dc_calib = true, 717 .need_dc_calib = true,
718 .need_temp_offset_calib = true,
695 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 719 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */
696 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A, 720 .scan_tx_antennas[IEEE80211_BAND_2GHZ] = ANT_A,
697}; 721};
@@ -756,7 +780,7 @@ struct iwl_cfg iwl6050_2agn_cfg = {
756 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N, 780 .sku = IWL_SKU_A|IWL_SKU_G|IWL_SKU_N,
757 .valid_tx_ant = ANT_AB, 781 .valid_tx_ant = ANT_AB,
758 .valid_rx_ant = ANT_AB, 782 .valid_rx_ant = ANT_AB,
759 .ops = &iwl6000_ops, 783 .ops = &iwl6050_ops,
760 .eeprom_ver = EEPROM_6050_EEPROM_VERSION, 784 .eeprom_ver = EEPROM_6050_EEPROM_VERSION,
761 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION, 785 .eeprom_calib_ver = EEPROM_6050_TX_POWER_VERSION,
762 .mod_params = &iwlagn_mod_params, 786 .mod_params = &iwlagn_mod_params,
@@ -827,7 +851,7 @@ struct iwl_cfg iwl130_bgn_cfg = {
827 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, 851 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
828 .ops = &iwl6000g2b_ops, 852 .ops = &iwl6000g2b_ops,
829 .mod_params = &iwlagn_mod_params, 853 .mod_params = &iwlagn_mod_params,
830 .base_params = &iwl6000_base_params, 854 .base_params = &iwl6000_coex_base_params,
831 .bt_params = &iwl6000_bt_params, 855 .bt_params = &iwl6000_bt_params,
832 .ht_params = &iwl6000_ht_params, 856 .ht_params = &iwl6000_ht_params,
833 .need_dc_calib = true, 857 .need_dc_calib = true,
@@ -847,7 +871,7 @@ struct iwl_cfg iwl130_bg_cfg = {
847 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION, 871 .eeprom_calib_ver = EEPROM_6000G2_TX_POWER_VERSION,
848 .ops = &iwl6000g2b_ops, 872 .ops = &iwl6000g2b_ops,
849 .mod_params = &iwlagn_mod_params, 873 .mod_params = &iwlagn_mod_params,
850 .base_params = &iwl6000_base_params, 874 .base_params = &iwl6000_coex_base_params,
851 .bt_params = &iwl6000_bt_params, 875 .bt_params = &iwl6000_bt_params,
852 .need_dc_calib = true, 876 .need_dc_calib = true,
853 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ 877 /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */