summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-12-18 19:47:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-02-10 09:09:24 +0100
commit3fb9aa619423539b21dc6801075411f57cd40dd0 (patch)
tree0b073f1e51e156f9b40e8cfb145ec947be9e80e1
parent4a058d556d3f53178e338746bc90734b025e8d58 (diff)
downloadlinux-3fb9aa619423539b21dc6801075411f57cd40dd0.tar.gz
linux-3fb9aa619423539b21dc6801075411f57cd40dd0.tar.bz2
linux-3fb9aa619423539b21dc6801075411f57cd40dd0.zip
mac80211: fix fast-rx encryption check
[ Upstream commit 622d3b4e39381262da7b18ca1ed1311df227de86 ] When using WEP, the default unicast key needs to be selected, instead of the STA PTK. Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://lore.kernel.org/r/20201218184718.93650-5-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--net/mac80211/rx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 9be82ed02e0e..c38d68131d02 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -3802,6 +3802,8 @@ void ieee80211_check_fast_rx(struct sta_info *sta)
rcu_read_lock();
key = rcu_dereference(sta->ptk[sta->ptk_idx]);
+ if (!key)
+ key = rcu_dereference(sdata->default_unicast_key);
if (key) {
switch (key->conf.cipher) {
case WLAN_CIPHER_SUITE_TKIP: