Commit 2bcde51d authored by Dan Williams's avatar Dan Williams Committed by David S. Miller

[PATCH] libertas: problems setting wpa keys

The 88w8385 chip, using SDIO interface and firmware release 5.0.11p0,
has problems when both unicast and multicast WPA keys are set in one
command. This patch ensures the keys are set independently.

The original author of this patch is Marc Pignat <marc.pignat@hevs.ch>
Signed-off-by: default avatarMarc Pignat <marc.pignat@hevs.ch>
Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 515ea249
...@@ -374,15 +374,40 @@ static int assoc_helper_wpa_keys(wlan_private *priv, ...@@ -374,15 +374,40 @@ static int assoc_helper_wpa_keys(wlan_private *priv,
struct assoc_request * assoc_req) struct assoc_request * assoc_req)
{ {
int ret = 0; int ret = 0;
unsigned int flags = assoc_req->flags;
lbs_deb_enter(LBS_DEB_ASSOC); lbs_deb_enter(LBS_DEB_ASSOC);
/* Work around older firmware bug where WPA unicast and multicast
* keys must be set independently. Seen in SDIO parts with firmware
* version 5.0.11p0.
*/
if (test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) {
clear_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags);
ret = libertas_prepare_and_send_command(priv, ret = libertas_prepare_and_send_command(priv,
CMD_802_11_KEY_MATERIAL, CMD_802_11_KEY_MATERIAL,
CMD_ACT_SET, CMD_ACT_SET,
CMD_OPTION_WAITFORRSP, CMD_OPTION_WAITFORRSP,
0, assoc_req); 0, assoc_req);
assoc_req->flags = flags;
}
if (ret)
goto out;
if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) {
clear_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags);
ret = libertas_prepare_and_send_command(priv,
CMD_802_11_KEY_MATERIAL,
CMD_ACT_SET,
CMD_OPTION_WAITFORRSP,
0, assoc_req);
assoc_req->flags = flags;
}
out:
lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret); lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment