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@xxxxxxxxxxxxxx> --- 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