diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-06-04 06:56:01 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-06-04 07:02:42 -0400 |
commit | 51217cee3a94d5409d6ee2ac090ae96bc9a06757 (patch) | |
tree | 373c5ebf9e87ef81feb1d02feaf06f673fcf9a13 /drivers/net/wireless/iwlwifi/dvm | |
parent | ff40b425f04144771920b79672d6691910c7def7 (diff) | |
parent | 99e94940697adec4f84758adb2db71f4a82c7ba5 (diff) |
Merge remote-tracking branch 'wireless-next/master' into HEAD
Merge to get the wil6210 changes that a cfg80211 change needs.
A conflict in drivers/net/wireless/ath/ath9k/init.c was just
whitespace changes.
Also fix a semantic conflict due to cw1200 using WoWLAN which
I had modified in my tree.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/agn.h | 21 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/calib.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/commands.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/dev.h | 57 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/devices.c | 107 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/lib.c | 20 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/mac80211.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/main.c | 45 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/power.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/rs.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/rx.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/scan.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/sta.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/tt.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/tx.c | 12 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/ucode.c | 10 |
16 files changed, 240 insertions, 90 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/agn.h b/drivers/net/wireless/iwlwifi/dvm/agn.h index 48545ab00311..de2c9514bef6 100644 --- a/drivers/net/wireless/iwlwifi/dvm/agn.h +++ b/drivers/net/wireless/iwlwifi/dvm/agn.h | |||
@@ -76,13 +76,16 @@ | |||
76 | #define IWL_INVALID_STATION 255 | 76 | #define IWL_INVALID_STATION 255 |
77 | 77 | ||
78 | /* device operations */ | 78 | /* device operations */ |
79 | extern struct iwl_lib_ops iwl1000_lib; | 79 | extern const struct iwl_dvm_cfg iwl_dvm_1000_cfg; |
80 | extern struct iwl_lib_ops iwl2000_lib; | 80 | extern const struct iwl_dvm_cfg iwl_dvm_2000_cfg; |
81 | extern struct iwl_lib_ops iwl2030_lib; | 81 | extern const struct iwl_dvm_cfg iwl_dvm_105_cfg; |
82 | extern struct iwl_lib_ops iwl5000_lib; | 82 | extern const struct iwl_dvm_cfg iwl_dvm_2030_cfg; |
83 | extern struct iwl_lib_ops iwl5150_lib; | 83 | extern const struct iwl_dvm_cfg iwl_dvm_5000_cfg; |
84 | extern struct iwl_lib_ops iwl6000_lib; | 84 | extern const struct iwl_dvm_cfg iwl_dvm_5150_cfg; |
85 | extern struct iwl_lib_ops iwl6030_lib; | 85 | extern const struct iwl_dvm_cfg iwl_dvm_6000_cfg; |
86 | extern const struct iwl_dvm_cfg iwl_dvm_6005_cfg; | ||
87 | extern const struct iwl_dvm_cfg iwl_dvm_6050_cfg; | ||
88 | extern const struct iwl_dvm_cfg iwl_dvm_6030_cfg; | ||
86 | 89 | ||
87 | 90 | ||
88 | #define TIME_UNIT 1024 | 91 | #define TIME_UNIT 1024 |
@@ -291,8 +294,8 @@ void iwlagn_bt_adjust_rssi_monitor(struct iwl_priv *priv, bool rssi_ena); | |||
291 | 294 | ||
292 | static inline bool iwl_advanced_bt_coexist(struct iwl_priv *priv) | 295 | static inline bool iwl_advanced_bt_coexist(struct iwl_priv *priv) |
293 | { | 296 | { |
294 | return priv->cfg->bt_params && | 297 | return priv->lib->bt_params && |
295 | priv->cfg->bt_params->advanced_bt_coexist; | 298 | priv->lib->bt_params->advanced_bt_coexist; |
296 | } | 299 | } |
297 | 300 | ||
298 | #ifdef CONFIG_IWLWIFI_DEBUG | 301 | #ifdef CONFIG_IWLWIFI_DEBUG |
diff --git a/drivers/net/wireless/iwlwifi/dvm/calib.c b/drivers/net/wireless/iwlwifi/dvm/calib.c index d6c4cf2ad7c5..1b0f0d502568 100644 --- a/drivers/net/wireless/iwlwifi/dvm/calib.c +++ b/drivers/net/wireless/iwlwifi/dvm/calib.c | |||
@@ -521,7 +521,7 @@ static int iwl_enhance_sensitivity_write(struct iwl_priv *priv) | |||
521 | 521 | ||
522 | iwl_prepare_legacy_sensitivity_tbl(priv, data, &cmd.enhance_table[0]); | 522 | iwl_prepare_legacy_sensitivity_tbl(priv, data, &cmd.enhance_table[0]); |
523 | 523 | ||
524 | if (priv->cfg->base_params->hd_v2) { | 524 | if (priv->lib->hd_v2) { |
525 | cmd.enhance_table[HD_INA_NON_SQUARE_DET_OFDM_INDEX] = | 525 | cmd.enhance_table[HD_INA_NON_SQUARE_DET_OFDM_INDEX] = |
526 | HD_INA_NON_SQUARE_DET_OFDM_DATA_V2; | 526 | HD_INA_NON_SQUARE_DET_OFDM_DATA_V2; |
527 | cmd.enhance_table[HD_INA_NON_SQUARE_DET_CCK_INDEX] = | 527 | cmd.enhance_table[HD_INA_NON_SQUARE_DET_CCK_INDEX] = |
@@ -895,7 +895,7 @@ static void iwlagn_gain_computation(struct iwl_priv *priv, | |||
895 | continue; | 895 | continue; |
896 | } | 896 | } |
897 | 897 | ||
898 | delta_g = (priv->cfg->base_params->chain_noise_scale * | 898 | delta_g = (priv->lib->chain_noise_scale * |
899 | ((s32)average_noise[default_chain] - | 899 | ((s32)average_noise[default_chain] - |
900 | (s32)average_noise[i])) / 1500; | 900 | (s32)average_noise[i])) / 1500; |
901 | 901 | ||
@@ -1051,8 +1051,8 @@ void iwl_chain_noise_calibration(struct iwl_priv *priv) | |||
1051 | return; | 1051 | return; |
1052 | 1052 | ||
1053 | /* Analyze signal for disconnected antenna */ | 1053 | /* Analyze signal for disconnected antenna */ |
1054 | if (priv->cfg->bt_params && | 1054 | if (priv->lib->bt_params && |
1055 | priv->cfg->bt_params->advanced_bt_coexist) { | 1055 | priv->lib->bt_params->advanced_bt_coexist) { |
1056 | /* Disable disconnected antenna algorithm for advanced | 1056 | /* Disable disconnected antenna algorithm for advanced |
1057 | bt coex, assuming valid antennas are connected */ | 1057 | bt coex, assuming valid antennas are connected */ |
1058 | data->active_chains = priv->nvm_data->valid_rx_ant; | 1058 | data->active_chains = priv->nvm_data->valid_rx_ant; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/commands.h b/drivers/net/wireless/iwlwifi/dvm/commands.h index 174b0f169497..ebdac909f0cd 100644 --- a/drivers/net/wireless/iwlwifi/dvm/commands.h +++ b/drivers/net/wireless/iwlwifi/dvm/commands.h | |||
@@ -838,10 +838,6 @@ struct iwl_qosparam_cmd { | |||
838 | #define STA_MODIFY_DELBA_TID_MSK 0x10 | 838 | #define STA_MODIFY_DELBA_TID_MSK 0x10 |
839 | #define STA_MODIFY_SLEEP_TX_COUNT_MSK 0x20 | 839 | #define STA_MODIFY_SLEEP_TX_COUNT_MSK 0x20 |
840 | 840 | ||
841 | /* Receiver address (actually, Rx station's index into station table), | ||
842 | * combined with Traffic ID (QOS priority), in format used by Tx Scheduler */ | ||
843 | #define BUILD_RAxTID(sta_id, tid) (((sta_id) << 4) + (tid)) | ||
844 | |||
845 | /* agn */ | 841 | /* agn */ |
846 | struct iwl_keyinfo { | 842 | struct iwl_keyinfo { |
847 | __le16 key_flags; | 843 | __le16 key_flags; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/dev.h b/drivers/net/wireless/iwlwifi/dvm/dev.h index e71acfd344aa..5cd87f949266 100644 --- a/drivers/net/wireless/iwlwifi/dvm/dev.h +++ b/drivers/net/wireless/iwlwifi/dvm/dev.h | |||
@@ -568,16 +568,61 @@ struct iwl_hw_params { | |||
568 | const struct iwl_sensitivity_ranges *sens; | 568 | const struct iwl_sensitivity_ranges *sens; |
569 | }; | 569 | }; |
570 | 570 | ||
571 | struct iwl_lib_ops { | 571 | /** |
572 | /* set hw dependent parameters */ | 572 | * struct iwl_dvm_bt_params - DVM specific BT (coex) parameters |
573 | * @advanced_bt_coexist: support advanced bt coexist | ||
574 | * @bt_init_traffic_load: specify initial bt traffic load | ||
575 | * @bt_prio_boost: default bt priority boost value | ||
576 | * @agg_time_limit: maximum number of uSec in aggregation | ||
577 | * @bt_sco_disable: uCode should not response to BT in SCO/ESCO mode | ||
578 | */ | ||
579 | struct iwl_dvm_bt_params { | ||
580 | bool advanced_bt_coexist; | ||
581 | u8 bt_init_traffic_load; | ||
582 | u32 bt_prio_boost; | ||
583 | u16 agg_time_limit; | ||
584 | bool bt_sco_disable; | ||
585 | bool bt_session_2; | ||
586 | }; | ||
587 | |||
588 | /** | ||
589 | * struct iwl_dvm_cfg - DVM firmware specific device configuration | ||
590 | * @set_hw_params: set hardware parameters | ||
591 | * @set_channel_switch: send channel switch command | ||
592 | * @nic_config: apply device specific configuration | ||
593 | * @temperature: read temperature | ||
594 | * @adv_thermal_throttle: support advance thermal throttle | ||
595 | * @support_ct_kill_exit: support ct kill exit condition | ||
596 | * @plcp_delta_threshold: plcp error rate threshold used to trigger | ||
597 | * radio tuning when there is a high receiving plcp error rate | ||
598 | * @chain_noise_scale: default chain noise scale used for gain computation | ||
599 | * @hd_v2: v2 of enhanced sensitivity value, used for 2000 series and up | ||
600 | * @no_idle_support: do not support idle mode | ||
601 | * @bt_params: pointer to BT parameters | ||
602 | * @need_temp_offset_calib: need to perform temperature offset calibration | ||
603 | * @no_xtal_calib: some devices do not need crystal calibration data, | ||
604 | * don't send it to those | ||
605 | * @temp_offset_v2: support v2 of temperature offset calibration | ||
606 | * @adv_pm: advanced power management | ||
607 | */ | ||
608 | struct iwl_dvm_cfg { | ||
573 | void (*set_hw_params)(struct iwl_priv *priv); | 609 | void (*set_hw_params)(struct iwl_priv *priv); |
574 | int (*set_channel_switch)(struct iwl_priv *priv, | 610 | int (*set_channel_switch)(struct iwl_priv *priv, |
575 | struct ieee80211_channel_switch *ch_switch); | 611 | struct ieee80211_channel_switch *ch_switch); |
576 | /* device specific configuration */ | ||
577 | void (*nic_config)(struct iwl_priv *priv); | 612 | void (*nic_config)(struct iwl_priv *priv); |
578 | |||
579 | /* temperature */ | ||
580 | void (*temperature)(struct iwl_priv *priv); | 613 | void (*temperature)(struct iwl_priv *priv); |
614 | |||
615 | const struct iwl_dvm_bt_params *bt_params; | ||
616 | s32 chain_noise_scale; | ||
617 | u8 plcp_delta_threshold; | ||
618 | bool adv_thermal_throttle; | ||
619 | bool support_ct_kill_exit; | ||
620 | bool hd_v2; | ||
621 | bool no_idle_support; | ||
622 | bool need_temp_offset_calib; | ||
623 | bool no_xtal_calib; | ||
624 | bool temp_offset_v2; | ||
625 | bool adv_pm; | ||
581 | }; | 626 | }; |
582 | 627 | ||
583 | struct iwl_wipan_noa_data { | 628 | struct iwl_wipan_noa_data { |
@@ -610,7 +655,7 @@ struct iwl_priv { | |||
610 | struct device *dev; /* for debug prints only */ | 655 | struct device *dev; /* for debug prints only */ |
611 | const struct iwl_cfg *cfg; | 656 | const struct iwl_cfg *cfg; |
612 | const struct iwl_fw *fw; | 657 | const struct iwl_fw *fw; |
613 | const struct iwl_lib_ops *lib; | 658 | const struct iwl_dvm_cfg *lib; |
614 | unsigned long status; | 659 | unsigned long status; |
615 | 660 | ||
616 | spinlock_t sta_lock; | 661 | spinlock_t sta_lock; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/devices.c b/drivers/net/wireless/iwlwifi/dvm/devices.c index c48907c8ab43..352c6cb7b4f1 100644 --- a/drivers/net/wireless/iwlwifi/dvm/devices.c +++ b/drivers/net/wireless/iwlwifi/dvm/devices.c | |||
@@ -174,10 +174,13 @@ static void iwl1000_hw_set_hw_params(struct iwl_priv *priv) | |||
174 | priv->hw_params.sens = &iwl1000_sensitivity; | 174 | priv->hw_params.sens = &iwl1000_sensitivity; |
175 | } | 175 | } |
176 | 176 | ||
177 | struct iwl_lib_ops iwl1000_lib = { | 177 | const struct iwl_dvm_cfg iwl_dvm_1000_cfg = { |
178 | .set_hw_params = iwl1000_hw_set_hw_params, | 178 | .set_hw_params = iwl1000_hw_set_hw_params, |
179 | .nic_config = iwl1000_nic_config, | 179 | .nic_config = iwl1000_nic_config, |
180 | .temperature = iwlagn_temperature, | 180 | .temperature = iwlagn_temperature, |
181 | .support_ct_kill_exit = true, | ||
182 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_EXT_LONG_THRESHOLD_DEF, | ||
183 | .chain_noise_scale = 1000, | ||
181 | }; | 184 | }; |
182 | 185 | ||
183 | 186 | ||
@@ -232,16 +235,56 @@ static void iwl2000_hw_set_hw_params(struct iwl_priv *priv) | |||
232 | priv->hw_params.sens = &iwl2000_sensitivity; | 235 | priv->hw_params.sens = &iwl2000_sensitivity; |
233 | } | 236 | } |
234 | 237 | ||
235 | struct iwl_lib_ops iwl2000_lib = { | 238 | const struct iwl_dvm_cfg iwl_dvm_2000_cfg = { |
236 | .set_hw_params = iwl2000_hw_set_hw_params, | 239 | .set_hw_params = iwl2000_hw_set_hw_params, |
237 | .nic_config = iwl2000_nic_config, | 240 | .nic_config = iwl2000_nic_config, |
238 | .temperature = iwlagn_temperature, | 241 | .temperature = iwlagn_temperature, |
242 | .adv_thermal_throttle = true, | ||
243 | .support_ct_kill_exit = true, | ||
244 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
245 | .chain_noise_scale = 1000, | ||
246 | .hd_v2 = true, | ||
247 | .need_temp_offset_calib = true, | ||
248 | .temp_offset_v2 = true, | ||
239 | }; | 249 | }; |
240 | 250 | ||
241 | struct iwl_lib_ops iwl2030_lib = { | 251 | const struct iwl_dvm_cfg iwl_dvm_105_cfg = { |
242 | .set_hw_params = iwl2000_hw_set_hw_params, | 252 | .set_hw_params = iwl2000_hw_set_hw_params, |
243 | .nic_config = iwl2000_nic_config, | 253 | .nic_config = iwl2000_nic_config, |
244 | .temperature = iwlagn_temperature, | 254 | .temperature = iwlagn_temperature, |
255 | .adv_thermal_throttle = true, | ||
256 | .support_ct_kill_exit = true, | ||
257 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
258 | .chain_noise_scale = 1000, | ||
259 | .hd_v2 = true, | ||
260 | .need_temp_offset_calib = true, | ||
261 | .temp_offset_v2 = true, | ||
262 | .adv_pm = true, | ||
263 | }; | ||
264 | |||
265 | static const struct iwl_dvm_bt_params iwl2030_bt_params = { | ||
266 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
267 | .advanced_bt_coexist = true, | ||
268 | .agg_time_limit = BT_AGG_THRESHOLD_DEF, | ||
269 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
270 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT32, | ||
271 | .bt_sco_disable = true, | ||
272 | .bt_session_2 = true, | ||
273 | }; | ||
274 | |||
275 | const struct iwl_dvm_cfg iwl_dvm_2030_cfg = { | ||
276 | .set_hw_params = iwl2000_hw_set_hw_params, | ||
277 | .nic_config = iwl2000_nic_config, | ||
278 | .temperature = iwlagn_temperature, | ||
279 | .adv_thermal_throttle = true, | ||
280 | .support_ct_kill_exit = true, | ||
281 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
282 | .chain_noise_scale = 1000, | ||
283 | .hd_v2 = true, | ||
284 | .bt_params = &iwl2030_bt_params, | ||
285 | .need_temp_offset_calib = true, | ||
286 | .temp_offset_v2 = true, | ||
287 | .adv_pm = true, | ||
245 | }; | 288 | }; |
246 | 289 | ||
247 | /* | 290 | /* |
@@ -420,16 +463,23 @@ static int iwl5000_hw_channel_switch(struct iwl_priv *priv, | |||
420 | return iwl_dvm_send_cmd(priv, &hcmd); | 463 | return iwl_dvm_send_cmd(priv, &hcmd); |
421 | } | 464 | } |
422 | 465 | ||
423 | struct iwl_lib_ops iwl5000_lib = { | 466 | const struct iwl_dvm_cfg iwl_dvm_5000_cfg = { |
424 | .set_hw_params = iwl5000_hw_set_hw_params, | 467 | .set_hw_params = iwl5000_hw_set_hw_params, |
425 | .set_channel_switch = iwl5000_hw_channel_switch, | 468 | .set_channel_switch = iwl5000_hw_channel_switch, |
426 | .temperature = iwlagn_temperature, | 469 | .temperature = iwlagn_temperature, |
470 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | ||
471 | .chain_noise_scale = 1000, | ||
472 | .no_idle_support = true, | ||
427 | }; | 473 | }; |
428 | 474 | ||
429 | struct iwl_lib_ops iwl5150_lib = { | 475 | const struct iwl_dvm_cfg iwl_dvm_5150_cfg = { |
430 | .set_hw_params = iwl5150_hw_set_hw_params, | 476 | .set_hw_params = iwl5150_hw_set_hw_params, |
431 | .set_channel_switch = iwl5000_hw_channel_switch, | 477 | .set_channel_switch = iwl5000_hw_channel_switch, |
432 | .temperature = iwl5150_temperature, | 478 | .temperature = iwl5150_temperature, |
479 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_LONG_THRESHOLD_DEF, | ||
480 | .chain_noise_scale = 1000, | ||
481 | .no_idle_support = true, | ||
482 | .no_xtal_calib = true, | ||
433 | }; | 483 | }; |
434 | 484 | ||
435 | 485 | ||
@@ -584,16 +634,59 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv, | |||
584 | return err; | 634 | return err; |
585 | } | 635 | } |
586 | 636 | ||
587 | struct iwl_lib_ops iwl6000_lib = { | 637 | const struct iwl_dvm_cfg iwl_dvm_6000_cfg = { |
588 | .set_hw_params = iwl6000_hw_set_hw_params, | 638 | .set_hw_params = iwl6000_hw_set_hw_params, |
589 | .set_channel_switch = iwl6000_hw_channel_switch, | 639 | .set_channel_switch = iwl6000_hw_channel_switch, |
590 | .nic_config = iwl6000_nic_config, | 640 | .nic_config = iwl6000_nic_config, |
591 | .temperature = iwlagn_temperature, | 641 | .temperature = iwlagn_temperature, |
642 | .adv_thermal_throttle = true, | ||
643 | .support_ct_kill_exit = true, | ||
644 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
645 | .chain_noise_scale = 1000, | ||
646 | }; | ||
647 | |||
648 | const struct iwl_dvm_cfg iwl_dvm_6005_cfg = { | ||
649 | .set_hw_params = iwl6000_hw_set_hw_params, | ||
650 | .set_channel_switch = iwl6000_hw_channel_switch, | ||
651 | .nic_config = iwl6000_nic_config, | ||
652 | .temperature = iwlagn_temperature, | ||
653 | .adv_thermal_throttle = true, | ||
654 | .support_ct_kill_exit = true, | ||
655 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
656 | .chain_noise_scale = 1000, | ||
657 | .need_temp_offset_calib = true, | ||
658 | }; | ||
659 | |||
660 | const struct iwl_dvm_cfg iwl_dvm_6050_cfg = { | ||
661 | .set_hw_params = iwl6000_hw_set_hw_params, | ||
662 | .set_channel_switch = iwl6000_hw_channel_switch, | ||
663 | .nic_config = iwl6000_nic_config, | ||
664 | .temperature = iwlagn_temperature, | ||
665 | .adv_thermal_throttle = true, | ||
666 | .support_ct_kill_exit = true, | ||
667 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
668 | .chain_noise_scale = 1500, | ||
669 | }; | ||
670 | |||
671 | static const struct iwl_dvm_bt_params iwl6000_bt_params = { | ||
672 | /* Due to bluetooth, we transmit 2.4 GHz probes only on antenna A */ | ||
673 | .advanced_bt_coexist = true, | ||
674 | .agg_time_limit = BT_AGG_THRESHOLD_DEF, | ||
675 | .bt_init_traffic_load = IWL_BT_COEX_TRAFFIC_LOAD_NONE, | ||
676 | .bt_prio_boost = IWLAGN_BT_PRIO_BOOST_DEFAULT, | ||
677 | .bt_sco_disable = true, | ||
592 | }; | 678 | }; |
593 | 679 | ||
594 | struct iwl_lib_ops iwl6030_lib = { | 680 | const struct iwl_dvm_cfg iwl_dvm_6030_cfg = { |
595 | .set_hw_params = iwl6000_hw_set_hw_params, | 681 | .set_hw_params = iwl6000_hw_set_hw_params, |
596 | .set_channel_switch = iwl6000_hw_channel_switch, | 682 | .set_channel_switch = iwl6000_hw_channel_switch, |
597 | .nic_config = iwl6000_nic_config, | 683 | .nic_config = iwl6000_nic_config, |
598 | .temperature = iwlagn_temperature, | 684 | .temperature = iwlagn_temperature, |
685 | .adv_thermal_throttle = true, | ||
686 | .support_ct_kill_exit = true, | ||
687 | .plcp_delta_threshold = IWL_MAX_PLCP_ERR_THRESHOLD_DEF, | ||
688 | .chain_noise_scale = 1000, | ||
689 | .bt_params = &iwl6000_bt_params, | ||
690 | .need_temp_offset_calib = true, | ||
691 | .adv_pm = true, | ||
599 | }; | 692 | }; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/lib.c b/drivers/net/wireless/iwlwifi/dvm/lib.c index 54f553380aa8..9879550a0fea 100644 --- a/drivers/net/wireless/iwlwifi/dvm/lib.c +++ b/drivers/net/wireless/iwlwifi/dvm/lib.c | |||
@@ -254,23 +254,23 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv) | |||
254 | BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) != | 254 | BUILD_BUG_ON(sizeof(iwlagn_def_3w_lookup) != |
255 | sizeof(basic.bt3_lookup_table)); | 255 | sizeof(basic.bt3_lookup_table)); |
256 | 256 | ||
257 | if (priv->cfg->bt_params) { | 257 | if (priv->lib->bt_params) { |
258 | /* | 258 | /* |
259 | * newer generation of devices (2000 series and newer) | 259 | * newer generation of devices (2000 series and newer) |
260 | * use the version 2 of the bt command | 260 | * use the version 2 of the bt command |
261 | * we need to make sure sending the host command | 261 | * we need to make sure sending the host command |
262 | * with correct data structure to avoid uCode assert | 262 | * with correct data structure to avoid uCode assert |
263 | */ | 263 | */ |
264 | if (priv->cfg->bt_params->bt_session_2) { | 264 | if (priv->lib->bt_params->bt_session_2) { |
265 | bt_cmd_v2.prio_boost = cpu_to_le32( | 265 | bt_cmd_v2.prio_boost = cpu_to_le32( |
266 | priv->cfg->bt_params->bt_prio_boost); | 266 | priv->lib->bt_params->bt_prio_boost); |
267 | bt_cmd_v2.tx_prio_boost = 0; | 267 | bt_cmd_v2.tx_prio_boost = 0; |
268 | bt_cmd_v2.rx_prio_boost = 0; | 268 | bt_cmd_v2.rx_prio_boost = 0; |
269 | } else { | 269 | } else { |
270 | /* older version only has 8 bits */ | 270 | /* older version only has 8 bits */ |
271 | WARN_ON(priv->cfg->bt_params->bt_prio_boost & ~0xFF); | 271 | WARN_ON(priv->lib->bt_params->bt_prio_boost & ~0xFF); |
272 | bt_cmd_v1.prio_boost = | 272 | bt_cmd_v1.prio_boost = |
273 | priv->cfg->bt_params->bt_prio_boost; | 273 | priv->lib->bt_params->bt_prio_boost; |
274 | bt_cmd_v1.tx_prio_boost = 0; | 274 | bt_cmd_v1.tx_prio_boost = 0; |
275 | bt_cmd_v1.rx_prio_boost = 0; | 275 | bt_cmd_v1.rx_prio_boost = 0; |
276 | } | 276 | } |
@@ -330,7 +330,7 @@ void iwlagn_send_advance_bt_config(struct iwl_priv *priv) | |||
330 | priv->bt_full_concurrent ? | 330 | priv->bt_full_concurrent ? |
331 | "full concurrency" : "3-wire"); | 331 | "full concurrency" : "3-wire"); |
332 | 332 | ||
333 | if (priv->cfg->bt_params->bt_session_2) { | 333 | if (priv->lib->bt_params->bt_session_2) { |
334 | memcpy(&bt_cmd_v2.basic, &basic, | 334 | memcpy(&bt_cmd_v2.basic, &basic, |
335 | sizeof(basic)); | 335 | sizeof(basic)); |
336 | ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG, | 336 | ret = iwl_dvm_send_cmd_pdu(priv, REPLY_BT_CONFIG, |
@@ -758,8 +758,8 @@ static bool is_single_rx_stream(struct iwl_priv *priv) | |||
758 | */ | 758 | */ |
759 | static int iwl_get_active_rx_chain_count(struct iwl_priv *priv) | 759 | static int iwl_get_active_rx_chain_count(struct iwl_priv *priv) |
760 | { | 760 | { |
761 | if (priv->cfg->bt_params && | 761 | if (priv->lib->bt_params && |
762 | priv->cfg->bt_params->advanced_bt_coexist && | 762 | priv->lib->bt_params->advanced_bt_coexist && |
763 | (priv->bt_full_concurrent || | 763 | (priv->bt_full_concurrent || |
764 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { | 764 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { |
765 | /* | 765 | /* |
@@ -830,8 +830,8 @@ void iwlagn_set_rxon_chain(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
830 | else | 830 | else |
831 | active_chains = priv->nvm_data->valid_rx_ant; | 831 | active_chains = priv->nvm_data->valid_rx_ant; |
832 | 832 | ||
833 | if (priv->cfg->bt_params && | 833 | if (priv->lib->bt_params && |
834 | priv->cfg->bt_params->advanced_bt_coexist && | 834 | priv->lib->bt_params->advanced_bt_coexist && |
835 | (priv->bt_full_concurrent || | 835 | (priv->bt_full_concurrent || |
836 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { | 836 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH)) { |
837 | /* | 837 | /* |
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c index 661b5e71aac8..f10c755d952c 100644 --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c | |||
@@ -427,6 +427,10 @@ static int iwlagn_mac_suspend(struct ieee80211_hw *hw, | |||
427 | if (ret) | 427 | if (ret) |
428 | goto error; | 428 | goto error; |
429 | 429 | ||
430 | /* let the ucode operate on its own */ | ||
431 | iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_SET, | ||
432 | CSR_UCODE_DRV_GP1_BIT_D3_CFG_COMPLETE); | ||
433 | |||
430 | iwl_trans_d3_suspend(priv->trans); | 434 | iwl_trans_d3_suspend(priv->trans); |
431 | 435 | ||
432 | goto out; | 436 | goto out; |
@@ -510,6 +514,10 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw) | |||
510 | goto out_unlock; | 514 | goto out_unlock; |
511 | } | 515 | } |
512 | 516 | ||
517 | /* uCode is no longer operating by itself */ | ||
518 | iwl_write32(priv->trans, CSR_UCODE_DRV_GP1_CLR, | ||
519 | CSR_UCODE_DRV_GP1_BIT_D3_CFG_COMPLETE); | ||
520 | |||
513 | base = priv->device_pointers.error_event_table; | 521 | base = priv->device_pointers.error_event_table; |
514 | if (!iwlagn_hw_valid_rtc_data_addr(base)) { | 522 | if (!iwlagn_hw_valid_rtc_data_addr(base)) { |
515 | IWL_WARN(priv, "Invalid error table during resume!\n"); | 523 | IWL_WARN(priv, "Invalid error table during resume!\n"); |
@@ -1277,8 +1285,8 @@ static void iwlagn_mac_rssi_callback(struct ieee80211_hw *hw, | |||
1277 | IWL_DEBUG_MAC80211(priv, "enter\n"); | 1285 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
1278 | mutex_lock(&priv->mutex); | 1286 | mutex_lock(&priv->mutex); |
1279 | 1287 | ||
1280 | if (priv->cfg->bt_params && | 1288 | if (priv->lib->bt_params && |
1281 | priv->cfg->bt_params->advanced_bt_coexist) { | 1289 | priv->lib->bt_params->advanced_bt_coexist) { |
1282 | if (rssi_event == RSSI_EVENT_LOW) | 1290 | if (rssi_event == RSSI_EVENT_LOW) |
1283 | priv->bt_enable_pspoll = true; | 1291 | priv->bt_enable_pspoll = true; |
1284 | else if (rssi_event == RSSI_EVENT_HIGH) | 1292 | else if (rssi_event == RSSI_EVENT_HIGH) |
@@ -1388,7 +1396,7 @@ static int iwl_setup_interface(struct iwl_priv *priv, | |||
1388 | return err; | 1396 | return err; |
1389 | } | 1397 | } |
1390 | 1398 | ||
1391 | if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist && | 1399 | if (priv->lib->bt_params && priv->lib->bt_params->advanced_bt_coexist && |
1392 | vif->type == NL80211_IFTYPE_ADHOC) { | 1400 | vif->type == NL80211_IFTYPE_ADHOC) { |
1393 | /* | 1401 | /* |
1394 | * pretend to have high BT traffic as long as we | 1402 | * pretend to have high BT traffic as long as we |
diff --git a/drivers/net/wireless/iwlwifi/dvm/main.c b/drivers/net/wireless/iwlwifi/dvm/main.c index 74d7572e7091..68f754659570 100644 --- a/drivers/net/wireless/iwlwifi/dvm/main.c +++ b/drivers/net/wireless/iwlwifi/dvm/main.c | |||
@@ -615,7 +615,7 @@ static void iwl_rf_kill_ct_config(struct iwl_priv *priv) | |||
615 | 615 | ||
616 | priv->thermal_throttle.ct_kill_toggle = false; | 616 | priv->thermal_throttle.ct_kill_toggle = false; |
617 | 617 | ||
618 | if (priv->cfg->base_params->support_ct_kill_exit) { | 618 | if (priv->lib->support_ct_kill_exit) { |
619 | adv_cmd.critical_temperature_enter = | 619 | adv_cmd.critical_temperature_enter = |
620 | cpu_to_le32(priv->hw_params.ct_kill_threshold); | 620 | cpu_to_le32(priv->hw_params.ct_kill_threshold); |
621 | adv_cmd.critical_temperature_exit = | 621 | adv_cmd.critical_temperature_exit = |
@@ -732,10 +732,10 @@ int iwl_alive_start(struct iwl_priv *priv) | |||
732 | } | 732 | } |
733 | 733 | ||
734 | /* download priority table before any calibration request */ | 734 | /* download priority table before any calibration request */ |
735 | if (priv->cfg->bt_params && | 735 | if (priv->lib->bt_params && |
736 | priv->cfg->bt_params->advanced_bt_coexist) { | 736 | priv->lib->bt_params->advanced_bt_coexist) { |
737 | /* Configure Bluetooth device coexistence support */ | 737 | /* Configure Bluetooth device coexistence support */ |
738 | if (priv->cfg->bt_params->bt_sco_disable) | 738 | if (priv->lib->bt_params->bt_sco_disable) |
739 | priv->bt_enable_pspoll = false; | 739 | priv->bt_enable_pspoll = false; |
740 | else | 740 | else |
741 | priv->bt_enable_pspoll = true; | 741 | priv->bt_enable_pspoll = true; |
@@ -873,9 +873,9 @@ void iwl_down(struct iwl_priv *priv) | |||
873 | priv->bt_status = 0; | 873 | priv->bt_status = 0; |
874 | priv->cur_rssi_ctx = NULL; | 874 | priv->cur_rssi_ctx = NULL; |
875 | priv->bt_is_sco = 0; | 875 | priv->bt_is_sco = 0; |
876 | if (priv->cfg->bt_params) | 876 | if (priv->lib->bt_params) |
877 | priv->bt_traffic_load = | 877 | priv->bt_traffic_load = |
878 | priv->cfg->bt_params->bt_init_traffic_load; | 878 | priv->lib->bt_params->bt_init_traffic_load; |
879 | else | 879 | else |
880 | priv->bt_traffic_load = 0; | 880 | priv->bt_traffic_load = 0; |
881 | priv->bt_full_concurrent = false; | 881 | priv->bt_full_concurrent = false; |
@@ -1058,7 +1058,7 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) | |||
1058 | 1058 | ||
1059 | iwl_setup_scan_deferred_work(priv); | 1059 | iwl_setup_scan_deferred_work(priv); |
1060 | 1060 | ||
1061 | if (priv->cfg->bt_params) | 1061 | if (priv->lib->bt_params) |
1062 | iwlagn_bt_setup_deferred_work(priv); | 1062 | iwlagn_bt_setup_deferred_work(priv); |
1063 | 1063 | ||
1064 | init_timer(&priv->statistics_periodic); | 1064 | init_timer(&priv->statistics_periodic); |
@@ -1072,7 +1072,7 @@ static void iwl_setup_deferred_work(struct iwl_priv *priv) | |||
1072 | 1072 | ||
1073 | void iwl_cancel_deferred_work(struct iwl_priv *priv) | 1073 | void iwl_cancel_deferred_work(struct iwl_priv *priv) |
1074 | { | 1074 | { |
1075 | if (priv->cfg->bt_params) | 1075 | if (priv->lib->bt_params) |
1076 | iwlagn_bt_cancel_deferred_work(priv); | 1076 | iwlagn_bt_cancel_deferred_work(priv); |
1077 | 1077 | ||
1078 | cancel_work_sync(&priv->run_time_calib_work); | 1078 | cancel_work_sync(&priv->run_time_calib_work); |
@@ -1098,8 +1098,7 @@ static int iwl_init_drv(struct iwl_priv *priv) | |||
1098 | 1098 | ||
1099 | priv->band = IEEE80211_BAND_2GHZ; | 1099 | priv->band = IEEE80211_BAND_2GHZ; |
1100 | 1100 | ||
1101 | priv->plcp_delta_threshold = | 1101 | priv->plcp_delta_threshold = priv->lib->plcp_delta_threshold; |
1102 | priv->cfg->base_params->plcp_delta_threshold; | ||
1103 | 1102 | ||
1104 | priv->iw_mode = NL80211_IFTYPE_STATION; | 1103 | priv->iw_mode = NL80211_IFTYPE_STATION; |
1105 | priv->current_ht_config.smps = IEEE80211_SMPS_STATIC; | 1104 | priv->current_ht_config.smps = IEEE80211_SMPS_STATIC; |
@@ -1116,8 +1115,8 @@ static int iwl_init_drv(struct iwl_priv *priv) | |||
1116 | iwl_init_scan_params(priv); | 1115 | iwl_init_scan_params(priv); |
1117 | 1116 | ||
1118 | /* init bt coex */ | 1117 | /* init bt coex */ |
1119 | if (priv->cfg->bt_params && | 1118 | if (priv->lib->bt_params && |
1120 | priv->cfg->bt_params->advanced_bt_coexist) { | 1119 | priv->lib->bt_params->advanced_bt_coexist) { |
1121 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; | 1120 | priv->kill_ack_mask = IWLAGN_BT_KILL_ACK_MASK_DEFAULT; |
1122 | priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT; | 1121 | priv->kill_cts_mask = IWLAGN_BT_KILL_CTS_MASK_DEFAULT; |
1123 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; | 1122 | priv->bt_valid = IWLAGN_BT_ALL_VALID_MSK; |
@@ -1264,31 +1263,37 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans, | |||
1264 | switch (priv->cfg->device_family) { | 1263 | switch (priv->cfg->device_family) { |
1265 | case IWL_DEVICE_FAMILY_1000: | 1264 | case IWL_DEVICE_FAMILY_1000: |
1266 | case IWL_DEVICE_FAMILY_100: | 1265 | case IWL_DEVICE_FAMILY_100: |
1267 | priv->lib = &iwl1000_lib; | 1266 | priv->lib = &iwl_dvm_1000_cfg; |
1268 | break; | 1267 | break; |
1269 | case IWL_DEVICE_FAMILY_2000: | 1268 | case IWL_DEVICE_FAMILY_2000: |
1269 | priv->lib = &iwl_dvm_2000_cfg; | ||
1270 | break; | ||
1270 | case IWL_DEVICE_FAMILY_105: | 1271 | case IWL_DEVICE_FAMILY_105: |
1271 | priv->lib = &iwl2000_lib; | 1272 | priv->lib = &iwl_dvm_105_cfg; |
1272 | break; | 1273 | break; |
1273 | case IWL_DEVICE_FAMILY_2030: | 1274 | case IWL_DEVICE_FAMILY_2030: |
1274 | case IWL_DEVICE_FAMILY_135: | 1275 | case IWL_DEVICE_FAMILY_135: |
1275 | priv->lib = &iwl2030_lib; | 1276 | priv->lib = &iwl_dvm_2030_cfg; |
1276 | break; | 1277 | break; |
1277 | case IWL_DEVICE_FAMILY_5000: | 1278 | case IWL_DEVICE_FAMILY_5000: |
1278 | priv->lib = &iwl5000_lib; | 1279 | priv->lib = &iwl_dvm_5000_cfg; |
1279 | break; | 1280 | break; |
1280 | case IWL_DEVICE_FAMILY_5150: | 1281 | case IWL_DEVICE_FAMILY_5150: |
1281 | priv->lib = &iwl5150_lib; | 1282 | priv->lib = &iwl_dvm_5150_cfg; |
1282 | break; | 1283 | break; |
1283 | case IWL_DEVICE_FAMILY_6000: | 1284 | case IWL_DEVICE_FAMILY_6000: |
1284 | case IWL_DEVICE_FAMILY_6005: | ||
1285 | case IWL_DEVICE_FAMILY_6000i: | 1285 | case IWL_DEVICE_FAMILY_6000i: |
1286 | priv->lib = &iwl_dvm_6000_cfg; | ||
1287 | break; | ||
1288 | case IWL_DEVICE_FAMILY_6005: | ||
1289 | priv->lib = &iwl_dvm_6005_cfg; | ||
1290 | break; | ||
1286 | case IWL_DEVICE_FAMILY_6050: | 1291 | case IWL_DEVICE_FAMILY_6050: |
1287 | case IWL_DEVICE_FAMILY_6150: | 1292 | case IWL_DEVICE_FAMILY_6150: |
1288 | priv->lib = &iwl6000_lib; | 1293 | priv->lib = &iwl_dvm_6050_cfg; |
1289 | break; | 1294 | break; |
1290 | case IWL_DEVICE_FAMILY_6030: | 1295 | case IWL_DEVICE_FAMILY_6030: |
1291 | priv->lib = &iwl6030_lib; | 1296 | priv->lib = &iwl_dvm_6030_cfg; |
1292 | break; | 1297 | break; |
1293 | default: | 1298 | default: |
1294 | break; | 1299 | break; |
diff --git a/drivers/net/wireless/iwlwifi/dvm/power.c b/drivers/net/wireless/iwlwifi/dvm/power.c index bd69018d07a9..77cb59712235 100644 --- a/drivers/net/wireless/iwlwifi/dvm/power.c +++ b/drivers/net/wireless/iwlwifi/dvm/power.c | |||
@@ -163,7 +163,7 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv, | |||
163 | u8 skip; | 163 | u8 skip; |
164 | u32 slp_itrvl; | 164 | u32 slp_itrvl; |
165 | 165 | ||
166 | if (priv->cfg->adv_pm) { | 166 | if (priv->lib->adv_pm) { |
167 | table = apm_range_2; | 167 | table = apm_range_2; |
168 | if (period <= IWL_DTIM_RANGE_1_MAX) | 168 | if (period <= IWL_DTIM_RANGE_1_MAX) |
169 | table = apm_range_1; | 169 | table = apm_range_1; |
@@ -217,7 +217,7 @@ static void iwl_static_sleep_cmd(struct iwl_priv *priv, | |||
217 | cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; | 217 | cmd->flags &= ~IWL_POWER_SHADOW_REG_ENA; |
218 | 218 | ||
219 | if (iwl_advanced_bt_coexist(priv)) { | 219 | if (iwl_advanced_bt_coexist(priv)) { |
220 | if (!priv->cfg->bt_params->bt_sco_disable) | 220 | if (!priv->lib->bt_params->bt_sco_disable) |
221 | cmd->flags |= IWL_POWER_BT_SCO_ENA; | 221 | cmd->flags |= IWL_POWER_BT_SCO_ENA; |
222 | else | 222 | else |
223 | cmd->flags &= ~IWL_POWER_BT_SCO_ENA; | 223 | cmd->flags &= ~IWL_POWER_BT_SCO_ENA; |
@@ -293,7 +293,7 @@ static void iwl_power_build_cmd(struct iwl_priv *priv, | |||
293 | 293 | ||
294 | if (priv->wowlan) | 294 | if (priv->wowlan) |
295 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper); | 295 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, dtimper); |
296 | else if (!priv->cfg->base_params->no_idle_support && | 296 | else if (!priv->lib->no_idle_support && |
297 | priv->hw->conf.flags & IEEE80211_CONF_IDLE) | 297 | priv->hw->conf.flags & IEEE80211_CONF_IDLE) |
298 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); | 298 | iwl_static_sleep_cmd(priv, cmd, IWL_POWER_INDEX_5, 20); |
299 | else if (iwl_tt_is_low_power_state(priv)) { | 299 | else if (iwl_tt_is_low_power_state(priv)) { |
diff --git a/drivers/net/wireless/iwlwifi/dvm/rs.c b/drivers/net/wireless/iwlwifi/dvm/rs.c index 907bd6e50aad..94314a8e1029 100644 --- a/drivers/net/wireless/iwlwifi/dvm/rs.c +++ b/drivers/net/wireless/iwlwifi/dvm/rs.c | |||
@@ -1088,7 +1088,7 @@ done: | |||
1088 | (priv->tm_fixed_rate != lq_sta->dbg_fixed_rate)) | 1088 | (priv->tm_fixed_rate != lq_sta->dbg_fixed_rate)) |
1089 | rs_program_fix_rate(priv, lq_sta); | 1089 | rs_program_fix_rate(priv, lq_sta); |
1090 | #endif | 1090 | #endif |
1091 | if (priv->cfg->bt_params && priv->cfg->bt_params->advanced_bt_coexist) | 1091 | if (priv->lib->bt_params && priv->lib->bt_params->advanced_bt_coexist) |
1092 | rs_bt_update_lq(priv, ctx, lq_sta); | 1092 | rs_bt_update_lq(priv, ctx, lq_sta); |
1093 | } | 1093 | } |
1094 | 1094 | ||
@@ -3064,11 +3064,11 @@ static void rs_fill_link_cmd(struct iwl_priv *priv, | |||
3064 | * overwrite if needed, pass aggregation time limit | 3064 | * overwrite if needed, pass aggregation time limit |
3065 | * to uCode in uSec | 3065 | * to uCode in uSec |
3066 | */ | 3066 | */ |
3067 | if (priv && priv->cfg->bt_params && | 3067 | if (priv && priv->lib->bt_params && |
3068 | priv->cfg->bt_params->agg_time_limit && | 3068 | priv->lib->bt_params->agg_time_limit && |
3069 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH) | 3069 | priv->bt_traffic_load >= IWL_BT_COEX_TRAFFIC_LOAD_HIGH) |
3070 | lq_cmd->agg_params.agg_time_limit = | 3070 | lq_cmd->agg_params.agg_time_limit = |
3071 | cpu_to_le16(priv->cfg->bt_params->agg_time_limit); | 3071 | cpu_to_le16(priv->lib->bt_params->agg_time_limit); |
3072 | } | 3072 | } |
3073 | 3073 | ||
3074 | static void *rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir) | 3074 | static void *rs_alloc(struct ieee80211_hw *hw, struct dentry *debugfsdir) |
diff --git a/drivers/net/wireless/iwlwifi/dvm/rx.c b/drivers/net/wireless/iwlwifi/dvm/rx.c index a4eed2055fdb..2f3fd160ab44 100644 --- a/drivers/net/wireless/iwlwifi/dvm/rx.c +++ b/drivers/net/wireless/iwlwifi/dvm/rx.c | |||
@@ -1102,7 +1102,7 @@ void iwl_setup_rx_handlers(struct iwl_priv *priv) | |||
1102 | iwl_notification_wait_init(&priv->notif_wait); | 1102 | iwl_notification_wait_init(&priv->notif_wait); |
1103 | 1103 | ||
1104 | /* Set up BT Rx handlers */ | 1104 | /* Set up BT Rx handlers */ |
1105 | if (priv->cfg->bt_params) | 1105 | if (priv->lib->bt_params) |
1106 | iwlagn_bt_rx_handler_setup(priv); | 1106 | iwlagn_bt_rx_handler_setup(priv); |
1107 | } | 1107 | } |
1108 | 1108 | ||
diff --git a/drivers/net/wireless/iwlwifi/dvm/scan.c b/drivers/net/wireless/iwlwifi/dvm/scan.c index d69b55866714..8c686a5b90ac 100644 --- a/drivers/net/wireless/iwlwifi/dvm/scan.c +++ b/drivers/net/wireless/iwlwifi/dvm/scan.c | |||
@@ -801,8 +801,8 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
801 | * Internal scans are passive, so we can indiscriminately set | 801 | * Internal scans are passive, so we can indiscriminately set |
802 | * the BT ignore flag on 2.4 GHz since it applies to TX only. | 802 | * the BT ignore flag on 2.4 GHz since it applies to TX only. |
803 | */ | 803 | */ |
804 | if (priv->cfg->bt_params && | 804 | if (priv->lib->bt_params && |
805 | priv->cfg->bt_params->advanced_bt_coexist) | 805 | priv->lib->bt_params->advanced_bt_coexist) |
806 | scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; | 806 | scan->tx_cmd.tx_flags |= TX_CMD_FLG_IGNORE_BT; |
807 | break; | 807 | break; |
808 | case IEEE80211_BAND_5GHZ: | 808 | case IEEE80211_BAND_5GHZ: |
@@ -844,8 +844,8 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
844 | band = priv->scan_band; | 844 | band = priv->scan_band; |
845 | 845 | ||
846 | if (band == IEEE80211_BAND_2GHZ && | 846 | if (band == IEEE80211_BAND_2GHZ && |
847 | priv->cfg->bt_params && | 847 | priv->lib->bt_params && |
848 | priv->cfg->bt_params->advanced_bt_coexist) { | 848 | priv->lib->bt_params->advanced_bt_coexist) { |
849 | /* transmit 2.4 GHz probes only on first antenna */ | 849 | /* transmit 2.4 GHz probes only on first antenna */ |
850 | scan_tx_antennas = first_antenna(scan_tx_antennas); | 850 | scan_tx_antennas = first_antenna(scan_tx_antennas); |
851 | } | 851 | } |
@@ -873,8 +873,8 @@ static int iwlagn_request_scan(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
873 | 873 | ||
874 | rx_ant = first_antenna(active_chains); | 874 | rx_ant = first_antenna(active_chains); |
875 | } | 875 | } |
876 | if (priv->cfg->bt_params && | 876 | if (priv->lib->bt_params && |
877 | priv->cfg->bt_params->advanced_bt_coexist && | 877 | priv->lib->bt_params->advanced_bt_coexist && |
878 | priv->bt_full_concurrent) { | 878 | priv->bt_full_concurrent) { |
879 | /* operated as 1x1 in full concurrency mode */ | 879 | /* operated as 1x1 in full concurrency mode */ |
880 | rx_ant = first_antenna(rx_ant); | 880 | rx_ant = first_antenna(rx_ant); |
diff --git a/drivers/net/wireless/iwlwifi/dvm/sta.c b/drivers/net/wireless/iwlwifi/dvm/sta.c index db183b44e038..c3c13ce96eb0 100644 --- a/drivers/net/wireless/iwlwifi/dvm/sta.c +++ b/drivers/net/wireless/iwlwifi/dvm/sta.c | |||
@@ -735,7 +735,7 @@ void iwl_restore_stations(struct iwl_priv *priv, struct iwl_rxon_context *ctx) | |||
735 | memcpy(&lq, priv->stations[i].lq, | 735 | memcpy(&lq, priv->stations[i].lq, |
736 | sizeof(struct iwl_link_quality_cmd)); | 736 | sizeof(struct iwl_link_quality_cmd)); |
737 | 737 | ||
738 | if (!memcmp(&lq, &zero_lq, sizeof(lq))) | 738 | if (memcmp(&lq, &zero_lq, sizeof(lq))) |
739 | send_lq = true; | 739 | send_lq = true; |
740 | } | 740 | } |
741 | spin_unlock_bh(&priv->sta_lock); | 741 | spin_unlock_bh(&priv->sta_lock); |
diff --git a/drivers/net/wireless/iwlwifi/dvm/tt.c b/drivers/net/wireless/iwlwifi/dvm/tt.c index 03f9bc01c0cc..fbeee081ee2f 100644 --- a/drivers/net/wireless/iwlwifi/dvm/tt.c +++ b/drivers/net/wireless/iwlwifi/dvm/tt.c | |||
@@ -627,7 +627,7 @@ void iwl_tt_initialize(struct iwl_priv *priv) | |||
627 | INIT_WORK(&priv->ct_enter, iwl_bg_ct_enter); | 627 | INIT_WORK(&priv->ct_enter, iwl_bg_ct_enter); |
628 | INIT_WORK(&priv->ct_exit, iwl_bg_ct_exit); | 628 | INIT_WORK(&priv->ct_exit, iwl_bg_ct_exit); |
629 | 629 | ||
630 | if (priv->cfg->base_params->adv_thermal_throttle) { | 630 | if (priv->lib->adv_thermal_throttle) { |
631 | IWL_DEBUG_TEMP(priv, "Advanced Thermal Throttling\n"); | 631 | IWL_DEBUG_TEMP(priv, "Advanced Thermal Throttling\n"); |
632 | tt->restriction = kcalloc(IWL_TI_STATE_MAX, | 632 | tt->restriction = kcalloc(IWL_TI_STATE_MAX, |
633 | sizeof(struct iwl_tt_restriction), | 633 | sizeof(struct iwl_tt_restriction), |
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c index a900aaf47790..353a053b4eb1 100644 --- a/drivers/net/wireless/iwlwifi/dvm/tx.c +++ b/drivers/net/wireless/iwlwifi/dvm/tx.c | |||
@@ -83,8 +83,8 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv, | |||
83 | else if (ieee80211_is_back_req(fc)) | 83 | else if (ieee80211_is_back_req(fc)) |
84 | tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; | 84 | tx_flags |= TX_CMD_FLG_ACK_MSK | TX_CMD_FLG_IMM_BA_RSP_MASK; |
85 | else if (info->band == IEEE80211_BAND_2GHZ && | 85 | else if (info->band == IEEE80211_BAND_2GHZ && |
86 | priv->cfg->bt_params && | 86 | priv->lib->bt_params && |
87 | priv->cfg->bt_params->advanced_bt_coexist && | 87 | priv->lib->bt_params->advanced_bt_coexist && |
88 | (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) || | 88 | (ieee80211_is_auth(fc) || ieee80211_is_assoc_req(fc) || |
89 | ieee80211_is_reassoc_req(fc) || | 89 | ieee80211_is_reassoc_req(fc) || |
90 | skb->protocol == cpu_to_be16(ETH_P_PAE))) | 90 | skb->protocol == cpu_to_be16(ETH_P_PAE))) |
@@ -202,8 +202,8 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv, | |||
202 | rate_flags |= RATE_MCS_CCK_MSK; | 202 | rate_flags |= RATE_MCS_CCK_MSK; |
203 | 203 | ||
204 | /* Set up antennas */ | 204 | /* Set up antennas */ |
205 | if (priv->cfg->bt_params && | 205 | if (priv->lib->bt_params && |
206 | priv->cfg->bt_params->advanced_bt_coexist && | 206 | priv->lib->bt_params->advanced_bt_coexist && |
207 | priv->bt_full_concurrent) { | 207 | priv->bt_full_concurrent) { |
208 | /* operated as 1x1 in full concurrency mode */ | 208 | /* operated as 1x1 in full concurrency mode */ |
209 | priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant, | 209 | priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant, |
@@ -986,8 +986,8 @@ static void iwl_rx_reply_tx_agg(struct iwl_priv *priv, | |||
986 | * notification again. | 986 | * notification again. |
987 | */ | 987 | */ |
988 | if (tx_resp->bt_kill_count && tx_resp->frame_count == 1 && | 988 | if (tx_resp->bt_kill_count && tx_resp->frame_count == 1 && |
989 | priv->cfg->bt_params && | 989 | priv->lib->bt_params && |
990 | priv->cfg->bt_params->advanced_bt_coexist) { | 990 | priv->lib->bt_params->advanced_bt_coexist) { |
991 | IWL_DEBUG_COEX(priv, "receive reply tx w/ bt_kill\n"); | 991 | IWL_DEBUG_COEX(priv, "receive reply tx w/ bt_kill\n"); |
992 | } | 992 | } |
993 | 993 | ||
diff --git a/drivers/net/wireless/iwlwifi/dvm/ucode.c b/drivers/net/wireless/iwlwifi/dvm/ucode.c index 0a1cdc5e856b..86270b69cd02 100644 --- a/drivers/net/wireless/iwlwifi/dvm/ucode.c +++ b/drivers/net/wireless/iwlwifi/dvm/ucode.c | |||
@@ -132,8 +132,8 @@ int iwl_init_alive_start(struct iwl_priv *priv) | |||
132 | { | 132 | { |
133 | int ret; | 133 | int ret; |
134 | 134 | ||
135 | if (priv->cfg->bt_params && | 135 | if (priv->lib->bt_params && |
136 | priv->cfg->bt_params->advanced_bt_coexist) { | 136 | priv->lib->bt_params->advanced_bt_coexist) { |
137 | /* | 137 | /* |
138 | * Tell uCode we are ready to perform calibration | 138 | * Tell uCode we are ready to perform calibration |
139 | * need to perform this before any calibration | 139 | * need to perform this before any calibration |
@@ -155,8 +155,8 @@ int iwl_init_alive_start(struct iwl_priv *priv) | |||
155 | * temperature offset calibration is only needed for runtime ucode, | 155 | * temperature offset calibration is only needed for runtime ucode, |
156 | * so prepare the value now. | 156 | * so prepare the value now. |
157 | */ | 157 | */ |
158 | if (priv->cfg->need_temp_offset_calib) { | 158 | if (priv->lib->need_temp_offset_calib) { |
159 | if (priv->cfg->temp_offset_v2) | 159 | if (priv->lib->temp_offset_v2) |
160 | return iwl_set_temperature_offset_calib_v2(priv); | 160 | return iwl_set_temperature_offset_calib_v2(priv); |
161 | else | 161 | else |
162 | return iwl_set_temperature_offset_calib(priv); | 162 | return iwl_set_temperature_offset_calib(priv); |
@@ -277,7 +277,7 @@ static int iwl_alive_notify(struct iwl_priv *priv) | |||
277 | if (ret) | 277 | if (ret) |
278 | return ret; | 278 | return ret; |
279 | 279 | ||
280 | if (!priv->cfg->no_xtal_calib) { | 280 | if (!priv->lib->no_xtal_calib) { |
281 | ret = iwl_set_Xtal_calib(priv); | 281 | ret = iwl_set_Xtal_calib(priv); |
282 | if (ret) | 282 | if (ret) |
283 | return ret; | 283 | return ret; |