1 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
2 +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
3 @@ -525,8 +525,8 @@ int ath9k_hw_process_rxdesc_edma(struct
4 rxs->rs_status |= ATH9K_RXERR_DECRYPT;
5 else if (rxsp->status11 & AR_MichaelErr)
6 rxs->rs_status |= ATH9K_RXERR_MIC;
7 - else if (rxsp->status11 & AR_KeyMiss)
8 - rxs->rs_status |= ATH9K_RXERR_DECRYPT;
9 + if (rxsp->status11 & AR_KeyMiss)
10 + rxs->rs_status |= ATH9K_RXERR_KEYMISS;
14 --- a/drivers/net/wireless/ath/ath9k/mac.c
15 +++ b/drivers/net/wireless/ath/ath9k/mac.c
16 @@ -620,8 +620,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
17 rs->rs_status |= ATH9K_RXERR_DECRYPT;
18 else if (ads.ds_rxstatus8 & AR_MichaelErr)
19 rs->rs_status |= ATH9K_RXERR_MIC;
20 - else if (ads.ds_rxstatus8 & AR_KeyMiss)
21 - rs->rs_status |= ATH9K_RXERR_DECRYPT;
22 + if (ads.ds_rxstatus8 & AR_KeyMiss)
23 + rs->rs_status |= ATH9K_RXERR_KEYMISS;
27 --- a/drivers/net/wireless/ath/ath9k/mac.h
28 +++ b/drivers/net/wireless/ath/ath9k/mac.h
29 @@ -181,6 +181,7 @@ struct ath_htc_rx_status {
30 #define ATH9K_RXERR_FIFO 0x04
31 #define ATH9K_RXERR_DECRYPT 0x08
32 #define ATH9K_RXERR_MIC 0x10
33 +#define ATH9K_RXERR_KEYMISS 0x20
35 #define ATH9K_RX_MORE 0x01
36 #define ATH9K_RX_MORE_AGGR 0x02
37 --- a/drivers/net/wireless/ath/ath9k/recv.c
38 +++ b/drivers/net/wireless/ath/ath9k/recv.c
39 @@ -854,6 +854,8 @@ static bool ath9k_rx_accept(struct ath_c
42 if (rx_stats->rs_status != 0) {
45 if (rx_stats->rs_status & ATH9K_RXERR_CRC) {
46 rxs->flag |= RX_FLAG_FAILED_FCS_CRC;
48 @@ -861,7 +863,8 @@ static bool ath9k_rx_accept(struct ath_c
49 if (rx_stats->rs_status & ATH9K_RXERR_PHY)
52 - if (rx_stats->rs_status & ATH9K_RXERR_DECRYPT) {
53 + if ((rx_stats->rs_status & ATH9K_RXERR_DECRYPT) ||
54 + (!is_mc && (rx_stats->rs_status & ATH9K_RXERR_KEYMISS))) {
55 *decrypt_error = true;
58 @@ -871,17 +874,14 @@ static bool ath9k_rx_accept(struct ath_c
59 * decryption and MIC failures. For monitor mode,
60 * we also ignore the CRC error.
62 - if (ah->is_monitoring) {
63 - if (rx_stats->rs_status &
64 - ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC |
68 - if (rx_stats->rs_status &
69 - ~(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC)) {
73 + status_mask = ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC |
74 + ATH9K_RXERR_KEYMISS;
76 + if (ah->is_monitoring)
77 + status_mask |= ATH9K_RXERR_CRC;
79 + if (rx_stats->rs_status & ~status_mask)