aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/common.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-08-28 18:21:21 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-08-31 14:22:23 -0400
commit56363ddeeed3afc5277ca227209773bc1042cc7b (patch)
tree2f92621e743983cb10175bbbd009ae2e167d1054 /drivers/net/wireless/ath/ath9k/common.c
parent3653910714a4a9b19aadb202c24f7b1ae61d3556 (diff)
downloadkernel_samsung_smdk4412-56363ddeeed3afc5277ca227209773bc1042cc7b.zip
kernel_samsung_smdk4412-56363ddeeed3afc5277ca227209773bc1042cc7b.tar.gz
kernel_samsung_smdk4412-56363ddeeed3afc5277ca227209773bc1042cc7b.tar.bz2
ath9k: fix spurious MIC failure reports
According to the hardware documentation, the MIC failure bit is only valid if the frame was decrypted using a valid TKIP key and is not a fragment. In some setups I've seen hardware-reported MIC failures on an AP that was configured for CCMP only, so it's clear that additional checks are necessary. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/common.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common.c b/drivers/net/wireless/ath/ath9k/common.c
index 31cfe46..2dab64b 100644
--- a/drivers/net/wireless/ath/ath9k/common.c
+++ b/drivers/net/wireless/ath/ath9k/common.c
@@ -372,9 +372,13 @@ int ath9k_cmn_key_config(struct ath_common *common,
set_bit(idx, common->keymap);
if (key->cipher == WLAN_CIPHER_SUITE_TKIP) {
set_bit(idx + 64, common->keymap);
+ set_bit(idx, common->tkip_keymap);
+ set_bit(idx + 64, common->tkip_keymap);
if (common->splitmic) {
set_bit(idx + 32, common->keymap);
set_bit(idx + 64 + 32, common->keymap);
+ set_bit(idx + 32, common->tkip_keymap);
+ set_bit(idx + 64 + 32, common->tkip_keymap);
}
}
@@ -399,10 +403,17 @@ void ath9k_cmn_key_delete(struct ath_common *common,
return;
clear_bit(key->hw_key_idx + 64, common->keymap);
+
+ clear_bit(key->hw_key_idx, common->tkip_keymap);
+ clear_bit(key->hw_key_idx + 64, common->tkip_keymap);
+
if (common->splitmic) {
ath9k_hw_keyreset(ah, key->hw_key_idx + 32);
clear_bit(key->hw_key_idx + 32, common->keymap);
clear_bit(key->hw_key_idx + 64 + 32, common->keymap);
+
+ clear_bit(key->hw_key_idx + 32, common->tkip_keymap);
+ clear_bit(key->hw_key_idx + 64 + 32, common->tkip_keymap);
}
}
EXPORT_SYMBOL(ath9k_cmn_key_delete);