Commit e2845c45 authored by Avraham Stern's avatar Avraham Stern Committed by Johannes Berg

mac80211: Do not restart scheduled scan if multiple scan plans are set

If multiple scan plans were set for scheduled scan, do not restart
scheduled scan on reconfig because it is possible that some scan
plans were already completed and there is no need to run them all
over again. Instead, notify userspace that scheduled scan stopped
so it can configure new scan plans for scheduled scan.
Signed-off-by: default avatarAvraham Stern <avraham.stern@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 3b06d277
...@@ -2042,9 +2042,13 @@ int ieee80211_reconfig(struct ieee80211_local *local) ...@@ -2042,9 +2042,13 @@ int ieee80211_reconfig(struct ieee80211_local *local)
if (sched_scan_sdata && sched_scan_req) if (sched_scan_sdata && sched_scan_req)
/* /*
* Sched scan stopped, but we don't want to report it. Instead, * Sched scan stopped, but we don't want to report it. Instead,
* we're trying to reschedule. * we're trying to reschedule. However, if more than one scan
* plan was set, we cannot reschedule since we don't know which
* scan plan was currently running (and some scan plans may have
* already finished).
*/ */
if (__ieee80211_request_sched_scan_start(sched_scan_sdata, if (sched_scan_req->n_scan_plans > 1 ||
__ieee80211_request_sched_scan_start(sched_scan_sdata,
sched_scan_req)) sched_scan_req))
sched_scan_stopped = true; sched_scan_stopped = true;
mutex_unlock(&local->mtx); mutex_unlock(&local->mtx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment