wifi: mac80211: flush wiphy work where appropriate

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>
This commit is contained in:
Johannes Berg 2023-08-28 13:59:34 +02:00
parent 56cfb8ce1f
commit b920590f9a
2 changed files with 2 additions and 0 deletions

View 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__);

View 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);
}