lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231231050300.122806-3-sergeantsagara@protonmail.com>
Date: Sun, 31 Dec 2023 05:03:45 +0000
From: Rahul Rameshbabu <sergeantsagara@...tonmail.com>
To: Kalle Valo <kvalo@...nel.org>, Larry Finger <Larry.Finger@...inger.net>, Michael Büsch <m@...s.ch>, Julian Calaby <julian.calaby@...il.com>
Cc: linux-wireless@...r.kernel.org, b43-dev@...ts.infradead.org, linux-kernel@...r.kernel.org, Rahul Rameshbabu <sergeantsagara@...tonmail.com>
Subject: [PATCH wireless v2 2/4] wifi: b43: Stop/wake correct queue in PIO Tx path when QoS is disabled

When QoS is disabled, the queue priority value will not map to the correct
ieee80211 queue since there is only one queue. Stop/wake queue 0 when QoS
is disabled to prevent trying to stop/wake a non-existent queue and failing
to stop/wake the actual queue instantiated.

Fixes: 5100d5ac81b9 ("b43: Add PIO support for PCMCIA devices")
Signed-off-by: Rahul Rameshbabu <sergeantsagara@...tonmail.com>
---

Notes:
    Changes:
    
        v1->v2:
            - Refactored logic with helpers (suggested by Larry Finger
              <Larry.Finger@...inger.net>)
    
    Issue Details:
    
        When PIO support was first introduced to the b43 driver in commit
        5100d5ac81b9 ("b43: Add PIO support for PCMCIA devices"), four queues
        were allocated for different QoS priorities for video, voice, best
        effort, and background. This was modelled after commit
        e6f5b934fba8 ("b43: Add QOS support"), which has the following issue.
        The core networking stack maps these priorities in the skb, and these
        mappings are noted in the ring's queue_prio member. When disabling QoS
        in the driver, the skb will still contain the mapping for the core
        stack while only one queue is actually considered active (the best
        effort queue). In the situation that QoS is disabled, b43 needs to pass
        0 to ieee80211 queue functions since the number of queues is set to 1
        in the struct ieee80211_hw queues member.

 drivers/net/wireless/broadcom/b43/pio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/broadcom/b43/pio.c b/drivers/net/wireless/broadcom/b43/pio.c
index 0cf70fdb60a6..e41f2f5b4c26 100644
--- a/drivers/net/wireless/broadcom/b43/pio.c
+++ b/drivers/net/wireless/broadcom/b43/pio.c
@@ -525,7 +525,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb)
 	if (total_len > (q->buffer_size - q->buffer_used)) {
 		/* Not enough memory on the queue. */
 		err = -EBUSY;
-		ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb));
+		b43_stop_queue(dev, skb_get_queue_mapping(skb));
 		q->stopped = true;
 		goto out;
 	}
@@ -552,7 +552,7 @@ int b43_pio_tx(struct b43_wldev *dev, struct sk_buff *skb)
 	if (((q->buffer_size - q->buffer_used) < roundup(2 + 2 + 6, 4)) ||
 	    (q->free_packet_slots == 0)) {
 		/* The queue is full. */
-		ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb));
+		b43_stop_queue(dev, skb_get_queue_mapping(skb));
 		q->stopped = true;
 	}
 
@@ -587,7 +587,7 @@ void b43_pio_handle_txstatus(struct b43_wldev *dev,
 	list_add(&pack->list, &q->packets_list);
 
 	if (q->stopped) {
-		ieee80211_wake_queue(dev->wl->hw, q->queue_prio);
+		b43_wake_queue(dev, q->queue_prio);
 		q->stopped = false;
 	}
 }
-- 
2.42.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ