@@ -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__);
@@ -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);
}