diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-04-17 23:28:10 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-04-19 15:38:06 -0400 |
commit | 93ae2dd2230393566738a5f211ffbaa33b056d56 (patch) | |
tree | 7dc59fdc6e07d2919b16e2def11258c2caa5d615 /drivers/net/wireless/ath/key.c | |
parent | 5519541d5a5f19893546883547e2f0f2e5934df7 (diff) |
ath9k: assign keycache slots to unencrypted stations
Frame filtering relies on having a valid destination index (keycache slot),
to keep track of the destination. Assigning a keycache slot (configured
to unencrypted, with no key data attached) improves powersave handling in
AP mode with no encryption.
The dummy keycache entry for a station is cleared, when a real key gets
added.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/key.c')
-rw-r--r-- | drivers/net/wireless/ath/key.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/key.c b/drivers/net/wireless/ath/key.c index 0d4f39cbdca..a61ef3d6d89 100644 --- a/drivers/net/wireless/ath/key.c +++ b/drivers/net/wireless/ath/key.c @@ -483,6 +483,9 @@ int ath_key_config(struct ath_common *common, memset(&hk, 0, sizeof(hk)); switch (key->cipher) { + case 0: + hk.kv_type = ATH_CIPHER_CLR; + break; case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP104: hk.kv_type = ATH_CIPHER_WEP; @@ -498,7 +501,8 @@ int ath_key_config(struct ath_common *common, } hk.kv_len = key->keylen; - memcpy(hk.kv_val, key->key, key->keylen); + if (key->keylen) + memcpy(hk.kv_val, key->key, key->keylen); if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { switch (vif->type) { |