diff options
author | Michael Skeffington <mike@astro.ai> | 2017-08-07 18:47:36 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-08-08 13:53:36 +0200 |
commit | 2db3aaba0a9fc769435477059c1224c439061752 (patch) | |
tree | cf95b16eddda9d9c30f35faa973a2ce934d1157d /drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | |
parent | rtlwifi: constify rate_control_ops structure (diff) | |
download | linux-2db3aaba0a9fc769435477059c1224c439061752.tar.xz linux-2db3aaba0a9fc769435477059c1224c439061752.zip |
rt2x00: Fix MMIC Countermeasures
Set RX_FLAG_DECRYPTED in case of MMIC failure so that
ieee80211_rx_h_decrypt() doesnt drop the frame before getting to
ieee80211_rx_h_michael_mic_verify().
Signed-off-by: Michael Skeffington <mike@astro.ai>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ralink/rt2x00/rt2800mmio.c')
-rw-r--r-- | drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c index ee5276e233fa..1123e2bed803 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c @@ -136,10 +136,19 @@ void rt2800mmio_fill_rxdone(struct queue_entry *entry, */ rxdesc->flags |= RX_FLAG_MMIC_STRIPPED; - if (rxdesc->cipher_status == RX_CRYPTO_SUCCESS) + if (rxdesc->cipher_status == RX_CRYPTO_SUCCESS) { rxdesc->flags |= RX_FLAG_DECRYPTED; - else if (rxdesc->cipher_status == RX_CRYPTO_FAIL_MIC) + } else if (rxdesc->cipher_status == RX_CRYPTO_FAIL_MIC) { + /* + * In order to check the Michael Mic, the packet must have + * been decrypted. Mac80211 doesnt check the MMIC failure + * flag to initiate MMIC countermeasures if the decoded flag + * has not been set. + */ + rxdesc->flags |= RX_FLAG_DECRYPTED; + rxdesc->flags |= RX_FLAG_MMIC_ERROR; + } } if (rt2x00_get_field32(word, RXD_W3_MY_BSS)) |