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 24315d7b31263e8bc281b9d7d06d5790a3126a6e..aeb21cfe789ae94ed99a0f20b80b5cc369f9475f 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 8a6917cf63cf9d6d4b0c05cda0b0a6ae7c83a8bf..6d8b73796dc5234f2f1f1054f4b6e9d7bf888579 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);
 }