wifi: mac80211: move offchannel works to wiphy work
Make the offchannel works wiphy works to have the wiphy locked for executing them. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -377,8 +377,8 @@ static void ieee80211_restart_work(struct work_struct *work)
|
||||
ieee80211_scan_cancel(local);
|
||||
|
||||
/* make sure any new ROC will consider local->in_reconfig */
|
||||
flush_delayed_work(&local->roc_work);
|
||||
flush_work(&local->hw_roc_done);
|
||||
wiphy_delayed_work_flush(local->hw.wiphy, &local->roc_work);
|
||||
wiphy_work_flush(local->hw.wiphy, &local->hw_roc_done);
|
||||
|
||||
/* wait for all packet processing to be done */
|
||||
synchronize_net();
|
||||
@@ -1501,11 +1501,11 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
|
||||
ieee80211_remove_interfaces(local);
|
||||
|
||||
wiphy_lock(local->hw.wiphy);
|
||||
wiphy_delayed_work_cancel(local->hw.wiphy, &local->roc_work);
|
||||
wiphy_work_cancel(local->hw.wiphy, &local->radar_detected_work);
|
||||
wiphy_unlock(local->hw.wiphy);
|
||||
rtnl_unlock();
|
||||
|
||||
cancel_delayed_work_sync(&local->roc_work);
|
||||
cancel_work_sync(&local->restart_work);
|
||||
cancel_work_sync(&local->reconfig_filter);
|
||||
flush_work(&local->sched_scan_stopped_work);
|
||||
|
Reference in New Issue
Block a user