From b920590f9a7f7359d37d260726b32dbb21b833be Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 28 Aug 2023 13:59:34 +0200 Subject: [PATCH] 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 --- 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 24315d7b31263..aeb21cfe789ae 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 8a6917cf63cf9..6d8b73796dc52 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.30.2