diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-12-18 21:47:17 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-07 16:47:41 +0300 |
commit | 85f610963786f7a3853445918eb2cdcd177fd76d (patch) | |
tree | 4cda1684e4240e23e671039e3b9bd5a905f062e7 | |
parent | d2ab7ca11035a7024398e7d4439691fb9a58a11c (diff) | |
download | linux-85f610963786f7a3853445918eb2cdcd177fd76d.tar.xz |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 04ae9de55d74..48c6aa337c92 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3823,6 +3823,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: |