Skip to content

Commit 4e348c6

Browse files
nbd168jmberg-intel
authored andcommitted
wifi: mac80211: fix qos on mesh interfaces
When ieee80211_select_queue is called for mesh, the sta pointer is usually NULL, since the nexthop is looked up much later in the tx path. Explicitly check for unicast address in that case in order to make qos work again. Cc: [email protected] Fixes: 50e2ab3 ("wifi: mac80211: fix queue selection for mesh/OCB interfaces") Signed-off-by: Felix Fietkau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]>
1 parent 923bf98 commit 4e348c6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

net/mac80211/wme.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,17 @@ u16 ieee80211_select_queue_80211(struct ieee80211_sub_if_data *sdata,
147147
u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
148148
struct sta_info *sta, struct sk_buff *skb)
149149
{
150+
const struct ethhdr *eth = (void *)skb->data;
150151
struct mac80211_qos_map *qos_map;
151152
bool qos;
152153

153154
/* Ensure hash is set prior to potential SW encryption */
154155
skb_get_hash(skb);
155156

156157
/* all mesh/ocb stations are required to support WME */
157-
if (sta && (sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
158-
sdata->vif.type == NL80211_IFTYPE_OCB))
158+
if ((sdata->vif.type == NL80211_IFTYPE_MESH_POINT &&
159+
!is_multicast_ether_addr(eth->h_dest)) ||
160+
(sdata->vif.type == NL80211_IFTYPE_OCB && sta))
159161
qos = true;
160162
else if (sta)
161163
qos = sta->sta.wme;

0 commit comments

Comments
 (0)