diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-02-05 15:15:17 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-06 11:34:02 -0500 |
commit | f88373fa47f3ce6590fdfaa742d0ddacc2ae017f (patch) | |
tree | 806086755a4ba5bb35674d8960bccce552d1c3cc /drivers/net | |
parent | 2da8cbf8a6b454296c9db7b57cac72d5a39e3aa7 (diff) |
ath9k: fix a WEP crypto related regression
commit b4a82a0 "ath9k_hw: fix interpretation of the rx KeyMiss flag"
fixed the interpretation of the KeyMiss flag for keycache based lookups,
however WEP encryption uses a static index, so KeyMiss is always asserted
for it, even though frames are decrypted properly.
Fix this by clearing the ATH9K_RXERR_KEYMISS flag if no keycache based
lookup was performed.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@vger.kernel.org
Reported-by: Laurent Bonnans <bonnans.l@gmail.com>
Reported-by: Jurica Vukadin <u.ra604@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 0e666fbe0842..7e1a91af1497 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -822,6 +822,14 @@ static bool ath9k_rx_accept(struct ath_common *common, | |||
822 | (ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC | | 822 | (ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC | |
823 | ATH9K_RXERR_KEYMISS)); | 823 | ATH9K_RXERR_KEYMISS)); |
824 | 824 | ||
825 | /* | ||
826 | * Key miss events are only relevant for pairwise keys where the | ||
827 | * descriptor does contain a valid key index. This has been observed | ||
828 | * mostly with CCMP encryption. | ||
829 | */ | ||
830 | if (rx_stats->rs_keyix == ATH9K_RXKEYIX_INVALID) | ||
831 | rx_stats->rs_status &= ~ATH9K_RXERR_KEYMISS; | ||
832 | |||
825 | if (!rx_stats->rs_datalen) | 833 | if (!rx_stats->rs_datalen) |
826 | return false; | 834 | return false; |
827 | /* | 835 | /* |