diff mbox series

[3/3] mt76: mt7915: move MT_INT_MASK_CSR to init.c

Message ID 7bfbc431f07401f73f51566ce347fca01cbaa98b.1651722608.git.ryder.lee@mediatek.com
State New
Headers show
Series [1/3] mt76: mt7915: reowrk SER debugfs knob | expand

Commit Message

Ryder Lee May 5, 2022, 7:08 a.m. UTC
To avoid redundant MT_INT_MASK_CSR settings.

Signed-off-by: Ryder Lee <ryder.lee@mediatek.com>
---
 drivers/net/wireless/mediatek/mt76/mt7915/init.c | 1 +
 drivers/net/wireless/mediatek/mt76/mt7915/mmio.c | 2 --
 drivers/net/wireless/mediatek/mt76/mt7915/pci.c  | 2 --
 drivers/net/wireless/mediatek/mt76/mt7915/soc.c  | 1 -
 4 files changed, 1 insertion(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/init.c b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
index aa93aeab5634..db6904448063 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/init.c
@@ -649,6 +649,7 @@  mt7915_init_hardware(struct mt7915_dev *dev, struct mt7915_phy *phy2)
 {
 	int ret, idx;
 
+	mt76_wr(dev, MT_INT_MASK_CSR, 0);
 	mt76_wr(dev, MT_INT_SOURCE_CSR, ~0);
 
 	INIT_WORK(&dev->init_work, mt7915_init_work);
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
index 229d40826c9b..3c55d4cebbf2 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/mmio.c
@@ -668,8 +668,6 @@  struct mt7915_dev *mt7915_mmio_probe(struct device *pdev,
 
 	tasklet_setup(&dev->irq_tasklet, mt7915_irq_tasklet);
 
-	mt76_wr(dev, MT_INT_MASK_CSR, 0);
-
 	return dev;
 
 error:
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/pci.c b/drivers/net/wireless/mediatek/mt76/mt7915/pci.c
index 6f819c41a4c4..a9d4b3fced53 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/pci.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/pci.c
@@ -138,8 +138,6 @@  static int mt7915_pci_probe(struct pci_dev *pdev,
 	if (ret)
 		goto free_irq_vector;
 
-	mt76_wr(dev, MT_INT_MASK_CSR, 0);
-
 	/* master switch of PCIe tnterrupt enable */
 	mt76_wr(dev, MT_PCIE_MAC_INT_ENABLE, 0xff);
 
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/soc.c b/drivers/net/wireless/mediatek/mt76/mt7915/soc.c
index 04e62d569599..b91f5485f97a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/soc.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/soc.c
@@ -1168,7 +1168,6 @@  static int mt7986_wmac_probe(struct platform_device *pdev)
 		goto free_irq;
 
 	mt7915_wfsys_reset(dev);
-	mt76_wr(dev, MT_INT_MASK_CSR, 0);
 
 	ret = mt7915_register_device(dev);
 	if (ret)