Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: stable@vger.kernel.org
Fixes: 50e2ab392919 ("wifi: mac80211: fix queue selection for mesh/OCB interfaces")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20230314095956.62085-1-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Felix Fietkau and committed by
Johannes Berg
4e348c6c 923bf981

+4 -2
+4 -2
net/mac80211/wme.c
··· 147 147 u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata, 148 148 struct sta_info *sta, struct sk_buff *skb) 149 149 { 150 + const struct ethhdr *eth = (void *)skb->data; 150 151 struct mac80211_qos_map *qos_map; 151 152 bool qos; 152 153 ··· 155 154 skb_get_hash(skb); 156 155 157 156 /* all mesh/ocb stations are required to support WME */ 158 - if (sta && (sdata->vif.type == NL80211_IFTYPE_MESH_POINT || 159 - sdata->vif.type == NL80211_IFTYPE_OCB)) 157 + if ((sdata->vif.type == NL80211_IFTYPE_MESH_POINT && 158 + !is_multicast_ether_addr(eth->h_dest)) || 159 + (sdata->vif.type == NL80211_IFTYPE_OCB && sta)) 160 160 qos = true; 161 161 else if (sta) 162 162 qos = sta->sta.wme;