summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2021-10-19 01:11:47 +0200
committerFelix Fietkau <nbd@nbd.name>2021-10-20 10:37:00 +0200
commitca74b9b907f93424ea16785871e68d705b276d5e (patch)
tree34c3adb1cbc0f28acd576322439bb89fe7faf641 /drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
parentmt76: mt7921: introduce mt7921s support (diff)
downloadlinux-ca74b9b907f93424ea16785871e68d705b276d5e.tar.xz
linux-ca74b9b907f93424ea16785871e68d705b276d5e.zip
mt76: mt7921s: add reset support
Introduce wifi chip reset support for mt7921 device to recover mcu hangs or abnormal wifi system. Tested-by: Deren Wu <deren.wu@mediatek.com> Acked-by: Lorenzo Bianconi <lorenzo@kernel.org> Co-developed-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Deren Wu <deren.wu@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7921/sdio.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7921/sdio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c b/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
index e0ad97f27fea..ddf0eeb8b688 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/sdio.c
@@ -46,6 +46,7 @@ static void mt7921s_unregister_device(struct mt7921_dev *dev)
cancel_work_sync(&pm->wake_work);
mt76s_deinit(&dev->mt76);
+ mt7921s_wfsys_reset(dev);
mt7921_mcu_exit(dev);
mt76_free_device(&dev->mt76);
@@ -104,6 +105,8 @@ static int mt7921s_probe(struct sdio_func *func,
.type = MT76_BUS_SDIO,
};
static const struct mt7921_hif_ops mt7921_sdio_ops = {
+ .init_reset = mt7921s_init_reset,
+ .reset = mt7921s_mac_reset,
.mcu_init = mt7921s_mcu_init,
.drv_own = mt7921s_mcu_drv_pmctrl,
.fw_own = mt7921s_mcu_fw_pmctrl,