From 18c96c3497aa871608d57ca5e08de3558159a6c9 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 18 Jun 2007 12:01:12 -0400 Subject: [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 Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/cmd.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'drivers/net/wireless/libertas/cmd.c') diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index 124e029f1bf4..13f6528abb00 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); -- cgit v1.2.2