All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/2] mt76: mt7615: only free skbs after mt7615_dma_reset() when reset happens
@ 2021-04-13  8:00 ` Ryder Lee
  0 siblings, 0 replies; 4+ messages in thread
From: Ryder Lee @ 2021-04-13  8:00 UTC (permalink / raw)
  To: Felix Fietkau, Lorenzo Bianconi
  Cc: Shayne Chen, linux-wireless, linux-mediatek, Ryder Lee

In mt7615_mac_reset_work(), make sure freeing skbs after mt7615_dma_reset().

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
changes since v2: 
- split v1 into two patches
- remove original mt7615_tx_token_put.
---
 drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c
index 7694391603dd..baaf734c6950 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/pci_mac.c
@@ -304,12 +304,12 @@ void mt7615_mac_reset_work(struct work_struct *work)
 
 	mt7615_hif_int_event_trigger(dev, MT_MCU_INT_EVENT_PDMA_STOPPED);
 
-	mt7615_tx_token_put(dev);
-	idr_init(&dev->token);
-
 	if (mt7615_wait_reset_state(dev, MT_MCU_CMD_RESET_DONE)) {
 		mt7615_dma_reset(dev);
 
+		mt7615_tx_token_put(dev);
+		idr_init(&dev->token);
+
 		mt76_wr(dev, MT_WPDMA_MEM_RNG_ERR, 0);
 
 		mt7615_hif_int_event_trigger(dev, MT_MCU_INT_EVENT_PDMA_INIT);
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-04-13  8:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13  8:00 [PATCH v2 1/2] mt76: mt7615: only free skbs after mt7615_dma_reset() when reset happens Ryder Lee
2021-04-13  8:00 ` Ryder Lee
2021-04-13  8:00 ` [PATCH v2 2/2] mt76: mt7615: use ieee80211_free_txskb() in mt7615_tx_token_put() Ryder Lee
2021-04-13  8:00   ` Ryder Lee

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.