iwlwifi: mvm: fix beacon protection checks
authorJohannes Berg <johannes.berg@intel.com>
Fri, 26 Mar 2021 10:57:23 +0000 (12:57 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 6 Apr 2021 10:26:36 +0000 (13:26 +0300)
commit65db391dd874db42279713405f29f4ac93682d13
treed4c020ffb220729cf7afac7ad34c6b4e226a3d07
parent39fb06f791429eaee8374ef12634c0fbf68a5a9f
iwlwifi: mvm: fix beacon protection checks

Unfortunately, since beacon protection isn't fully available
yet, we didn't notice that there are problems with it and
that the replay detection isn't working correctly. We were
relying only on mac80211, since iwl_mvm_rx_crypto() exits
when !ieee80211_has_protected(), which is of course true for
protected (but not encrypted) management frames.

Fix this to properly detect protected (but not encrypted)
management frames and handle them - we continue to only care
about beacons since for others everything can and will be
checked in mac80211.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: b1fdc2505abc ("iwlwifi: mvm: advertise BIGTK client support if available")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210326125611.23c990843369.I09c262a8f6f9852cc8f513cdcb31a7f8f87dd8af@changeid
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c