* [PATCH] mt76: mt7921: avoid unnecessary spin_lock/spin_unlock in mt7921_mcu_tx_done_event
@ 2021-06-19 18:19 Lorenzo Bianconi
0 siblings, 0 replies; only message in thread
From: Lorenzo Bianconi @ 2021-06-19 18:19 UTC (permalink / raw)
To: nbd; +Cc: lorenzo.bianconi, linux-wireless, sean.wang, deren.wu
Do not grab the spinlock in mt7921_mcu_tx_done_event routine if not
necessary.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
index 1819de869fdf..8e011214169c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c
@@ -534,9 +534,7 @@ mt7921_mcu_tx_done_event(struct mt7921_dev *dev, struct sk_buff *skb)
mt7921_mcu_tx_rate_parse(mphy->mt76, &peer,
&msta->stats.tx_rate,
le16_to_cpu(event->tx_rate));
-
- spin_lock_bh(&dev->sta_poll_lock);
- break;
+ return;
}
spin_unlock_bh(&dev->sta_poll_lock);
}
--
2.31.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-06-19 18:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-19 18:19 [PATCH] mt76: mt7921: avoid unnecessary spin_lock/spin_unlock in mt7921_mcu_tx_done_event Lorenzo Bianconi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).