mt76: clear CCA timer stats in mt76x02_edcca_init
authorFelix Fietkau <nbd@nbd.name>
Sun, 3 Feb 2019 13:15:58 +0000 (14:15 +0100)
committerFelix Fietkau <nbd@nbd.name>
Mon, 18 Feb 2019 18:54:33 +0000 (19:54 +0100)
Avoid triggering too early

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt76x02_mac.c

index 89c7368..aecf514 100644 (file)
@@ -919,6 +919,9 @@ void mt76x02_edcca_init(struct mt76x02_dev *dev, bool enable)
                }
        }
        mt76x02_edcca_tx_enable(dev, true);
+
+       /* clear previous CCA timer value */
+       mt76_rr(dev, MT_ED_CCA_TIMER);
 }
 EXPORT_SYMBOL_GPL(mt76x02_edcca_init);