1 From 3ae74c33c4f799f6bf6d67240a94a0814a8f1944 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@openwrt.org>
3 Date: Tue, 14 Sep 2010 18:38:26 +0200
4 Subject: ath9k_hw: handle rx key miss
6 From: Felix Fietkau <nbd@openwrt.org>
8 commit 3ae74c33c4f799f6bf6d67240a94a0814a8f1944 upstream.
10 If AR_KeyMiss is set in the rx descriptor and AR_RxFrameOK is unset,
11 the hardware could not locate a valid key during a decryption attempt.
13 In this case, the frame must not be reported as decrypted, otherwise
14 mac80211 sees only random garbage.
16 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
17 Signed-off-by: John W. Linville <linville@tuxdriver.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
21 drivers/net/wireless/ath/ath9k/ar9003_mac.c | 3 ++-
22 drivers/net/wireless/ath/ath9k/mac.c | 2 ++
23 2 files changed, 4 insertions(+), 1 deletion(-)
25 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
26 +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
27 @@ -616,7 +616,8 @@ int ath9k_hw_process_rxdesc_edma(struct
28 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
29 } else if (rxsp->status11 & AR_MichaelErr) {
30 rxs->rs_status |= ATH9K_RXERR_MIC;
32 + } else if (rxsp->status11 & AR_KeyMiss)
33 + rxs->rs_status |= ATH9K_RXERR_DECRYPT;
37 --- a/drivers/net/wireless/ath/ath9k/mac.c
38 +++ b/drivers/net/wireless/ath/ath9k/mac.c
39 @@ -713,6 +713,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
40 rs->rs_status |= ATH9K_RXERR_DECRYPT;
41 else if (ads.ds_rxstatus8 & AR_MichaelErr)
42 rs->rs_status |= ATH9K_RXERR_MIC;
43 + else if (ads.ds_rxstatus8 & AR_KeyMiss)
44 + rs->rs_status |= ATH9K_RXERR_DECRYPT;