mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
tx: move state check in mt76_txq_send_burst()
Move device state check in mt76_txq_send_burst() in order to be more reactive in stopping tx process during hw reset Signed-off-by: Lorenzo Bianconi <[email protected]>
This commit is contained in:
committed by
Felix Fietkau
parent
8dee788e05
commit
3c4c9a647e
@@ -332,6 +332,10 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
|
||||
if (probe)
|
||||
break;
|
||||
|
||||
if (test_bit(MT76_SCANNING, &dev->state) ||
|
||||
test_bit(MT76_RESET, &dev->state))
|
||||
return -EBUSY;
|
||||
|
||||
skb = mt76_txq_dequeue(dev, mtxq, false);
|
||||
if (!skb) {
|
||||
*empty = true;
|
||||
@@ -418,10 +422,6 @@ void mt76_txq_schedule(struct mt76_dev *dev, struct mt76_queue *hwq)
|
||||
{
|
||||
int len;
|
||||
|
||||
if (test_bit(MT76_SCANNING, &dev->state) ||
|
||||
test_bit(MT76_RESET, &dev->state))
|
||||
return;
|
||||
|
||||
do {
|
||||
if (hwq->swq_queued >= 4 || list_empty(&hwq->swq))
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user