ath9k_hw: handle rx key miss
PATCH 1/1 ath9k_hw: handle rx key miss
If AR_KeyMiss is set in the rx descriptor and AR_RxFrameOK is unset, the hardware could not locate a valid key during a decryption attempt.
In this case, the frame must not be reported as decrypted, otherwise mac80211 sees only random garbage.
Signed-off-by Felix Fietkau <[email protected]>
--- drivers/net/wireless/ath/ath9k/ar9003_mac.c | 3 ++- drivers/net/wireless/ath/ath9k/mac.c | 2 ++ 2 files changed, 4 insertions(+), 1 deletions(-)
drivers/net/wireless/ath/ath9k/ar9003_mac.c +2 -1
@@ -616,7 +616,8 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs, rxs->rs_status |=ATH9K_RXERR_DECRYPT ; }else if (rxsp->status11 & AR_MichaelErr) { rxs->rs_status |=ATH9K_RXERR_MIC ; - } + }else if (rxsp->status11 & AR_KeyMiss) + rxs->rs_status |=ATH9K_RXERR_DECRYPT ; }return 0 ;
drivers/net/wireless/ath/ath9k/mac.c +2 -0
@@ -714,6 +714,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,else if ((ads.ds_rxstatus8 & AR_MichaelErr) && rs->rs_keyix !=ATH9K_RXKEYIX_INVALID ) rs->rs_status |=ATH9K_RXERR_MIC ; +else if (ads.ds_rxstatus8 & AR_KeyMiss) + rs->rs_status |=ATH9K_RXERR_DECRYPT ; }return 0 ;
Signature · 1 line
1.7.2.2