wifi: mac80211: flush wiphy work where appropriate
authorJohannes Berg <johannes.berg@intel.com>
Mon, 28 Aug 2023 11:59:34 +0000 (13:59 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 11 Sep 2023 09:27:19 +0000 (11:27 +0200)
Before converting more works to wiphy work, add
flushing in mac80211 where we also flush the
mac80211 workqueue. Not needed in suspend since
cfg80211 will have taken care of it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/main.c
net/mac80211/util.c

index 24315d7..aeb21cf 100644 (file)
@@ -343,6 +343,7 @@ static void ieee80211_restart_work(struct work_struct *work)
        rtnl_lock();
        /* we might do interface manipulations, so need both */
        wiphy_lock(local->hw.wiphy);
+       wiphy_work_flush(local->hw.wiphy, NULL);
 
        WARN(test_bit(SCAN_HW_SCANNING, &local->scanning),
             "%s called with hardware scan in progress\n", __func__);
index 8a6917c..6d8b737 100644 (file)
@@ -2319,6 +2319,7 @@ void ieee80211_stop_device(struct ieee80211_local *local)
        cancel_work_sync(&local->reconfig_filter);
 
        flush_workqueue(local->workqueue);
+       wiphy_work_flush(local->hw.wiphy, NULL);
        drv_stop(local);
 }