aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/wireless/ath/ath10k/htt_rx.c
diff options
context:
space:
mode:
authorWen Gong <wgong@codeaurora.org>2019-06-03 18:12:21 +0300
committerKalle Valo <kvalo@codeaurora.org>2019-06-25 16:15:35 +0300
commit47ed1b4e5d622a53dbdca2fe75013cc634bb0050 (patch)
tree4e6a7b5c41fe26cea3a93b3056dcfbb98db4d7ed /drivers/net/wireless/ath/ath10k/htt_rx.c
parentath10k: add support for controlling tx power to a station (diff)
downloadwireguard-linux-47ed1b4e5d622a53dbdca2fe75013cc634bb0050.tar.xz
wireguard-linux-47ed1b4e5d622a53dbdca2fe75013cc634bb0050.zip
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>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/htt_rx.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/htt_rx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
index e6d30155ba5c..bdbc32b83f4b 100644
--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -2184,7 +2184,9 @@ static bool ath10k_htt_rx_proc_rx_ind_hl(struct ath10k_htt *htt,
num_mpdu_ranges);
if (mpdu_ranges->mpdu_range_status !=
- HTT_RX_IND_MPDU_STATUS_OK) {
+ HTT_RX_IND_MPDU_STATUS_OK &&
+ mpdu_ranges->mpdu_range_status !=
+ HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR) {
ath10k_warn(ar, "MPDU range status: %d\n",
mpdu_ranges->mpdu_range_status);
goto err;
@@ -2258,6 +2260,9 @@ static bool ath10k_htt_rx_proc_rx_ind_hl(struct ath10k_htt *htt,
rx_status->flag &= ~RX_FLAG_IV_STRIPPED &
~RX_FLAG_MMIC_STRIPPED;
+ if (mpdu_ranges->mpdu_range_status == HTT_RX_IND_MPDU_STATUS_TKIP_MIC_ERR)
+ rx_status->flag |= RX_FLAG_MMIC_ERROR;
+
ieee80211_rx_ni(ar->hw, skb);
/* We have delivered the skb to the upper layers (mac80211) so we