If the hardware reports an rx key miss, then the frame has not been decrypted at all, and this must be recognized by the software, otherwise mac80211 can generate bogus MIC failure events. Fix this by reporting an invalid key index if a key miss is detected in the rx status. Signed-off-by: Felix Fietkau <nbd@xxxxxxxxxxx> Cc: stable@xxxxxxxxxx --- drivers/net/wireless/ath/ath9k/ar9003_mac.c | 3 +++ drivers/net/wireless/ath/ath9k/mac.c | 2 ++ 2 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c index 06ef710..9de8554 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c @@ -578,6 +578,9 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs, if (rxsp->status11 & AR_DecryptBusyErr) rxs->rs_flags |= ATH9K_RX_DECRYPT_BUSY; + if (rxsp->status11 & AR_KeyMiss) + rxs->rs_keyix = ATH9K_RXKEYIX_INVALID; + if ((rxsp->status11 & AR_RxFrameOK) == 0) { if (rxsp->status11 & AR_CRCErr) { rxs->rs_status |= ATH9K_RXERR_CRC; diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index e955bb9..8d0bb5a 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c @@ -701,6 +701,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds, rs->rs_flags |= ATH9K_RX_DELIM_CRC_POST; if (ads.ds_rxstatus8 & AR_DecryptBusyErr) rs->rs_flags |= ATH9K_RX_DECRYPT_BUSY; + if (ads.ds_rxstatus8 & AR_KeyMiss) + rs->rs_keyix = ATH9K_RXKEYIX_INVALID; if ((ads.ds_rxstatus8 & AR_RxFrameOK) == 0) { if (ads.ds_rxstatus8 & AR_CRCErr) -- 1.6.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html