]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit223862d1a975ac53eb5e3041511225b66d720ecb
tree8d7f8effa194ec90af24b1b45d192334779ad424
parent1e24ad5cefbdba3b718122d97db71aab03ed1cb3
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