aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2022-09-28 13:57:55 +0200
committerFelix Fietkau <nbd@nbd.name>2022-11-10 14:49:50 +0100
commitbfeffb8aed20a05b2d6a63a71f2248178b8655c7 (patch)
treeb290a4ce0e4662380614f114ded94ca89f62674a /package/kernel/mac80211
parent88c43b58872babc62274f42579876d13f0a38e22 (diff)
downloadupstream-bfeffb8aed20a05b2d6a63a71f2248178b8655c7.tar.gz
upstream-bfeffb8aed20a05b2d6a63a71f2248178b8655c7.tar.bz2
upstream-bfeffb8aed20a05b2d6a63a71f2248178b8655c7.zip
mac80211: fix decap offload for stations on AP_VLAN interfaces
Signed-off-by: Felix Fietkau <nbd@nbd.name> (cherry-picked from commit eb07020de2b4a5f89579f09f5060d4b9f070a356)
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/patches/subsys/343-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/343-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch b/package/kernel/mac80211/patches/subsys/343-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch
new file mode 100644
index 0000000000..0feb408d21
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/343-wifi-mac80211-fix-decap-offload-for-stations-on-AP_V.patch
@@ -0,0 +1,37 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Wed, 28 Sep 2022 13:50:34 +0200
+Subject: [PATCH] wifi: mac80211: fix decap offload for stations on AP_VLAN
+ interfaces
+
+Since AP_VLAN interfaces are not passed to the driver, check offload_flags
+on the bss vif instead.
+
+Reported-by: Howard Hsu <howard-yh.hsu@mediatek.com>
+Fixes: 80a915ec4427 ("mac80211: add rx decapsulation offload support")
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -4265,6 +4265,7 @@ void ieee80211_check_fast_rx(struct sta_
+ .vif_type = sdata->vif.type,
+ .control_port_protocol = sdata->control_port_protocol,
+ }, *old, *new = NULL;
++ u32 offload_flags;
+ bool set_offload = false;
+ bool assign = false;
+ bool offload;
+@@ -4380,10 +4381,10 @@ void ieee80211_check_fast_rx(struct sta_
+ if (assign)
+ new = kmemdup(&fastrx, sizeof(fastrx), GFP_KERNEL);
+
+- offload = assign &&
+- (sdata->vif.offload_flags & IEEE80211_OFFLOAD_DECAP_ENABLED);
++ offload_flags = get_bss_sdata(sdata)->vif.offload_flags;
++ offload = offload_flags & IEEE80211_OFFLOAD_DECAP_ENABLED;
+
+- if (offload)
++ if (assign && offload)
+ set_offload = !test_and_set_sta_flag(sta, WLAN_STA_DECAP_OFFLOAD);
+ else
+ set_offload = test_and_clear_sta_flag(sta, WLAN_STA_DECAP_OFFLOAD);