From 1656882f272361abb0f8b6b19eb42c510d0a24c8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 22 Apr 2020 12:32:10 +0200 Subject: [PATCH] mt76: mt7615: do not adjust MAC timings if the device is not running Avoids register writes and MAC start/stop when the hardware isn't ready for it Signed-off-by: Felix Fietkau --- mt7615/mac.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mt7615/mac.c b/mt7615/mac.c index ce146e07..852cc3a3 100644 --- a/mt7615/mac.c +++ b/mt7615/mac.c @@ -119,6 +119,9 @@ void mt7615_mac_set_timing(struct mt7615_phy *phy) int sifs, offset; bool is_5ghz = phy->mt76->chandef.chan->band == NL80211_BAND_5GHZ; + if (!test_bit(MT76_STATE_RUNNING, &phy->mt76->state)) + return; + if (is_5ghz) sifs = 16; else