]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mt76: mt7915: only free skbs after mt7915_dma_reset() when reset happens
authorRyder Lee <ryder.lee@mediatek.com>
Tue, 13 Apr 2021 07:26:20 +0000 (15:26 +0800)
committerFelix Fietkau <nbd@nbd.name>
Wed, 21 Apr 2021 09:42:20 +0000 (11:42 +0200)
In mt7915_mac_reset_work(), make sure freeing skbs after mt7915_dma_reset().

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/mac.c

index f99c2690d73c4345e62dca5b8e6f10cb9ced149f..35ab4bf011eb1a2e4fc86aae625ff1cd29373ffb 100644 (file)
@@ -1643,12 +1643,12 @@ void mt7915_mac_reset_work(struct work_struct *work)
 
        mt76_wr(dev, MT_MCU_INT_EVENT, MT_MCU_INT_EVENT_DMA_STOPPED);
 
-       mt7915_tx_token_put(dev);
-       idr_init(&dev->token);
-
        if (mt7915_wait_reset_state(dev, MT_MCU_CMD_RESET_DONE)) {
                mt7915_dma_reset(dev);
 
+               mt7915_tx_token_put(dev);
+               idr_init(&dev->token);
+
                mt76_wr(dev, MT_MCU_INT_EVENT, MT_MCU_INT_EVENT_DMA_INIT);
                mt7915_wait_reset_state(dev, MT_MCU_CMD_RECOVERY_DONE);
        }