[3/4] mt76: mt76x0u: reset counter starting the device
diff mbox series

Message ID 8bb1e2b3f6b7a06bc0ec0eab1ca7067331da9819.1568278771.git.lorenzo@kernel.org
State Accepted
Delegated to: Felix Fietkau
Headers show
Series
  • mt76x02: tidy up mib counters
Related show

Commit Message

Lorenzo Bianconi Sept. 12, 2019, 9:06 a.m. UTC
Remove mt76x02_mac_reset_counters from mt76x0_init_hardware since
it will be run starting the device

Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt76x0/init.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
index 541e81deba83..d7bac4961c7b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x0/init.c
@@ -152,6 +152,7 @@  static void mt76x0_init_mac_registers(struct mt76x02_dev *dev)
 
 int mt76x0_mac_start(struct mt76x02_dev *dev)
 {
+	mt76x02_mac_reset_counters(dev);
 	mt76_wr(dev, MT_MAC_SYS_CTRL, MT_MAC_SYS_CTRL_ENABLE_TX);
 
 	if (!mt76x02_wait_for_wpdma(&dev->mt76, 200000))
@@ -234,8 +235,6 @@  int mt76x0_init_hardware(struct mt76x02_dev *dev)
 	for (i = 0; i < 256; i++)
 		mt76x02_mac_wcid_setup(dev, i, 0, NULL);
 
-	mt76x02_mac_reset_counters(dev);
-
 	ret = mt76x0_eeprom_init(dev);
 	if (ret)
 		return ret;