2021-04-06 13:06:30

by Sean Wang

[permalink] [raw]
Subject: [PATCH 5/6] mt76: mt7921: fix MT_PCIE_MAC_INT_ENABLE access

From: Sean Wang <[email protected]>

Use mt76_wr to directly access MT_PCIE_MAC_INT_ENABLE because we used the
remapped address 0x10000 as the base to operate PCIe interrupt.

Fixes: 215bb6737bef ("mt76: mt7921: add wifi reset support")
Signed-off-by: Sean Wang <[email protected]>
---
drivers/net/wireless/mediatek/mt76/mt7921/mac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
index 94f178e28e20..3bbd8bc0315f 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7921/mac.c
@@ -1321,7 +1321,7 @@ mt7921_mac_reset(struct mt7921_dev *dev)
mt76_connac_free_pending_tx_skbs(&dev->pm, NULL);

mt76_wr(dev, MT_WFDMA0_HOST_INT_ENA, 0);
- mt7921_l1_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0x0);
+ mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0x0);

set_bit(MT76_MCU_RESET, &dev->mphy.state);
wake_up(&dev->mt76.mcu.wait);
@@ -1364,7 +1364,7 @@ mt7921_mac_reset(struct mt7921_dev *dev)
clear_bit(MT76_MCU_RESET, &dev->mphy.state);

mt76_wr(dev, MT_WFDMA0_HOST_INT_ENA, 0);
- mt7921_l1_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);
+ mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);
mt7921_irq_enable(dev,
MT_INT_RX_DONE_ALL | MT_INT_TX_DONE_ALL |
MT_INT_MCU_CMD);
--
2.25.1