Skip to content

Commit

Permalink
libertas: copy WPA keys to priv when associating
Browse files Browse the repository at this point in the history
Libertas currently maintains a copy of the WPA unicast and group keys
when using WPA or WPA2.  This copy is checked when deciding whether or
not to return to sleep in IEEE PS mode but the actual copying back to
priv was omitted, which breaks IEEE PS mode with WPA/WPA2 when one
issues commands that require temporarily keeping the device awake.

This patch introduces the omitted copy-back of the keys so that IEEE PS
functions correctly in WPA/WPA2 mode.  Thanks to Dan Williams for
clearing up the issue.

V2: fix typo.  Also, this has been tested on GSPI and SDIO with V9 firmware.

Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Andrey Yurovsky authored and John W. Linville committed Jul 10, 2009
1 parent 9834c07 commit ce8d096
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/wireless/libertas/assoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1368,11 +1368,17 @@ static int assoc_helper_wpa_keys(struct lbs_private *priv,
if (ret)
goto out;

memcpy(&priv->wpa_unicast_key, &assoc_req->wpa_unicast_key,
sizeof(struct enc_key));

if (test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) {
clear_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags);

ret = lbs_cmd_802_11_key_material(priv, CMD_ACT_SET, assoc_req);
assoc_req->flags = flags;

memcpy(&priv->wpa_mcast_key, &assoc_req->wpa_mcast_key,
sizeof(struct enc_key));
}

out:
Expand Down

0 comments on commit ce8d096

Please sign in to comment.