diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-04-22 12:32:10 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-05-12 19:52:32 +0200 |
commit | ad333c2ad23ec179b0c907e8553779873f4cc1c8 (patch) | |
tree | 5bc486cdac69edd76a5f6436bb6d547f3bd24ee6 /drivers/net/wireless | |
parent | ed2bde56ab1fcda71faa24d720df06353d91e237 (diff) |
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 <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index 88cbf5ffa290..89aed6d67de0 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/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 |