summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7921/dma.c
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2021-05-10 17:14:49 +0200
committerFelix Fietkau <nbd@nbd.name>2021-06-19 09:22:44 +0200
commit20eb83c749609199443972cf80fb6004fc36afc6 (patch)
tree363b22069b37e59d94f4db38e9446251fa6da55a /drivers/net/wireless/mediatek/mt76/mt7921/dma.c
parentmt76: mt7663: enable hw rx header translation (diff)
downloadlinux-20eb83c749609199443972cf80fb6004fc36afc6.tar.xz
linux-20eb83c749609199443972cf80fb6004fc36afc6.zip
mt76: mt7921: fix mt7921_wfsys_reset sequence
WiFi subsytem reset should control MT_WFSYS_SW_RST_B and then poll the same register until the bit WFSYS_SW_INIT_DONE bit is set. Fixes: 0c1ce9884607 ("mt76: mt7921: add wifi reset support") Reviewed-by: Lorenzo Bianconi <lorenzo@kernel.org> 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/dma.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7921/dma.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c
index 71e664ee7652..bd9143dc865f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/dma.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/dma.c
@@ -313,9 +313,9 @@ static int mt7921_dma_reset(struct mt7921_dev *dev, bool force)
int mt7921_wfsys_reset(struct mt7921_dev *dev)
{
- mt76_set(dev, 0x70002600, BIT(0));
- msleep(200);
- mt76_clear(dev, 0x70002600, BIT(0));
+ mt76_clear(dev, MT_WFSYS_SW_RST_B, WFSYS_SW_RST_B);
+ msleep(50);
+ mt76_set(dev, MT_WFSYS_SW_RST_B, WFSYS_SW_RST_B);
if (!__mt76_poll_msec(&dev->mt76, MT_WFSYS_SW_RST_B,
WFSYS_SW_INIT_DONE, WFSYS_SW_INIT_DONE, 500))