summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/scan.c1
-rw-r--r--net/mac80211/work.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index a4c63d4e684..30cb62bb45b 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -284,6 +284,7 @@ void ieee80211_scan_completed(struct ieee80211_hw *hw, bool aborted)
ieee80211_mlme_notify_scan_completed(local);
ieee80211_ibss_notify_scan_completed(local);
ieee80211_mesh_notify_scan_completed(local);
+ ieee80211_queue_work(&local->hw, &local->work_work);
}
EXPORT_SYMBOL(ieee80211_scan_completed);
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index 5ba75990c9f..7c5d95b1bc0 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -818,6 +818,7 @@ static void ieee80211_work_work(struct work_struct *work)
wk->chan == local->tmp_channel &&
wk->chan_type == local->tmp_channel_type) {
wk->started = true;
+ wk->timeout = jiffies;
}
if (!wk->started && !local->tmp_channel) {
@@ -935,6 +936,9 @@ void ieee80211_add_work(struct ieee80211_work *wk)
if (WARN_ON(!wk->done))
return;
+ if (WARN_ON(!ieee80211_sdata_running(wk->sdata)))
+ return;
+
wk->started = false;
local = wk->sdata->local;