88b9de105c
mac80211: do not call rate control .tx_status before .rate_init mwifiex: clear previous security setting during association ath9k: stop on rates with idx -1 in ath9k rate control's .tx_status ath9k_hw: prevent writes to const data on AR9160 rt2x00: fix a possible NULL pointer dereference iwlwifi: fix key removal mac80211: zero initialize count field in ieee80211_tx_rate mac80211: Fix a warning on changing to monitor mode from STA brcm80211: smac: fix endless retry of A-MPDU transmissions brcm80211: smac: only print block-ack timeout message at trace level
56 lines
2.2 KiB
Diff
56 lines
2.2 KiB
Diff
From 6670f15b1f6858a43b292d8ab64464e9f085a6aa Mon Sep 17 00:00:00 2001
|
|
From: Amitkumar Karwar <akarwar@marvell.com>
|
|
Date: Thu, 9 Feb 2012 18:32:22 -0800
|
|
Subject: [PATCH] mwifiex: clear previous security setting during association
|
|
|
|
Driver maintains different flags for WEP, WPA, WPA2 security modes.
|
|
Appropriate flag is set using security information provided in
|
|
connect request. mwifiex_is_network_compatible() routine uses them
|
|
to check if driver's setting is compatible with AP. Association is
|
|
aborted if the routine fails.
|
|
|
|
For some corner cases, it is observed that association is failed
|
|
even for valid security information based on association history.
|
|
This patch fixes the problem by clearing previous security setting
|
|
during each association.
|
|
|
|
We should set WEP key provided in connect request as default tx key.
|
|
This missing change is also added here.
|
|
|
|
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
|
|
Signed-off-by: Bing Zhao <bzhao@marvell.com>
|
|
Signed-off-by: John W. Linville <linville@tuxdriver.com>
|
|
---
|
|
drivers/net/wireless/mwifiex/cfg80211.c | 8 +++++++-
|
|
1 files changed, 7 insertions(+), 1 deletions(-)
|
|
|
|
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
|
|
index c3b6c46..5b2972b 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,
|
|
ret = mwifiex_set_rf_channel(priv, channel,
|
|
priv->adapter->channel_type);
|
|
|
|
- ret = mwifiex_set_encode(priv, NULL, 0, 0, 1); /* Disable keys */
|
|
+ /* As this is new association, clear locally stored
|
|
+ * keys and security related flags */
|
|
+ priv->sec_info.wpa_enabled = false;
|
|
+ priv->sec_info.wpa2_enabled = false;
|
|
+ priv->wep_key_curr_index = 0;
|
|
+ ret = mwifiex_set_encode(priv, NULL, 0, 0, 1);
|
|
|
|
if (mode == NL80211_IFTYPE_ADHOC) {
|
|
/* "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,
|
|
dev_dbg(priv->adapter->dev,
|
|
"info: setting wep encryption"
|
|
" with key len %d\n", sme->key_len);
|
|
+ priv->wep_key_curr_index = sme->key_idx;
|
|
ret = mwifiex_set_encode(priv, sme->key, sme->key_len,
|
|
sme->key_idx, 0);
|
|
}
|
|
--
|
|
1.7.4.4
|
|
|