[RFC,4/4] wifi: cfg80211: move scan done work to cfg80211 workqueue
Commit Message
From: Johannes Berg <johannes.berg@intel.com>
Now that we have the cfg80211 workqueue, move the scan_done work
to it as an example.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/wireless/core.c | 1 -
net/wireless/scan.c | 5 ++---
2 files changed, 2 insertions(+), 4 deletions(-)
@@ -1082,7 +1082,6 @@ void wiphy_unregister(struct wiphy *wiphy)
*/
flush_workqueue(rdev->wq);
- flush_work(&rdev->scan_done_wk);
cancel_work_sync(&rdev->conn_work);
flush_work(&rdev->event_work);
cancel_delayed_work_sync(&rdev->dfs_update_channels_wk);
@@ -1007,9 +1007,7 @@ void __cfg80211_scan_done(struct work_struct *wk)
rdev = container_of(wk, struct cfg80211_registered_device,
scan_done_wk);
- wiphy_lock(&rdev->wiphy);
___cfg80211_scan_done(rdev, true);
- wiphy_unlock(&rdev->wiphy);
}
void cfg80211_scan_done(struct cfg80211_scan_request *request,
@@ -1035,7 +1033,8 @@ void cfg80211_scan_done(struct cfg80211_scan_request *request,
}
request->notified = true;
- queue_work(cfg80211_wq, &wiphy_to_rdev(request->wiphy)->scan_done_wk);
+ wiphy_queue_work(request->wiphy,
+ &wiphy_to_rdev(request->wiphy)->scan_done_wk);
}
EXPORT_SYMBOL(cfg80211_scan_done);