Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@protonmail.com>
Reviewed-by: Julian Calaby <julian.calaby@gmail.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://msgid.link/20231231050300.122806-3-sergeantsagara@protonmail.com

authored by

Rahul Rameshbabu and committed by
Kalle Valo
77135a38 9636951e

+3 -3
+3 -3
drivers/net/wireless/broadcom/b43/pio.c
··· 525 525 if (total_len > (q->buffer_size - q->buffer_used)) { 526 526 /* Not enough memory on the queue. */ 527 527 err = -EBUSY; 528 - ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); 528 + b43_stop_queue(dev, skb_get_queue_mapping(skb)); 529 529 q->stopped = true; 530 530 goto out; 531 531 } ··· 552 552 if (((q->buffer_size - q->buffer_used) < roundup(2 + 2 + 6, 4)) || 553 553 (q->free_packet_slots == 0)) { 554 554 /* The queue is full. */ 555 - ieee80211_stop_queue(dev->wl->hw, skb_get_queue_mapping(skb)); 555 + b43_stop_queue(dev, skb_get_queue_mapping(skb)); 556 556 q->stopped = true; 557 557 } 558 558 ··· 587 587 list_add(&pack->list, &q->packets_list); 588 588 589 589 if (q->stopped) { 590 - ieee80211_wake_queue(dev->wl->hw, q->queue_prio); 590 + b43_wake_queue(dev, q->queue_prio); 591 591 q->stopped = false; 592 592 } 593 593 }