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:
Lorenzo Bianconi
2017-07-17 10:22:05 +02:00
committed by Felix Fietkau
parent 8dee788e05
commit 3c4c9a647e
+4 -4
View File
@@ -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;