diff options
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/cfg80211.c | 8 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 635b592ad961..a427a16bb739 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c | |||
@@ -1346,7 +1346,7 @@ static void ath_tx_status(void *priv, struct ieee80211_supported_band *sband, | |||
1346 | fc = hdr->frame_control; | 1346 | fc = hdr->frame_control; |
1347 | for (i = 0; i < sc->hw->max_rates; i++) { | 1347 | for (i = 0; i < sc->hw->max_rates; i++) { |
1348 | struct ieee80211_tx_rate *rate = &tx_info->status.rates[i]; | 1348 | struct ieee80211_tx_rate *rate = &tx_info->status.rates[i]; |
1349 | if (!rate->count) | 1349 | if (rate->idx < 0 || !rate->count) |
1350 | break; | 1350 | break; |
1351 | 1351 | ||
1352 | final_ts_idx = i; | 1352 | final_ts_idx = i; |
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c index c3b6c4652cd6..5b2972b43b0e 100644 --- a/drivers/net/wireless/mwifiex/cfg80211.c +++ b/drivers/net/wireless/mwifiex/cfg80211.c | |||
@@ -841,7 +841,12 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, | |||
841 | ret = mwifiex_set_rf_channel(priv, channel, | 841 | ret = mwifiex_set_rf_channel(priv, channel, |
842 | priv->adapter->channel_type); | 842 | priv->adapter->channel_type); |
843 | 843 | ||
844 | ret = mwifiex_set_encode(priv, NULL, 0, 0, 1); /* Disable keys */ | 844 | /* As this is new association, clear locally stored |
845 | * keys and security related flags */ | ||
846 | priv->sec_info.wpa_enabled = false; | ||
847 | priv->sec_info.wpa2_enabled = false; | ||
848 | priv->wep_key_curr_index = 0; | ||
849 | ret = mwifiex_set_encode(priv, NULL, 0, 0, 1); | ||
845 | 850 | ||
846 | if (mode == NL80211_IFTYPE_ADHOC) { | 851 | if (mode == NL80211_IFTYPE_ADHOC) { |
847 | /* "privacy" is set only for ad-hoc mode */ | 852 | /* "privacy" is set only for ad-hoc mode */ |
@@ -886,6 +891,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid, | |||
886 | dev_dbg(priv->adapter->dev, | 891 | dev_dbg(priv->adapter->dev, |
887 | "info: setting wep encryption" | 892 | "info: setting wep encryption" |
888 | " with key len %d\n", sme->key_len); | 893 | " with key len %d\n", sme->key_len); |
894 | priv->wep_key_curr_index = sme->key_idx; | ||
889 | ret = mwifiex_set_encode(priv, sme->key, sme->key_len, | 895 | ret = mwifiex_set_encode(priv, sme->key, sme->key_len, |
890 | sme->key_idx, 0); | 896 | sme->key_idx, 0); |
891 | } | 897 | } |