ath9k_hw: fix A-MPDU key search issues on AR9003
authorFelix Fietkau <nbd@openwrt.org>
Mon, 22 Nov 2010 14:39:39 +0000 (15:39 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Nov 2010 20:58:55 +0000 (15:58 -0500)
Under load, a large number of frames can produce decryption errors, even when
no key cache update is being done. Performing a key search for every single
frame in an A-MPDU improves reliability.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/reg.h

index fd4fdb57e57047d45a37709fe40fb956137cd4d2..c686987c4840bb254c11845575289e183d76bbdd 100644 (file)
@@ -1817,6 +1817,10 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
 
        ah->misc_mode |= AR_PCU_MIC_NEW_LOC_ENA;
 
+       /* enable key search for every frame in an aggregate */
+       if (AR_SREV_9300_20_OR_LATER(ah))
+               ah->misc_mode |= AR_PCU_ALWAYS_PERFORM_KEYSEARCH;
+
        pCap->low_2ghz_chan = 2312;
        pCap->high_2ghz_chan = 2732;
 
index 60826b82f4a2e9e6c51bf15ae886deb8642a5ee9..f6058b439fb306d205ed7638ec11fe7f34c99a1b 100644 (file)
@@ -1568,6 +1568,7 @@ enum {
 #define AR_PCU_TBTT_PROTECT        0x00200000
 #define AR_PCU_CLEAR_VMF           0x01000000
 #define AR_PCU_CLEAR_BA_VALID      0x04000000
+#define AR_PCU_ALWAYS_PERFORM_KEYSEARCH 0x10000000
 
 #define AR_PCU_BT_ANT_PREVENT_RX   0x00100000
 #define AR_PCU_BT_ANT_PREVENT_RX_S 20