Skip to content
Commit 3d78c464 authored by Quan Zhou's avatar Quan Zhou Committed by Felix Fietkau
Browse files

wifi: mt76: mt7921e: stop chip reset worker in unregister hook

If the chip reset worker is triggered during the remove process, the chip
DMA may not be properly pushed back to the idle state. This can lead to
corruption of the DMA flow due to the chip reset. Therefore, it is
necessary to stop the chip reset before the DMA is finalized.

To avoid resetting the chip after the reset worker is cancelled, use
__mt7921_mcu_drv_pmctrl() instead of mt7921_mcu_drv_pmctrl(). It is safe to
ignore the pm mutex because the pm worker and wake worker have already been
cancelled.

Fixes: 033ae79b

 ("mt76: mt7921: refactor init.c to be bus independent")
Co-developed-by: default avatarSean Wang <sean.wang@mediatek.com>
Signed-off-by: default avatarSean Wang <sean.wang@mediatek.com>
Co-developed-by: default avatarDeren Wu <deren.wu@mediatek.com>
Signed-off-by: default avatarDeren Wu <deren.wu@mediatek.com>
Co-developed-by: default avatarWang Zhao <wang.zhao@mediatek.com>
Signed-off-by: default avatarWang Zhao <wang.zhao@mediatek.com>
Signed-off-by: default avatarQuan Zhou <quan.zhou@mediatek.com>
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 87714bf6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment