Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 12062b14 authored by Rahul Rameshbabu's avatar Rahul Rameshbabu Committed by Sasha Levin
Browse files

wifi: b43: Stop correct queue in DMA worker when QoS is disabled



[ Upstream commit 581c8967d66c4961076dbbee356834e9c6777184 ]

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: bad69194 ("b43: avoid packet losses in the dma worker code.")
Signed-off-by: default avatarRahul Rameshbabu <sergeantsagara@protonmail.com>
Reviewed-by: default avatarJulian Calaby <julian.calaby@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231231050300.122806-4-sergeantsagara@protonmail.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent c668f0f8
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -3601,7 +3601,7 @@ 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);
				b43_stop_queue(dev, queue_num);
				skb_queue_head(&wl->tx_queue[queue_num], skb);
				break;
			}
@@ -3625,6 +3625,7 @@ static void b43_op_tx(struct ieee80211_hw *hw,
		      struct sk_buff *skb)
{
	struct b43_wl *wl = hw_to_b43_wl(hw);
	u16 skb_queue_mapping;

	if (unlikely(skb->len < 2 + 2 + 6)) {
		/* Too short, this can't be a valid frame. */
@@ -3633,12 +3634,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]) {
	skb_queue_mapping = skb_get_queue_mapping(skb);
	skb_queue_tail(&wl->tx_queue[skb_queue_mapping], skb);
	if (!wl->tx_queue_stopped[skb_queue_mapping])
		ieee80211_queue_work(wl->hw, &wl->tx_work);
	} else {
		ieee80211_stop_queue(wl->hw, skb->queue_mapping);
	}
	else
		b43_stop_queue(wl->current_dev, skb_queue_mapping);
}

static void b43_qos_params_upload(struct b43_wldev *dev,