summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-11-23 13:32:26 +0100
committerFelix Fietkau <nbd@nbd.name>2021-01-26 20:07:49 +0100
commit0c2d098098e1e9790ea4baa3cde51f01b4e44072 (patch)
tree84254646d05aa16f5fadff3a0992ba5c8e622ffa
parent17cb546551cf0971384881b9a79c604c1e5e4f12 (diff)
mt76: mt7915: ensure that init work completes before starting the device
Without this change, the start operation could potentially race against eeprom or txbf init Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7915/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/main.c b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
index 73c5ee10fd3e..05dd75961d95 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/main.c
@@ -26,6 +26,8 @@ static int mt7915_start(struct ieee80211_hw *hw)
struct mt7915_phy *phy = mt7915_hw_phy(hw);
bool running;
+ flush_work(&dev->init_work);
+
mutex_lock(&dev->mt76.mutex);
running = mt7915_dev_running(dev);