aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/cfg80211.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex/cfg80211.c')
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index c3b6c4652cd6..2210a0f9af2d 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -841,7 +841,13 @@ 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 priv->sec_info.encryption_mode = 0;
850 ret = mwifiex_set_encode(priv, NULL, 0, 0, 1);
845 851
846 if (mode == NL80211_IFTYPE_ADHOC) { 852 if (mode == NL80211_IFTYPE_ADHOC) {
847 /* "privacy" is set only for ad-hoc mode */ 853 /* "privacy" is set only for ad-hoc mode */
@@ -886,6 +892,7 @@ mwifiex_cfg80211_assoc(struct mwifiex_private *priv, size_t ssid_len, u8 *ssid,
886 dev_dbg(priv->adapter->dev, 892 dev_dbg(priv->adapter->dev,
887 "info: setting wep encryption" 893 "info: setting wep encryption"
888 " with key len %d\n", sme->key_len); 894 " with key len %d\n", sme->key_len);
895 priv->wep_key_curr_index = sme->key_idx;
889 ret = mwifiex_set_encode(priv, sme->key, sme->key_len, 896 ret = mwifiex_set_encode(priv, sme->key, sme->key_len,
890 sme->key_idx, 0); 897 sme->key_idx, 0);
891 } 898 }