From: Johannes Berg <johannes.berg@xxxxxxxxx> 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@xxxxxxxxx> --- net/mac80211/main.c | 1 + net/mac80211/util.c | 1 + 2 files changed, 2 insertions(+) diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 24315d7b3126..aeb21cfe789a 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -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__); diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 8a6917cf63cf..6d8b73796dc5 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -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); } -- 2.41.0