Search Linux Wireless

[PATCH wireless 4/5] wifi: b43: Stop correct queue in DMA worker when QoS is disabled

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

 



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

Fixes: bad691946966 ("b43: avoid packet losses in the dma worker code.")
Signed-off-by: Rahul Rameshbabu <sergeantsagara@xxxxxxxxxxxxxx>
---
 drivers/net/wireless/broadcom/b43/main.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/broadcom/b43/main.c b/drivers/net/wireless/broadcom/b43/main.c
index c81117a22ebf..b6ac1526c0e8 100644
--- a/drivers/net/wireless/broadcom/b43/main.c
+++ b/drivers/net/wireless/broadcom/b43/main.c
@@ -3603,7 +3603,10 @@ static void b43_tx_work(struct work_struct *work)
 				err = b43_dma_tx(dev, skb);
 			if (err == -ENOSPC) {
 				wl->tx_queue_stopped[queue_num] = true;
-				ieee80211_stop_queue(wl->hw, queue_num);
+				if (dev->qos_enabled)
+					ieee80211_stop_queue(wl->hw, queue_num);
+				else
+					ieee80211_stop_queue(wl->hw, 0);
 				skb_queue_head(&wl->tx_queue[queue_num], skb);
 				break;
 			}
@@ -3636,11 +3639,12 @@ static void b43_op_tx(struct ieee80211_hw *hw,
 	B43_WARN_ON(skb_shinfo(skb)->nr_frags);
 
 	skb_queue_tail(&wl->tx_queue[skb->queue_mapping], skb);
-	if (!wl->tx_queue_stopped[skb->queue_mapping]) {
+	if (!wl->tx_queue_stopped[skb->queue_mapping])
 		ieee80211_queue_work(wl->hw, &wl->tx_work);
-	} else {
+	else if (wl->current_dev->qos_enabled)
 		ieee80211_stop_queue(wl->hw, skb->queue_mapping);
-	}
+	else
+		ieee80211_stop_queue(wl->hw, 0);
 }
 
 static void b43_qos_params_upload(struct b43_wldev *dev,
-- 
2.42.0







[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux