linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] wifi: mac80211: fix qos on mesh interfaces
@ 2023-03-14  9:59 Felix Fietkau
  2023-03-14  9:59 ` [PATCH 2/7] wifi: mac80211: fix race in mesh sequence number assignment Felix Fietkau
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Felix Fietkau @ 2023-03-14  9:59 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, Ryder Lee

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.

Fixes: 50e2ab392919 ("wifi: mac80211: fix queue selection for mesh/OCB interfaces")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
 net/mac80211/wme.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c
index a12c63638680..1601be576414 100644
--- a/net/mac80211/wme.c
+++ b/net/mac80211/wme.c
@@ -147,6 +147,7 @@ u16 ieee80211_select_queue_80211(struct ieee80211_sub_if_data *sdata,
 u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
 			   struct sta_info *sta, struct sk_buff *skb)
 {
+	const struct ethhdr *eth = (void *)skb->data;
 	struct mac80211_qos_map *qos_map;
 	bool qos;
 
@@ -154,8 +155,9 @@ u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,
 	skb_get_hash(skb);
 
 	/* all mesh/ocb stations are required to support WME */
-	if (sta && (sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
-		    sdata->vif.type == NL80211_IFTYPE_OCB))
+	if ((sdata->vif.type == NL80211_IFTYPE_MESH_POINT &&
+	    !is_multicast_ether_addr(eth->h_dest)) ||
+	    (sdata->vif.type == NL80211_IFTYPE_OCB && sta))
 		qos = true;
 	else if (sta)
 		qos = sta->sta.wme;
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-03-15 13:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-14  9:59 [PATCH 1/7] wifi: mac80211: fix qos on mesh interfaces Felix Fietkau
2023-03-14  9:59 ` [PATCH 2/7] wifi: mac80211: fix race in mesh sequence number assignment Felix Fietkau
2023-03-14  9:59 ` [PATCH 3/7] wifi: mac80211: fix mesh path discovery based on unicast packets Felix Fietkau
2023-03-14  9:59 ` [PATCH 4/7] wifi: mac80211: mesh fast xmit support Felix Fietkau
2023-03-14  9:59 ` [PATCH 5/7] wifi: mac80211: use mesh header cache to speed up mesh forwarding Felix Fietkau
2023-03-14  9:59 ` [PATCH 6/7] wifi: mac80211: add mesh fast-rx support Felix Fietkau
2023-03-14  9:59 ` [PATCH 7/7] mac80211: implement support for yet another mesh A-MSDU format Felix Fietkau
2023-03-15 13:04   ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).