summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/cmd.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-06-18 12:01:12 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-06-28 07:48:47 -0400
commit18c96c3497aa871608d57ca5e08de3558159a6c9 (patch)
tree4dfcef0cef103a0312c8aa15dbbbed9056a211e0 /drivers/net/wireless/libertas/cmd.c
parentf8f551089b0ca571b8f95465b6c3e1dd7bcea28e (diff)
downloadkernel-crypto-18c96c3497aa871608d57ca5e08de3558159a6c9.tar.gz
kernel-crypto-18c96c3497aa871608d57ca5e08de3558159a6c9.tar.xz
kernel-crypto-18c96c3497aa871608d57ca5e08de3558159a6c9.zip
[PATCH] libertas: fix WPA associations by handling ENABLE_RSN correctly
Don't clobber the firmware's internal state machine by setting ENABLE_RSN more than once during the 4-way handshake. Check what the ENABLE_RSN status is and only set if it should be changed. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/cmd.c')
-rw-r--r--drivers/net/wireless/libertas/cmd.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 124e029f1bf..13f6528abb0 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -228,17 +228,19 @@ static int wlan_cmd_802_11_enable_rsn(wlan_private * priv,
void * pdata_buf)
{
struct cmd_ds_802_11_enable_rsn *penableRSN = &cmd->params.enbrsn;
- struct assoc_request * assoc_req = pdata_buf;
+ u32 * enable = pdata_buf;
lbs_deb_enter(LBS_DEB_CMD);
cmd->command = cpu_to_le16(cmd_802_11_enable_rsn);
cmd->size = cpu_to_le16(sizeof(*penableRSN) + S_DS_GEN);
penableRSN->action = cpu_to_le16(cmd_action);
- if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) {
- penableRSN->enable = cpu_to_le16(cmd_enable_rsn);
- } else {
- penableRSN->enable = cpu_to_le16(cmd_disable_rsn);
+
+ if (cmd_action == cmd_act_set) {
+ if (*enable)
+ penableRSN->enable = cpu_to_le16(cmd_enable_rsn);
+ else
+ penableRSN->enable = cpu_to_le16(cmd_enable_rsn);
}
lbs_deb_leave(LBS_DEB_CMD);