9547db03d11b0d7b04396b3efc27ee37c5c7b1e9
[openwrt/staging/lynxis.git] /
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Sat, 2 Jul 2022 16:41:32 +0200
3 Subject: [PATCH] mac80211: fix queue selection for mesh/OCB interfaces
4
5 When using iTXQ, the code assumes that there is only one vif queue for
6 broadcast packets, using the BE queue. Allowing non-BE queue marking
7 violates that assumption and txq->ac == skb_queue_mapping is no longer
8 guaranteed. This can cause issues with queue handling in the driver and
9 also causes issues with the recent ATF change, resulting in an AQL
10 underflow warning.
11
12 Cc: stable@vger.kernel.org
13 Signed-off-by: Felix Fietkau <nbd@nbd.name>
14 ---
15
16 --- a/net/mac80211/wme.c
17 +++ b/net/mac80211/wme.c
18 @@ -147,8 +147,8 @@ u16 __ieee80211_select_queue(struct ieee
19 bool qos;
20
21 /* all mesh/ocb stations are required to support WME */
22 - if (sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
23 - sdata->vif.type == NL80211_IFTYPE_OCB)
24 + if (sta && (sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
25 + sdata->vif.type == NL80211_IFTYPE_OCB))
26 qos = true;
27 else if (sta)
28 qos = sta->sta.wme;