From: Vipin Mehta <vmehta@atheros.com>
To: <greg@kroah.com>
Cc: <linux-wireless@vger.kernel.org>, <vmehta@atheros.com>,
<devel@driverdev.osuosl.org>
Subject: [PATCH 02/15] staging: ath6kl: Fixing key settings for WPA/WPA2
Date: Fri, 18 Feb 2011 13:13:03 -0800 [thread overview]
Message-ID: <1298063596-2096-2-git-send-email-vmehta@atheros.com> (raw)
In-Reply-To: <1298063596-2096-1-git-send-email-vmehta@atheros.com>
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>
---
drivers/staging/ath6kl/os/linux/cfg80211.c | 8 +++++++-
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 1a4e315..b7742d4 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) {
--
1.6.3.3
next prev parent reply other threads:[~2011-02-18 21:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 21:13 [PATCH 01/15] staging: ath6kl: Fixing a NULL pointer exception Vipin Mehta
2011-02-18 21:13 ` Vipin Mehta [this message]
2011-02-18 21:13 ` [PATCH 03/15] staging: ath6kl: Return correct scan complete status Vipin Mehta
2011-02-18 21:13 ` [PATCH 05/15] staging: ath6kl: Fixing driver initialization for manufacturing mode Vipin Mehta
2011-02-18 21:13 ` [PATCH 07/15] staging: ath6kl: Adding support for txop bursting enable/disable Vipin Mehta
2011-02-18 21:13 ` [PATCH 08/15] staging: ath6kl: Fixing a memory leak Vipin Mehta
2011-02-18 21:13 ` [PATCH 10/15] staging: ath6kl: Add configuration for excessive TX retry threshold Vipin Mehta
2011-02-19 10:00 ` Dan Carpenter
2011-02-18 21:13 ` [PATCH 12/15] staging: ath6kl: Fixing the cached copy of the BSS filter set by user Vipin Mehta
2011-02-18 21:13 ` [PATCH 13/15] staging: ath6kl: Adding state in driver to track the sme state Vipin Mehta
2011-02-18 21:13 ` [PATCH 15/15] staging: ath6kl: Fixing disappearing of scan list due to jiffies wrap over Vipin Mehta
2011-02-18 21:29 ` [PATCH 01/15] staging: ath6kl: Fixing a NULL pointer exception Greg KH
2011-02-18 21:56 ` Joe Perches
2011-02-18 22:40 ` Vipin Mehta
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1298063596-2096-2-git-send-email-vmehta@atheros.com \
--to=vmehta@atheros.com \
--cc=devel@driverdev.osuosl.org \
--cc=greg@kroah.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).