summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorVipin Mehta <vmehta@atheros.com>2011-02-18 13:13:03 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-18 13:28:49 -0800
commite8763b5fe88a0ef8858cd614d961578d34b673a0 (patch)
treee2f25c1e86575778e891d34d15dd58ca8cbf9132 /drivers/staging
parentda101d563503d399d92412e833b6d5ae49c8ee5d (diff)
staging: ath6kl: Fixing key settings for WPA/WPA2
A bug was observed during the reconnection phase in the WPA/WPA2-PSK scenario where the EAPOL frames were going encrypted during an auto reconnection attempt. The initial 4-way handshake would go fine but then the driver was getting a command to set default keys sometime later. Setting of an incorrect flag (TX_USAGE) in the hadrware was causing the EAPOL frames during the subsequent 4-way handshake attempts to go encrypted causing the AP to reject the station. Signed-off-by: Vipin Mehta <vmehta@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/ath6kl/os/linux/cfg80211.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/ath6kl/os/linux/cfg80211.c b/drivers/staging/ath6kl/os/linux/cfg80211.c
index 1a4e315bab6..b7742d435e2 100644
--- a/drivers/staging/ath6kl/os/linux/cfg80211.c
+++ b/drivers/staging/ath6kl/os/linux/cfg80211.c
@@ -983,6 +983,7 @@ ar6k_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *ndev,
AR_SOFTC_T *ar = (AR_SOFTC_T *)ar6k_priv(ndev);
struct ar_key *key = NULL;
int status = 0;
+ u8 key_usage;
AR_DEBUG_PRINTF(ATH_DEBUG_INFO, ("%s: index %d\n", __func__, key_index));
@@ -1011,8 +1012,13 @@ ar6k_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *ndev,
ar->arDefTxKeyIndex = key_index;
key = &ar->keys[ar->arDefTxKeyIndex];
+ key_usage = GROUP_USAGE;
+ if (WEP_CRYPT == ar->arPairwiseCrypto) {
+ key_usage |= TX_USAGE;
+ }
+
status = wmi_addKey_cmd(ar->arWmi, ar->arDefTxKeyIndex,
- ar->arPairwiseCrypto, GROUP_USAGE | TX_USAGE,
+ ar->arPairwiseCrypto, key_usage,
key->key_len, key->seq, key->key, KEY_OP_INIT_VAL,
NULL, SYNC_BOTH_WMIFLAG);
if (status) {