diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-03-07 21:20:51 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-04-12 01:03:03 +0300 |
commit | 0c1ce988460765ece1ba8eacd00533eefb6e666a (patch) | |
tree | 3b3840b75ba8f7a2160bd1c024181caa193d9327 /drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | |
parent | c001df978e4cb88975147ddd2c829c9e12a55076 (diff) | |
download | linux-0c1ce988460765ece1ba8eacd00533eefb6e666a.tar.xz |
mt76: mt7921: add wifi reset support
Introduce wifi chip reset support for mt7921 device to recover mcu
hangs.
Co-developed-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7921/mcu.c')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7921/mcu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c index 6819c5dd7e94..98b48b26a6fe 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7921/mcu.c @@ -952,6 +952,7 @@ int mt7921_mcu_init(struct mt7921_dev *dev) .mcu_skb_send_msg = mt7921_mcu_send_message, .mcu_parse_response = mt7921_mcu_parse_response, .mcu_restart = mt7921_mcu_restart, + .mcu_reset = mt7921_reset, }; dev->mt76.mcu_ops = &mt7921_mcu_ops; @@ -1269,6 +1270,7 @@ int mt7921_mcu_drv_pmctrl(struct mt7921_dev *dev) if (i == MT7921_DRV_OWN_RETRY_COUNT) { dev_err(dev->mt76.dev, "driver own failed\n"); + mt7921_reset(&dev->mt76); return -EIO; } @@ -1295,6 +1297,7 @@ int mt7921_mcu_fw_pmctrl(struct mt7921_dev *dev) if (i == MT7921_DRV_OWN_RETRY_COUNT) { dev_err(dev->mt76.dev, "firmware own failed\n"); + mt7921_reset(&dev->mt76); return -EIO; } |