mac80211: Refresh patches again
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / subsys / 314-mac80211-fix-fast-rx-encryption-check.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Wed, 16 Dec 2020 21:24:19 +0100
3 Subject: [PATCH] mac80211: fix fast-rx encryption check
4
5 When using WEP, the default unicast key needs to be selected, instead of
6 the STA PTK.
7
8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 ---
10
11 --- a/net/mac80211/rx.c
12 +++ b/net/mac80211/rx.c
13 @@ -4195,6 +4195,8 @@ void ieee80211_check_fast_rx(struct sta_
14
15 rcu_read_lock();
16 key = rcu_dereference(sta->ptk[sta->ptk_idx]);
17 + if (!key)
18 + key = rcu_dereference(sdata->default_unicast_key);
19 if (key) {
20 switch (key->conf.cipher) {
21 case WLAN_CIPHER_SUITE_TKIP: