]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.0.1/ath9k_hw-fix-incorrect-key_miss-handling.patch
fixes for 4.19
[thirdparty/kernel/stable-queue.git] / releases / 3.0.1 / ath9k_hw-fix-incorrect-key_miss-handling.patch
CommitLineData
f69172f7
GKH
1From 0472ade031b5c0c69c21cf96acf64c50eb9ba3c2 Mon Sep 17 00:00:00 2001
2From: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
3Date: Tue, 12 Jul 2011 00:02:56 +0530
4Subject: ath9k_hw: Fix incorrect key_miss handling
5
6From: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
7
8commit 0472ade031b5c0c69c21cf96acf64c50eb9ba3c2 upstream.
9
10Decryping frames on key_miss handling shouldn't be done for Michael
11MIC failed frames as h/w would have already decrypted such frames
12successfully anyway.
13
14Also leaving CRC and PHY error(where the frame is going to be dropped
15anyway), we are left to prcoess Decrypt error for which s/w decrypt is
16selected anway and so having key_miss as a separate check doesn't serve
17anything. So making key_miss handling mutually exlusive with other RX
18status handling makes much more sense.
19
20This patch addresses an issue with STA not reporting MIC failure events
21resulting in STA being disconnected immediately.
22
23Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
24Signed-off-by: John W. Linville <linville@tuxdriver.com>
25Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
26
27---
28 drivers/net/wireless/ath/ath9k/ar9003_mac.c | 3 +--
29 drivers/net/wireless/ath/ath9k/mac.c | 3 +--
30 2 files changed, 2 insertions(+), 4 deletions(-)
31
32--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
33+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
34@@ -629,8 +629,7 @@ int ath9k_hw_process_rxdesc_edma(struct
35 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
36 else if (rxsp->status11 & AR_MichaelErr)
37 rxs->rs_status |= ATH9K_RXERR_MIC;
38-
39- if (rxsp->status11 & AR_KeyMiss)
40+ else if (rxsp->status11 & AR_KeyMiss)
41 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
42 }
43
44--- a/drivers/net/wireless/ath/ath9k/mac.c
45+++ b/drivers/net/wireless/ath/ath9k/mac.c
46@@ -645,8 +645,7 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
47 rs->rs_status |= ATH9K_RXERR_DECRYPT;
48 else if (ads.ds_rxstatus8 & AR_MichaelErr)
49 rs->rs_status |= ATH9K_RXERR_MIC;
50-
51- if (ads.ds_rxstatus8 & AR_KeyMiss)
52+ else if (ads.ds_rxstatus8 & AR_KeyMiss)
53 rs->rs_status |= ATH9K_RXERR_DECRYPT;
54 }
55