diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-08-23 14:50:13 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-09-24 18:10:16 +0200 |
commit | fe5b5ab52e9d385d5e6d20e3ce2d2af69175f6ad (patch) | |
tree | b6b17fa7c2f983ad1370576ce6653ea318c0dd31 /drivers/net/wireless/mediatek/mt76/dma.c | |
parent | 16254fc51f7df622bd870f70cf6ae84d2d4c08a3 (diff) | |
download | linux-stable-fe5b5ab52e9d385d5e6d20e3ce2d2af69175f6ad.tar.gz linux-stable-fe5b5ab52e9d385d5e6d20e3ce2d2af69175f6ad.tar.bz2 linux-stable-fe5b5ab52e9d385d5e6d20e3ce2d2af69175f6ad.zip |
mt76: unify queue tx cleanup code
Cleanup and preparation for changing tx scheduling behavior
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/dma.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/dma.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c index 24ff21eedbd0..cab8422d8a83 100644 --- a/drivers/net/wireless/mediatek/mt76/dma.c +++ b/drivers/net/wireless/mediatek/mt76/dma.c @@ -165,16 +165,8 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush) last = readl(&q->regs->dma_idx); while (q->queued > 0 && q->tail != last) { - int swq_qid = -1; - mt76_dma_tx_cleanup_idx(dev, q, q->tail, &entry); - if (entry.schedule) - swq_qid = entry.qid; - - q->tail = (q->tail + 1) % q->ndesc; - - if (entry.skb) - dev->drv->tx_complete_skb(dev, qid, &entry); + mt76_queue_tx_complete(dev, q, &entry); if (entry.txwi) { if (!(dev->drv->drv_flags & MT_DRV_TXWI_NO_FREE)) @@ -185,13 +177,6 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush) if (!flush && q->tail == last) last = readl(&q->regs->dma_idx); - spin_lock_bh(&q->lock); - if (swq_qid >= 4) - dev->q_tx[__MT_TXQ_MAX + swq_qid - 4].swq_queued--; - else if (swq_qid >= 0) - dev->q_tx[swq_qid].swq_queued--; - q->queued--; - spin_unlock_bh(&q->lock); } if (flush) { |