mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt76: avoid queue/status spinlocks while passing tx status to mac80211
There is some code in the mac80211 tx status processing code that could potentially call back into the tx codepath. To avoid deadlocks, make sure that no tx related spinlocks are taken during the ieee80211_tx_status call. Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -157,17 +157,20 @@ mt76_dma_tx_cleanup(struct mt76_dev *dev, enum mt76_txq_id qid, bool flush)
|
||||
if (entry.schedule)
|
||||
q->swq_queued--;
|
||||
|
||||
if (entry.skb)
|
||||
q->tail = (q->tail + 1) % q->ndesc;
|
||||
q->queued--;
|
||||
|
||||
if (entry.skb) {
|
||||
spin_unlock_bh(&q->lock);
|
||||
dev->drv->tx_complete_skb(dev, q, &entry, flush);
|
||||
spin_lock_bh(&q->lock);
|
||||
}
|
||||
|
||||
if (entry.txwi) {
|
||||
mt76_put_txwi(dev, entry.txwi);
|
||||
wake = true;
|
||||
}
|
||||
|
||||
q->tail = (q->tail + 1) % q->ndesc;
|
||||
q->queued--;
|
||||
|
||||
if (!flush && q->tail == last)
|
||||
last = ioread32(&q->regs->dma_idx);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user