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: <20231230045105.91351-4-sergeantsagara@protonmail.com>
Date: Sat, 30 Dec 2023 04:51:40 +0000
From: Rahul Rameshbabu <sergeantsagara@...tonmail.com>
To: Kalle Valo <kvalo@...nel.org>
Cc: linux-wireless@...r.kernel.org, b43-dev@...ts.infradead.org, linux-kernel@...r.kernel.org, Rahul Rameshbabu <sergeantsagara@...tonmail.com>
Subject: [PATCH wireless 3/5] 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>
---
 drivers/net/wireless/broadcom/b43/pio.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/broadcom/b43/pio.c b/drivers/net/wireless/broadcom/b43/pio.c
index 0cf70fdb60a6..7168fe50af5b 100644
--- a/drivers/net/wireless/broadcom/b43/pio.c
+++ b/drivers/net/wireless/broadcom/b43/pio.c
@@ -525,7 +525,11 @@ 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));
+		if (dev->qos_enabled)
+			ieee80211_stop_queue(dev->wl->hw,
+					     skb_get_queue_mapping(skb));
+		else
+			ieee80211_stop_queue(dev->wl->hw, 0);
 		q->stopped = true;
 		goto out;
 	}
@@ -552,7 +556,11 @@ 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));
+		if (dev->qos_enabled)
+			ieee80211_stop_queue(dev->wl->hw,
+					     skb_get_queue_mapping(skb));
+		else
+			ieee80211_stop_queue(dev->wl->hw, 0);
 		q->stopped = true;
 	}
 
@@ -587,7 +595,10 @@ 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);
+		if (dev->qos_enabled)
+			ieee80211_wake_queue(dev->wl->hw, q->queue_prio);
+		else
+			ieee80211_wake_queue(dev->wl->hw, 0);
 		q->stopped = false;
 	}
 }
-- 
2.42.0



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ