mt76: reduce locking in mt76_dma_tx_cleanup
authorFelix Fietkau <nbd@nbd.name>
Thu, 31 Jan 2019 21:39:32 +0000 (22:39 +0100)
committerFelix Fietkau <nbd@nbd.name>
Wed, 1 May 2019 11:03:58 +0000 (13:03 +0200)
commit2fe30dce08220cb267641dd7dc3a53363f310622
tree8d7f8effa194ec90af24b1b45d192334779ad424
parent90fdc1717b1862eb3d506733f3b3e5217bc0de20
mt76: reduce locking in mt76_dma_tx_cleanup

q->tail can be safely updated without locking, because there is no
concurrent access. If called from outside of the tasklet (for flushing),
the tasklet is always disabled.
q->queued can be safely read without locking, as long as the decrement
happens within the locked section.
This patch allows cleaning up tx packets outside of the section that holds
the queue lock for improved performance

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/dma.c