diff options
author | David S. Miller <davem@davemloft.net> | 2012-04-25 15:13:37 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-04-25 15:13:37 -0400 |
commit | 202149265770426f0965557ffa0b500fbbd701dd (patch) | |
tree | 3a6fe0c357b6eb6ac5e15a0ec27eaf570ebfd0ce | |
parent | f891ea1634ce41f5f47ae40d8594809f4cd2ca66 (diff) | |
parent | 395836282f7cf8b1dac9b9c2aa2bacddfa1580b5 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar5008_phy.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_paprd.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_9287.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ipw2x00/ipw2200.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-1000.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-2000.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-5000.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-6000.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-fh.h | 24 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-mac80211.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-prph.h | 27 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 1 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 2 | ||||
-rw-r--r-- | net/mac80211/iface.c | 4 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 2 |
20 files changed, 109 insertions, 45 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c index d7d8e9199140..aba088005b22 100644 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c | |||
@@ -869,7 +869,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah, | |||
869 | ar5008_hw_set_channel_regs(ah, chan); | 869 | ar5008_hw_set_channel_regs(ah, chan); |
870 | ar5008_hw_init_chain_masks(ah); | 870 | ar5008_hw_init_chain_masks(ah); |
871 | ath9k_olc_init(ah); | 871 | ath9k_olc_init(ah); |
872 | ath9k_hw_apply_txpower(ah, chan); | 872 | ath9k_hw_apply_txpower(ah, chan, false); |
873 | 873 | ||
874 | /* Write analog registers */ | 874 | /* Write analog registers */ |
875 | if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) { | 875 | if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) { |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c index 59647a3ceb7f..3d400e8d6535 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c | |||
@@ -54,7 +54,7 @@ void ar9003_paprd_enable(struct ath_hw *ah, bool val) | |||
54 | 54 | ||
55 | if (val) { | 55 | if (val) { |
56 | ah->paprd_table_write_done = true; | 56 | ah->paprd_table_write_done = true; |
57 | ath9k_hw_apply_txpower(ah, chan); | 57 | ath9k_hw_apply_txpower(ah, chan, false); |
58 | } | 58 | } |
59 | 59 | ||
60 | REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B0, | 60 | REG_RMW_FIELD(ah, AR_PHY_PAPRD_CTRL0_B0, |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index bc992b237ae5..deb6cfb2959a 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -694,7 +694,7 @@ static int ar9003_hw_process_ini(struct ath_hw *ah, | |||
694 | ar9003_hw_override_ini(ah); | 694 | ar9003_hw_override_ini(ah); |
695 | ar9003_hw_set_channel_regs(ah, chan); | 695 | ar9003_hw_set_channel_regs(ah, chan); |
696 | ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask); | 696 | ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask); |
697 | ath9k_hw_apply_txpower(ah, chan); | 697 | ath9k_hw_apply_txpower(ah, chan, false); |
698 | 698 | ||
699 | if (AR_SREV_9462(ah)) { | 699 | if (AR_SREV_9462(ah)) { |
700 | if (REG_READ_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_0, | 700 | if (REG_READ_FIELD(ah, AR_PHY_TX_IQCAL_CONTROL_0, |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index f272236d8053..b34e8b2990b1 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c | |||
@@ -824,6 +824,8 @@ static void ath9k_hw_ar9287_set_txpower(struct ath_hw *ah, | |||
824 | regulatory->max_power_level = ratesArray[i]; | 824 | regulatory->max_power_level = ratesArray[i]; |
825 | } | 825 | } |
826 | 826 | ||
827 | ath9k_hw_update_regulatory_maxpower(ah); | ||
828 | |||
827 | if (test) | 829 | if (test) |
828 | return; | 830 | return; |
829 | 831 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 6c69e4e8b1cb..fa84e37bf091 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1454,7 +1454,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah, | |||
1454 | return false; | 1454 | return false; |
1455 | } | 1455 | } |
1456 | ath9k_hw_set_clockrate(ah); | 1456 | ath9k_hw_set_clockrate(ah); |
1457 | ath9k_hw_apply_txpower(ah, chan); | 1457 | ath9k_hw_apply_txpower(ah, chan, false); |
1458 | ath9k_hw_rfbus_done(ah); | 1458 | ath9k_hw_rfbus_done(ah); |
1459 | 1459 | ||
1460 | if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan)) | 1460 | if (IS_CHAN_OFDM(chan) || IS_CHAN_HT(chan)) |
@@ -2652,7 +2652,8 @@ static int get_antenna_gain(struct ath_hw *ah, struct ath9k_channel *chan) | |||
2652 | return ah->eep_ops->get_eeprom(ah, gain_param); | 2652 | return ah->eep_ops->get_eeprom(ah, gain_param); |
2653 | } | 2653 | } |
2654 | 2654 | ||
2655 | void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan) | 2655 | void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan, |
2656 | bool test) | ||
2656 | { | 2657 | { |
2657 | struct ath_regulatory *reg = ath9k_hw_regulatory(ah); | 2658 | struct ath_regulatory *reg = ath9k_hw_regulatory(ah); |
2658 | struct ieee80211_channel *channel; | 2659 | struct ieee80211_channel *channel; |
@@ -2673,7 +2674,7 @@ void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan) | |||
2673 | 2674 | ||
2674 | ah->eep_ops->set_txpower(ah, chan, | 2675 | ah->eep_ops->set_txpower(ah, chan, |
2675 | ath9k_regd_get_ctl(reg, chan), | 2676 | ath9k_regd_get_ctl(reg, chan), |
2676 | ant_reduction, new_pwr, false); | 2677 | ant_reduction, new_pwr, test); |
2677 | } | 2678 | } |
2678 | 2679 | ||
2679 | void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test) | 2680 | void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test) |
@@ -2686,7 +2687,7 @@ void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test) | |||
2686 | if (test) | 2687 | if (test) |
2687 | channel->max_power = MAX_RATE_POWER / 2; | 2688 | channel->max_power = MAX_RATE_POWER / 2; |
2688 | 2689 | ||
2689 | ath9k_hw_apply_txpower(ah, chan); | 2690 | ath9k_hw_apply_txpower(ah, chan, test); |
2690 | 2691 | ||
2691 | if (test) | 2692 | if (test) |
2692 | channel->max_power = DIV_ROUND_UP(reg->max_power_level, 2); | 2693 | channel->max_power = DIV_ROUND_UP(reg->max_power_level, 2); |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index aa1680a0c7fd..e88f182ff45c 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -985,7 +985,8 @@ void ath9k_hw_name(struct ath_hw *ah, char *hw_name, size_t len); | |||
985 | /* PHY */ | 985 | /* PHY */ |
986 | void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah, u32 coef_scaled, | 986 | void ath9k_hw_get_delta_slope_vals(struct ath_hw *ah, u32 coef_scaled, |
987 | u32 *coef_mantissa, u32 *coef_exponent); | 987 | u32 *coef_mantissa, u32 *coef_exponent); |
988 | void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan); | 988 | void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan, |
989 | bool test); | ||
989 | 990 | ||
990 | /* | 991 | /* |
991 | * Code Specific to AR5008, AR9001 or AR9002, | 992 | * Code Specific to AR5008, AR9001 or AR9002, |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 7083db75b00c..b4d92792c502 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -847,8 +847,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs) | |||
847 | */ | 847 | */ |
848 | if (!(txs->status & TX_STATUS_AMPDU) | 848 | if (!(txs->status & TX_STATUS_AMPDU) |
849 | && (txs->status & TX_STATUS_INTERMEDIATE)) { | 849 | && (txs->status & TX_STATUS_INTERMEDIATE)) { |
850 | wiphy_err(wlc->wiphy, "%s: INTERMEDIATE but not AMPDU\n", | 850 | BCMMSG(wlc->wiphy, "INTERMEDIATE but not AMPDU\n"); |
851 | __func__); | ||
852 | return false; | 851 | return false; |
853 | } | 852 | } |
854 | 853 | ||
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.c b/drivers/net/wireless/ipw2x00/ipw2200.c index 2b022571a859..1779db3aa2b0 100644 --- a/drivers/net/wireless/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/ipw2x00/ipw2200.c | |||
@@ -2191,6 +2191,7 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) | |||
2191 | { | 2191 | { |
2192 | int rc = 0; | 2192 | int rc = 0; |
2193 | unsigned long flags; | 2193 | unsigned long flags; |
2194 | unsigned long now, end; | ||
2194 | 2195 | ||
2195 | spin_lock_irqsave(&priv->lock, flags); | 2196 | spin_lock_irqsave(&priv->lock, flags); |
2196 | if (priv->status & STATUS_HCMD_ACTIVE) { | 2197 | if (priv->status & STATUS_HCMD_ACTIVE) { |
@@ -2232,10 +2233,20 @@ static int __ipw_send_cmd(struct ipw_priv *priv, struct host_cmd *cmd) | |||
2232 | } | 2233 | } |
2233 | spin_unlock_irqrestore(&priv->lock, flags); | 2234 | spin_unlock_irqrestore(&priv->lock, flags); |
2234 | 2235 | ||
2236 | now = jiffies; | ||
2237 | end = now + HOST_COMPLETE_TIMEOUT; | ||
2238 | again: | ||
2235 | rc = wait_event_interruptible_timeout(priv->wait_command_queue, | 2239 | rc = wait_event_interruptible_timeout(priv->wait_command_queue, |
2236 | !(priv-> | 2240 | !(priv-> |
2237 | status & STATUS_HCMD_ACTIVE), | 2241 | status & STATUS_HCMD_ACTIVE), |
2238 | HOST_COMPLETE_TIMEOUT); | 2242 | end - now); |
2243 | if (rc < 0) { | ||
2244 | now = jiffies; | ||
2245 | if (time_before(now, end)) | ||
2246 | goto again; | ||
2247 | rc = 0; | ||
2248 | } | ||
2249 | |||
2239 | if (rc == 0) { | 2250 | if (rc == 0) { |
2240 | spin_lock_irqsave(&priv->lock, flags); | 2251 | spin_lock_irqsave(&priv->lock, flags); |
2241 | if (priv->status & STATUS_HCMD_ACTIVE) { | 2252 | if (priv->status & STATUS_HCMD_ACTIVE) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c index 5b0d888f746b..8d80e233bc7a 100644 --- a/drivers/net/wireless/iwlwifi/iwl-1000.c +++ b/drivers/net/wireless/iwlwifi/iwl-1000.c | |||
@@ -46,8 +46,8 @@ | |||
46 | #include "iwl-prph.h" | 46 | #include "iwl-prph.h" |
47 | 47 | ||
48 | /* Highest firmware API version supported */ | 48 | /* Highest firmware API version supported */ |
49 | #define IWL1000_UCODE_API_MAX 6 | 49 | #define IWL1000_UCODE_API_MAX 5 |
50 | #define IWL100_UCODE_API_MAX 6 | 50 | #define IWL100_UCODE_API_MAX 5 |
51 | 51 | ||
52 | /* Oldest version we won't warn about */ | 52 | /* Oldest version we won't warn about */ |
53 | #define IWL1000_UCODE_API_OK 5 | 53 | #define IWL1000_UCODE_API_OK 5 |
@@ -226,5 +226,5 @@ const struct iwl_cfg iwl100_bg_cfg = { | |||
226 | IWL_DEVICE_100, | 226 | IWL_DEVICE_100, |
227 | }; | 227 | }; |
228 | 228 | ||
229 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_MAX)); | 229 | MODULE_FIRMWARE(IWL1000_MODULE_FIRMWARE(IWL1000_UCODE_API_OK)); |
230 | MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_MAX)); | 230 | MODULE_FIRMWARE(IWL100_MODULE_FIRMWARE(IWL100_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c index 5635b9e2c69e..ea108622e0bd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-2000.c +++ b/drivers/net/wireless/iwlwifi/iwl-2000.c | |||
@@ -51,10 +51,10 @@ | |||
51 | #define IWL135_UCODE_API_MAX 6 | 51 | #define IWL135_UCODE_API_MAX 6 |
52 | 52 | ||
53 | /* Oldest version we won't warn about */ | 53 | /* Oldest version we won't warn about */ |
54 | #define IWL2030_UCODE_API_OK 5 | 54 | #define IWL2030_UCODE_API_OK 6 |
55 | #define IWL2000_UCODE_API_OK 5 | 55 | #define IWL2000_UCODE_API_OK 6 |
56 | #define IWL105_UCODE_API_OK 5 | 56 | #define IWL105_UCODE_API_OK 6 |
57 | #define IWL135_UCODE_API_OK 5 | 57 | #define IWL135_UCODE_API_OK 6 |
58 | 58 | ||
59 | /* Lowest firmware API version supported */ | 59 | /* Lowest firmware API version supported */ |
60 | #define IWL2030_UCODE_API_MIN 5 | 60 | #define IWL2030_UCODE_API_MIN 5 |
@@ -328,7 +328,7 @@ const struct iwl_cfg iwl135_bgn_cfg = { | |||
328 | .ht_params = &iwl2000_ht_params, | 328 | .ht_params = &iwl2000_ht_params, |
329 | }; | 329 | }; |
330 | 330 | ||
331 | MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_MAX)); | 331 | MODULE_FIRMWARE(IWL2000_MODULE_FIRMWARE(IWL2000_UCODE_API_OK)); |
332 | MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_MAX)); | 332 | MODULE_FIRMWARE(IWL2030_MODULE_FIRMWARE(IWL2030_UCODE_API_OK)); |
333 | MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_MAX)); | 333 | MODULE_FIRMWARE(IWL105_MODULE_FIRMWARE(IWL105_UCODE_API_OK)); |
334 | MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_MAX)); | 334 | MODULE_FIRMWARE(IWL135_MODULE_FIRMWARE(IWL135_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index a805e97b89af..de0920c74cdd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -51,6 +51,10 @@ | |||
51 | #define IWL5000_UCODE_API_MAX 5 | 51 | #define IWL5000_UCODE_API_MAX 5 |
52 | #define IWL5150_UCODE_API_MAX 2 | 52 | #define IWL5150_UCODE_API_MAX 2 |
53 | 53 | ||
54 | /* Oldest version we won't warn about */ | ||
55 | #define IWL5000_UCODE_API_OK 5 | ||
56 | #define IWL5150_UCODE_API_OK 2 | ||
57 | |||
54 | /* Lowest firmware API version supported */ | 58 | /* Lowest firmware API version supported */ |
55 | #define IWL5000_UCODE_API_MIN 1 | 59 | #define IWL5000_UCODE_API_MIN 1 |
56 | #define IWL5150_UCODE_API_MIN 1 | 60 | #define IWL5150_UCODE_API_MIN 1 |
@@ -326,6 +330,7 @@ static const struct iwl_ht_params iwl5000_ht_params = { | |||
326 | #define IWL_DEVICE_5000 \ | 330 | #define IWL_DEVICE_5000 \ |
327 | .fw_name_pre = IWL5000_FW_PRE, \ | 331 | .fw_name_pre = IWL5000_FW_PRE, \ |
328 | .ucode_api_max = IWL5000_UCODE_API_MAX, \ | 332 | .ucode_api_max = IWL5000_UCODE_API_MAX, \ |
333 | .ucode_api_ok = IWL5000_UCODE_API_OK, \ | ||
329 | .ucode_api_min = IWL5000_UCODE_API_MIN, \ | 334 | .ucode_api_min = IWL5000_UCODE_API_MIN, \ |
330 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 335 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
331 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | 336 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
@@ -371,6 +376,7 @@ const struct iwl_cfg iwl5350_agn_cfg = { | |||
371 | .name = "Intel(R) WiMAX/WiFi Link 5350 AGN", | 376 | .name = "Intel(R) WiMAX/WiFi Link 5350 AGN", |
372 | .fw_name_pre = IWL5000_FW_PRE, | 377 | .fw_name_pre = IWL5000_FW_PRE, |
373 | .ucode_api_max = IWL5000_UCODE_API_MAX, | 378 | .ucode_api_max = IWL5000_UCODE_API_MAX, |
379 | .ucode_api_ok = IWL5000_UCODE_API_OK, | ||
374 | .ucode_api_min = IWL5000_UCODE_API_MIN, | 380 | .ucode_api_min = IWL5000_UCODE_API_MIN, |
375 | .max_inst_size = IWLAGN_RTC_INST_SIZE, | 381 | .max_inst_size = IWLAGN_RTC_INST_SIZE, |
376 | .max_data_size = IWLAGN_RTC_DATA_SIZE, | 382 | .max_data_size = IWLAGN_RTC_DATA_SIZE, |
@@ -386,6 +392,7 @@ const struct iwl_cfg iwl5350_agn_cfg = { | |||
386 | #define IWL_DEVICE_5150 \ | 392 | #define IWL_DEVICE_5150 \ |
387 | .fw_name_pre = IWL5150_FW_PRE, \ | 393 | .fw_name_pre = IWL5150_FW_PRE, \ |
388 | .ucode_api_max = IWL5150_UCODE_API_MAX, \ | 394 | .ucode_api_max = IWL5150_UCODE_API_MAX, \ |
395 | .ucode_api_ok = IWL5150_UCODE_API_OK, \ | ||
389 | .ucode_api_min = IWL5150_UCODE_API_MIN, \ | 396 | .ucode_api_min = IWL5150_UCODE_API_MIN, \ |
390 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ | 397 | .max_inst_size = IWLAGN_RTC_INST_SIZE, \ |
391 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ | 398 | .max_data_size = IWLAGN_RTC_DATA_SIZE, \ |
@@ -409,5 +416,5 @@ const struct iwl_cfg iwl5150_abg_cfg = { | |||
409 | IWL_DEVICE_5150, | 416 | IWL_DEVICE_5150, |
410 | }; | 417 | }; |
411 | 418 | ||
412 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_MAX)); | 419 | MODULE_FIRMWARE(IWL5000_MODULE_FIRMWARE(IWL5000_UCODE_API_OK)); |
413 | MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_MAX)); | 420 | MODULE_FIRMWARE(IWL5150_MODULE_FIRMWARE(IWL5150_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c index 64060cd738b5..b1b69515b1a0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-6000.c +++ b/drivers/net/wireless/iwlwifi/iwl-6000.c | |||
@@ -53,6 +53,8 @@ | |||
53 | /* Oldest version we won't warn about */ | 53 | /* Oldest version we won't warn about */ |
54 | #define IWL6000_UCODE_API_OK 4 | 54 | #define IWL6000_UCODE_API_OK 4 |
55 | #define IWL6000G2_UCODE_API_OK 5 | 55 | #define IWL6000G2_UCODE_API_OK 5 |
56 | #define IWL6050_UCODE_API_OK 5 | ||
57 | #define IWL6000G2B_UCODE_API_OK 6 | ||
56 | 58 | ||
57 | /* Lowest firmware API version supported */ | 59 | /* Lowest firmware API version supported */ |
58 | #define IWL6000_UCODE_API_MIN 4 | 60 | #define IWL6000_UCODE_API_MIN 4 |
@@ -334,7 +336,7 @@ static const struct iwl_bt_params iwl6000_bt_params = { | |||
334 | #define IWL_DEVICE_6005 \ | 336 | #define IWL_DEVICE_6005 \ |
335 | .fw_name_pre = IWL6005_FW_PRE, \ | 337 | .fw_name_pre = IWL6005_FW_PRE, \ |
336 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ | 338 | .ucode_api_max = IWL6000G2_UCODE_API_MAX, \ |
337 | .ucode_api_ok = IWL6000G2_UCODE_API_OK, \ | 339 | .ucode_api_ok = IWL6000G2B_UCODE_API_OK, \ |
338 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ | 340 | .ucode_api_min = IWL6000G2_UCODE_API_MIN, \ |
339 | .max_inst_size = IWL60_RTC_INST_SIZE, \ | 341 | .max_inst_size = IWL60_RTC_INST_SIZE, \ |
340 | .max_data_size = IWL60_RTC_DATA_SIZE, \ | 342 | .max_data_size = IWL60_RTC_DATA_SIZE, \ |
@@ -557,6 +559,6 @@ const struct iwl_cfg iwl6000_3agn_cfg = { | |||
557 | }; | 559 | }; |
558 | 560 | ||
559 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK)); | 561 | MODULE_FIRMWARE(IWL6000_MODULE_FIRMWARE(IWL6000_UCODE_API_OK)); |
560 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_MAX)); | 562 | MODULE_FIRMWARE(IWL6050_MODULE_FIRMWARE(IWL6050_UCODE_API_OK)); |
561 | MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); | 563 | MODULE_FIRMWARE(IWL6005_MODULE_FIRMWARE(IWL6000G2_UCODE_API_OK)); |
562 | MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2_UCODE_API_MAX)); | 564 | MODULE_FIRMWARE(IWL6030_MODULE_FIRMWARE(IWL6000G2B_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index f1226dbf789d..2a9a16f901c3 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -863,7 +863,6 @@ static void iwl_bg_run_time_calib_work(struct work_struct *work) | |||
863 | 863 | ||
864 | void iwlagn_prepare_restart(struct iwl_priv *priv) | 864 | void iwlagn_prepare_restart(struct iwl_priv *priv) |
865 | { | 865 | { |
866 | struct iwl_rxon_context *ctx; | ||
867 | bool bt_full_concurrent; | 866 | bool bt_full_concurrent; |
868 | u8 bt_ci_compliance; | 867 | u8 bt_ci_compliance; |
869 | u8 bt_load; | 868 | u8 bt_load; |
@@ -872,8 +871,6 @@ void iwlagn_prepare_restart(struct iwl_priv *priv) | |||
872 | 871 | ||
873 | lockdep_assert_held(&priv->mutex); | 872 | lockdep_assert_held(&priv->mutex); |
874 | 873 | ||
875 | for_each_context(priv, ctx) | ||
876 | ctx->vif = NULL; | ||
877 | priv->is_open = 0; | 874 | priv->is_open = 0; |
878 | 875 | ||
879 | /* | 876 | /* |
diff --git a/drivers/net/wireless/iwlwifi/iwl-fh.h b/drivers/net/wireless/iwlwifi/iwl-fh.h index 90208094b8eb..74bce97a8600 100644 --- a/drivers/net/wireless/iwlwifi/iwl-fh.h +++ b/drivers/net/wireless/iwlwifi/iwl-fh.h | |||
@@ -104,15 +104,29 @@ | |||
104 | * (see struct iwl_tfd_frame). These 16 pointer registers are offset by 0x04 | 104 | * (see struct iwl_tfd_frame). These 16 pointer registers are offset by 0x04 |
105 | * bytes from one another. Each TFD circular buffer in DRAM must be 256-byte | 105 | * bytes from one another. Each TFD circular buffer in DRAM must be 256-byte |
106 | * aligned (address bits 0-7 must be 0). | 106 | * aligned (address bits 0-7 must be 0). |
107 | * Later devices have 20 (5000 series) or 30 (higher) queues, but the registers | ||
108 | * for them are in different places. | ||
107 | * | 109 | * |
108 | * Bit fields in each pointer register: | 110 | * Bit fields in each pointer register: |
109 | * 27-0: TFD CB physical base address [35:8], must be 256-byte aligned | 111 | * 27-0: TFD CB physical base address [35:8], must be 256-byte aligned |
110 | */ | 112 | */ |
111 | #define FH_MEM_CBBC_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) | 113 | #define FH_MEM_CBBC_0_15_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0x9D0) |
112 | #define FH_MEM_CBBC_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) | 114 | #define FH_MEM_CBBC_0_15_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xA10) |
113 | 115 | #define FH_MEM_CBBC_16_19_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xBF0) | |
114 | /* Find TFD CB base pointer for given queue (range 0-15). */ | 116 | #define FH_MEM_CBBC_16_19_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xC00) |
115 | #define FH_MEM_CBBC_QUEUE(x) (FH_MEM_CBBC_LOWER_BOUND + (x) * 0x4) | 117 | #define FH_MEM_CBBC_20_31_LOWER_BOUND (FH_MEM_LOWER_BOUND + 0xB20) |
118 | #define FH_MEM_CBBC_20_31_UPPER_BOUND (FH_MEM_LOWER_BOUND + 0xB80) | ||
119 | |||
120 | /* Find TFD CB base pointer for given queue */ | ||
121 | static inline unsigned int FH_MEM_CBBC_QUEUE(unsigned int chnl) | ||
122 | { | ||
123 | if (chnl < 16) | ||
124 | return FH_MEM_CBBC_0_15_LOWER_BOUND + 4 * chnl; | ||
125 | if (chnl < 20) | ||
126 | return FH_MEM_CBBC_16_19_LOWER_BOUND + 4 * (chnl - 16); | ||
127 | WARN_ON_ONCE(chnl >= 32); | ||
128 | return FH_MEM_CBBC_20_31_LOWER_BOUND + 4 * (chnl - 20); | ||
129 | } | ||
116 | 130 | ||
117 | 131 | ||
118 | /** | 132 | /** |
diff --git a/drivers/net/wireless/iwlwifi/iwl-mac80211.c b/drivers/net/wireless/iwlwifi/iwl-mac80211.c index b6805f8e9a01..c24a7134a6f9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-mac80211.c +++ b/drivers/net/wireless/iwlwifi/iwl-mac80211.c | |||
@@ -1244,6 +1244,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, | |||
1244 | struct iwl_rxon_context *tmp, *ctx = NULL; | 1244 | struct iwl_rxon_context *tmp, *ctx = NULL; |
1245 | int err; | 1245 | int err; |
1246 | enum nl80211_iftype viftype = ieee80211_vif_type_p2p(vif); | 1246 | enum nl80211_iftype viftype = ieee80211_vif_type_p2p(vif); |
1247 | bool reset = false; | ||
1247 | 1248 | ||
1248 | IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n", | 1249 | IWL_DEBUG_MAC80211(priv, "enter: type %d, addr %pM\n", |
1249 | viftype, vif->addr); | 1250 | viftype, vif->addr); |
@@ -1265,6 +1266,13 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, | |||
1265 | tmp->interface_modes | tmp->exclusive_interface_modes; | 1266 | tmp->interface_modes | tmp->exclusive_interface_modes; |
1266 | 1267 | ||
1267 | if (tmp->vif) { | 1268 | if (tmp->vif) { |
1269 | /* On reset we need to add the same interface again */ | ||
1270 | if (tmp->vif == vif) { | ||
1271 | reset = true; | ||
1272 | ctx = tmp; | ||
1273 | break; | ||
1274 | } | ||
1275 | |||
1268 | /* check if this busy context is exclusive */ | 1276 | /* check if this busy context is exclusive */ |
1269 | if (tmp->exclusive_interface_modes & | 1277 | if (tmp->exclusive_interface_modes & |
1270 | BIT(tmp->vif->type)) { | 1278 | BIT(tmp->vif->type)) { |
@@ -1291,7 +1299,7 @@ static int iwlagn_mac_add_interface(struct ieee80211_hw *hw, | |||
1291 | ctx->vif = vif; | 1299 | ctx->vif = vif; |
1292 | 1300 | ||
1293 | err = iwl_setup_interface(priv, ctx); | 1301 | err = iwl_setup_interface(priv, ctx); |
1294 | if (!err) | 1302 | if (!err || reset) |
1295 | goto out; | 1303 | goto out; |
1296 | 1304 | ||
1297 | ctx->vif = NULL; | 1305 | ctx->vif = NULL; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-prph.h b/drivers/net/wireless/iwlwifi/iwl-prph.h index 75dc20bd965b..3b1069290fa9 100644 --- a/drivers/net/wireless/iwlwifi/iwl-prph.h +++ b/drivers/net/wireless/iwlwifi/iwl-prph.h | |||
@@ -223,12 +223,33 @@ | |||
223 | #define SCD_AIT (SCD_BASE + 0x0c) | 223 | #define SCD_AIT (SCD_BASE + 0x0c) |
224 | #define SCD_TXFACT (SCD_BASE + 0x10) | 224 | #define SCD_TXFACT (SCD_BASE + 0x10) |
225 | #define SCD_ACTIVE (SCD_BASE + 0x14) | 225 | #define SCD_ACTIVE (SCD_BASE + 0x14) |
226 | #define SCD_QUEUE_WRPTR(x) (SCD_BASE + 0x18 + (x) * 4) | ||
227 | #define SCD_QUEUE_RDPTR(x) (SCD_BASE + 0x68 + (x) * 4) | ||
228 | #define SCD_QUEUECHAIN_SEL (SCD_BASE + 0xe8) | 226 | #define SCD_QUEUECHAIN_SEL (SCD_BASE + 0xe8) |
229 | #define SCD_AGGR_SEL (SCD_BASE + 0x248) | 227 | #define SCD_AGGR_SEL (SCD_BASE + 0x248) |
230 | #define SCD_INTERRUPT_MASK (SCD_BASE + 0x108) | 228 | #define SCD_INTERRUPT_MASK (SCD_BASE + 0x108) |
231 | #define SCD_QUEUE_STATUS_BITS(x) (SCD_BASE + 0x10c + (x) * 4) | 229 | |
230 | static inline unsigned int SCD_QUEUE_WRPTR(unsigned int chnl) | ||
231 | { | ||
232 | if (chnl < 20) | ||
233 | return SCD_BASE + 0x18 + chnl * 4; | ||
234 | WARN_ON_ONCE(chnl >= 32); | ||
235 | return SCD_BASE + 0x284 + (chnl - 20) * 4; | ||
236 | } | ||
237 | |||
238 | static inline unsigned int SCD_QUEUE_RDPTR(unsigned int chnl) | ||
239 | { | ||
240 | if (chnl < 20) | ||
241 | return SCD_BASE + 0x68 + chnl * 4; | ||
242 | WARN_ON_ONCE(chnl >= 32); | ||
243 | return SCD_BASE + 0x2B4 + (chnl - 20) * 4; | ||
244 | } | ||
245 | |||
246 | static inline unsigned int SCD_QUEUE_STATUS_BITS(unsigned int chnl) | ||
247 | { | ||
248 | if (chnl < 20) | ||
249 | return SCD_BASE + 0x10c + chnl * 4; | ||
250 | WARN_ON_ONCE(chnl >= 32); | ||
251 | return SCD_BASE + 0x384 + (chnl - 20) * 4; | ||
252 | } | ||
232 | 253 | ||
233 | /*********************** END TX SCHEDULER *************************************/ | 254 | /*********************** END TX SCHEDULER *************************************/ |
234 | 255 | ||
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 288b035a3579..cc15fdb36060 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c | |||
@@ -1941,6 +1941,7 @@ void rtl_pci_disconnect(struct pci_dev *pdev) | |||
1941 | rtl_deinit_deferred_work(hw); | 1941 | rtl_deinit_deferred_work(hw); |
1942 | rtlpriv->intf_ops->adapter_stop(hw); | 1942 | rtlpriv->intf_ops->adapter_stop(hw); |
1943 | } | 1943 | } |
1944 | rtlpriv->cfg->ops->disable_interrupt(hw); | ||
1944 | 1945 | ||
1945 | /*deinit rfkill */ | 1946 | /*deinit rfkill */ |
1946 | rtl_deinit_rfkill(hw); | 1947 | rtl_deinit_rfkill(hw); |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index d9798a307f20..db8fae51714c 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1210,7 +1210,7 @@ void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
1210 | struct sk_buff *skb); | 1210 | struct sk_buff *skb); |
1211 | void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata); | 1211 | void ieee80211_sta_reset_beacon_monitor(struct ieee80211_sub_if_data *sdata); |
1212 | void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata); | 1212 | void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata); |
1213 | void ieee80211_mgd_teardown(struct ieee80211_sub_if_data *sdata); | 1213 | void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata); |
1214 | 1214 | ||
1215 | /* IBSS code */ | 1215 | /* IBSS code */ |
1216 | void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local); | 1216 | void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local); |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 401c01f0731e..c20051b7ffcd 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -486,6 +486,8 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata, | |||
486 | /* free all potentially still buffered bcast frames */ | 486 | /* free all potentially still buffered bcast frames */ |
487 | local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps_bc_buf); | 487 | local->total_ps_buffered -= skb_queue_len(&sdata->u.ap.ps_bc_buf); |
488 | skb_queue_purge(&sdata->u.ap.ps_bc_buf); | 488 | skb_queue_purge(&sdata->u.ap.ps_bc_buf); |
489 | } else if (sdata->vif.type == NL80211_IFTYPE_STATION) { | ||
490 | ieee80211_mgd_stop(sdata); | ||
489 | } | 491 | } |
490 | 492 | ||
491 | if (going_down) | 493 | if (going_down) |
@@ -644,8 +646,6 @@ static void ieee80211_teardown_sdata(struct net_device *dev) | |||
644 | 646 | ||
645 | if (ieee80211_vif_is_mesh(&sdata->vif)) | 647 | if (ieee80211_vif_is_mesh(&sdata->vif)) |
646 | mesh_rmc_free(sdata); | 648 | mesh_rmc_free(sdata); |
647 | else if (sdata->vif.type == NL80211_IFTYPE_STATION) | ||
648 | ieee80211_mgd_teardown(sdata); | ||
649 | 649 | ||
650 | flushed = sta_info_flush(local, sdata); | 650 | flushed = sta_info_flush(local, sdata); |
651 | WARN_ON(flushed); | 651 | WARN_ON(flushed); |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index f76da5b3f5c5..20c680bfc3ae 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -3497,7 +3497,7 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata, | |||
3497 | return 0; | 3497 | return 0; |
3498 | } | 3498 | } |
3499 | 3499 | ||
3500 | void ieee80211_mgd_teardown(struct ieee80211_sub_if_data *sdata) | 3500 | void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata) |
3501 | { | 3501 | { |
3502 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 3502 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
3503 | 3503 | ||