summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEliad Peller2011-08-14 12:17:30 +0200
committerLuciano Coelho2011-08-22 11:35:29 +0200
commit7f97b487c4a9634afc008a76ff26268147d7ee8e (patch)
tree54ed6b4487362e3250ef3ca3e032b631b3d5d076
parentwl12xx: AP-mode - configure HT rate support to the FW (diff)
downloadkernel-qcow2-linux-7f97b487c4a9634afc008a76ff26268147d7ee8e.tar.gz
kernel-qcow2-linux-7f97b487c4a9634afc008a76ff26268147d7ee8e.tar.xz
kernel-qcow2-linux-7f97b487c4a9634afc008a76ff26268147d7ee8e.zip
wl12xx: use ap_bcast_hlid for recorded keys
when the key was recorded, wl->ap_bcast_hlid was invalid (since the role wasn't started), so when configuring the key we need to use the current ap_bcast_hlid. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
-rw-r--r--drivers/net/wireless/wl12xx/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 0a0b4b634bd4..360e33ed3ddb 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -2533,14 +2533,19 @@ static int wl1271_ap_init_hwenc(struct wl1271 *wl)
bool wep_key_added = false;
for (i = 0; i < MAX_NUM_KEYS; i++) {
+ u8 hlid;
if (wl->recorded_ap_keys[i] == NULL)
break;
key = wl->recorded_ap_keys[i];
+ hlid = key->hlid;
+ if (hlid == WL12XX_INVALID_LINK_ID)
+ hlid = wl->ap_bcast_hlid;
+
ret = wl1271_cmd_set_ap_key(wl, KEY_ADD_OR_REPLACE,
key->id, key->key_type,
key->key_size, key->key,
- key->hlid, key->tx_seq_32,
+ hlid, key->tx_seq_32,
key->tx_seq_16);
if (ret < 0)
goto out;