mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 22:47:56 +00:00
45109f69a6
This fixes following compile error seen when
building mac80211 with mesh disabled:
.../backports-5.15.58-1/net/mac80211/agg-rx.c: In function 'ieee80211_send_addba_resp':
...backports-5.15.58-1/net/mac80211/agg-rx.c:255:17: error: 'struct sta_info' has no member named 'mesh'
255 | if (!sta->mesh)
| ^~
sta_info.h shows this item as being optional based on flags:
struct mesh_sta *mesh;
Guard the check to fix this.
Fixes: f96744ba6b
("mac80211: mask nested A-MSDU support for mesh")
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
34 lines
1.3 KiB
Diff
34 lines
1.3 KiB
Diff
From 313d8c18385f10957402b475f9b0c209ceab6c5a Mon Sep 17 00:00:00 2001
|
|
From: David Bauer <mail@david-bauer.net>
|
|
Date: Fri, 8 Oct 2021 00:25:19 +0200
|
|
Subject: [PATCH] mac80211: mask nested A-MSDU support for mesh
|
|
|
|
mac80211 incorrectly processes A-MSDUs contained in A-MPDU frames. This
|
|
results in dropped packets and severely impacted throughput.
|
|
|
|
As a workaround, don't indicate support for A-MSDUs contained in
|
|
A-MPDUs. This improves throughput over mesh links by factor 10.
|
|
|
|
Ref: https://github.com/openwrt/mt76/issues/450
|
|
|
|
Signed-off-by: David Bauer <mail@david-bauer.net>
|
|
---
|
|
net/mac80211/agg-rx.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
--- a/net/mac80211/agg-rx.c
|
|
+++ b/net/mac80211/agg-rx.c
|
|
@@ -251,7 +251,11 @@ static void ieee80211_send_addba_resp(st
|
|
mgmt->u.action.u.addba_resp.action_code = WLAN_ACTION_ADDBA_RESP;
|
|
mgmt->u.action.u.addba_resp.dialog_token = dialog_token;
|
|
|
|
- capab = u16_encode_bits(amsdu, IEEE80211_ADDBA_PARAM_AMSDU_MASK);
|
|
+ capab = 0;
|
|
+#ifdef CONFIG_MAC80211_MESH
|
|
+ if (!sta->mesh)
|
|
+#endif
|
|
+ capab = u16_encode_bits(amsdu, IEEE80211_ADDBA_PARAM_AMSDU_MASK);
|
|
capab |= u16_encode_bits(policy, IEEE80211_ADDBA_PARAM_POLICY_MASK);
|
|
capab |= u16_encode_bits(tid, IEEE80211_ADDBA_PARAM_TID_MASK);
|
|
capab |= u16_encode_bits(buf_size, IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK);
|