move tx queue cleanup locking and scheduling call to core

Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2015-12-17 15:57:04 +01:00
parent 1389db799a
commit 206b0dd3d8
2 changed files with 4 additions and 4 deletions
+4
View File
@@ -100,6 +100,7 @@ mt76_dma_cleanup(struct mt76_dev *dev, struct mt76_queue *q, bool flush,
struct mt76_queue_entry entry;
int last;
spin_lock_bh(&q->lock);
if (flush)
last = -1;
else
@@ -120,6 +121,9 @@ mt76_dma_cleanup(struct mt76_dev *dev, struct mt76_queue *q, bool flush,
if (q->tail == last)
last = ioread32(&q->regs->dma_idx);
}
if (!flush)
mt76_txq_schedule(dev, q);
spin_unlock_bh(&q->lock);
}
static void *
-4
View File
@@ -117,11 +117,7 @@ mt76_tx_cleanup(struct mt76x2_dev *dev, struct mt76_queue *q, bool flush)
if (!q->desc)
return;
spin_lock_bh(&q->lock);
mt76_queue_cleanup(dev, q, flush, mt76x2_tx_cleanup_entry);
if (!flush)
mt76_txq_schedule(&dev->mt76, q);
spin_unlock_bh(&q->lock);
}
static int