Patch "wifi: mac80211: fix regression with non-QoS drivers" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    wifi: mac80211: fix regression with non-QoS drivers

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     wifi-mac80211-fix-regression-with-non-qos-drivers.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 2a2094a1af4584251937378668dea8fe71c5671e
Author: Hans de Goede <hdegoede@xxxxxxxxxx>
Date:   Sun Sep 18 21:20:52 2022 +0200

    wifi: mac80211: fix regression with non-QoS drivers
    
    [ Upstream commit d873697ef2b7e1b6fdd8e9d449d9354bd5d29a4a ]
    
    Commit 10cb8e617560 ("mac80211: enable QoS support for nl80211 ctrl port")
    changed ieee80211_tx_control_port() to aways call
    __ieee80211_select_queue() without checking local->hw.queues.
    
    __ieee80211_select_queue() returns a queue-id between 0 and 3, which means
    that now ieee80211_tx_control_port() may end up setting the queue-mapping
    for a skb to a value higher then local->hw.queues if local->hw.queues
    is less then 4.
    
    Specifically this is a problem for ralink rt2500-pci cards where
    local->hw.queues is 2. There this causes rt2x00queue_get_tx_queue() to
    return NULL and the following error to be logged: "ieee80211 phy0:
    rt2x00mac_tx: Error - Attempt to send packet over invalid queue 2",
    after which association with the AP fails.
    
    Other callers of __ieee80211_select_queue() skip calling it when
    local->hw.queues < IEEE80211_NUM_ACS, add the same check to
    ieee80211_tx_control_port(). This fixes ralink rt2500-pci and
    similar cards when less then 4 tx-queues no longer working.
    
    Fixes: 10cb8e617560 ("mac80211: enable QoS support for nl80211 ctrl port")
    Cc: Markus Theil <markus.theil@xxxxxxxxxxxxx>
    Suggested-by: Stanislaw Gruszka <stf_xl@xxxxx>
    Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220918192052.443529-1-hdegoede@xxxxxxxxxx
    Signed-off-by: Johannes Berg <johannes.berg@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index a499b07fee33..8f8dc2625d53 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -5719,6 +5719,9 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
 	skb_reset_network_header(skb);
 	skb_reset_mac_header(skb);
 
+	if (local->hw.queues < IEEE80211_NUM_ACS)
+		goto start_xmit;
+
 	/* update QoS header to prioritize control port frames if possible,
 	 * priorization also happens for control port frames send over
 	 * AF_PACKET
@@ -5734,6 +5737,7 @@ int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
 
 	rcu_read_unlock();
 
+start_xmit:
 	/* mutex lock is only needed for incrementing the cookie counter */
 	mutex_lock(&local->mtx);
 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux