diff options
author | Dan Williams <dcbw@redhat.com> | 2007-06-18 12:01:12 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-06-28 07:48:47 -0400 |
commit | 18c96c3497aa871608d57ca5e08de3558159a6c9 (patch) | |
tree | 4dfcef0cef103a0312c8aa15dbbbed9056a211e0 /drivers/net/wireless/libertas/cmd.c | |
parent | f8f551089b0ca571b8f95465b6c3e1dd7bcea28e (diff) |
[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.c | 12 |
1 files changed, 7 insertions, 5 deletions
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, | |||
228 | void * pdata_buf) | 228 | void * pdata_buf) |
229 | { | 229 | { |
230 | struct cmd_ds_802_11_enable_rsn *penableRSN = &cmd->params.enbrsn; | 230 | struct cmd_ds_802_11_enable_rsn *penableRSN = &cmd->params.enbrsn; |
231 | struct assoc_request * assoc_req = pdata_buf; | 231 | u32 * enable = pdata_buf; |
232 | 232 | ||
233 | lbs_deb_enter(LBS_DEB_CMD); | 233 | lbs_deb_enter(LBS_DEB_CMD); |
234 | 234 | ||
235 | cmd->command = cpu_to_le16(cmd_802_11_enable_rsn); | 235 | cmd->command = cpu_to_le16(cmd_802_11_enable_rsn); |
236 | cmd->size = cpu_to_le16(sizeof(*penableRSN) + S_DS_GEN); | 236 | cmd->size = cpu_to_le16(sizeof(*penableRSN) + S_DS_GEN); |
237 | penableRSN->action = cpu_to_le16(cmd_action); | 237 | penableRSN->action = cpu_to_le16(cmd_action); |
238 | if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) { | 238 | |
239 | penableRSN->enable = cpu_to_le16(cmd_enable_rsn); | 239 | if (cmd_action == cmd_act_set) { |
240 | } else { | 240 | if (*enable) |
241 | penableRSN->enable = cpu_to_le16(cmd_disable_rsn); | 241 | penableRSN->enable = cpu_to_le16(cmd_enable_rsn); |
242 | else | ||
243 | penableRSN->enable = cpu_to_le16(cmd_enable_rsn); | ||
242 | } | 244 | } |
243 | 245 | ||
244 | lbs_deb_leave(LBS_DEB_CMD); | 246 | lbs_deb_leave(LBS_DEB_CMD); |