Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ath10k: add report MIC error for sdio chip

Firmware will report flag with HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR
if MIC error, the flag will be used in mac80211.

ieee80211_rx_h_michael_mic_verify will check the flag and start TKIP
countermeasures.

Now countermeasure tests pass both with WPA only and WPA2/WPA mixed
mode.

Tested with QCA6174 SDIO with firmware
WLAN.RMH.4.4.1-00007-QCARMSWP-1.

Signed-off-by: Wen Gong <wgong@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>

authored by

Wen Gong and committed by
Kalle Valo
47ed1b4e 33410a51

+6 -1
+6 -1
drivers/net/wireless/ath/ath10k/htt_rx.c
··· 2184 2184 num_mpdu_ranges); 2185 2185 2186 2186 if (mpdu_ranges->mpdu_range_status != 2187 - HTT_RX_IND_MPDU_STATUS_OK) { 2187 + HTT_RX_IND_MPDU_STATUS_OK && 2188 + mpdu_ranges->mpdu_range_status != 2189 + HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR) { 2188 2190 ath10k_warn(ar, "MPDU range status: %d\n", 2189 2191 mpdu_ranges->mpdu_range_status); 2190 2192 goto err; ··· 2259 2257 if (tkip_mic_type == HTT_RX_TKIP_MIC) 2260 2258 rx_status->flag &= ~RX_FLAG_IV_STRIPPED & 2261 2259 ~RX_FLAG_MMIC_STRIPPED; 2260 + 2261 + if (mpdu_ranges->mpdu_range_status == HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR) 2262 + rx_status->flag |= RX_FLAG_MMIC_ERROR; 2262 2263 2263 2264 ieee80211_rx_ni(ar->hw, skb); 2264 2265