]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/2.6.36.2/ath9k_hw-handle-rx-key-miss.patch
Fixes for 5.10
[thirdparty/kernel/stable-queue.git] / releases / 2.6.36.2 / ath9k_hw-handle-rx-key-miss.patch
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
5
6 From: Felix Fietkau <nbd@openwrt.org>
7
8 commit 3ae74c33c4f799f6bf6d67240a94a0814a8f1944 upstream.
9
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.
12
13 In this case, the frame must not be reported as decrypted, otherwise
14 mac80211 sees only random garbage.
15
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>
19
20 ---
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(-)
24
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;
31 - }
32 + } else if (rxsp->status11 & AR_KeyMiss)
33 + rxs->rs_status |= ATH9K_RXERR_DECRYPT;
34 }
35
36 return 0;
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;
45 }
46
47 return 0;