diff options
author | Avraham Stern <avraham.stern@intel.com> | 2015-10-12 09:51:35 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-10-13 11:35:51 +0300 |
commit | e2845c458ea27e924b0f2cbd647ba43e810305a5 (patch) | |
tree | b762effd6672ba47cf85a761ac24e73333d6f6bb /net/mac80211/util.c | |
parent | 3b06d277957c7af705a9c0cdda4b371759efb717 (diff) | |
download | linux-e2845c458ea27e924b0f2cbd647ba43e810305a5.tar.xz |
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: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index fb6e511ee0be..8f0fa357a5a7 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -2042,9 +2042,13 @@ int ieee80211_reconfig(struct ieee80211_local *local) if (sched_scan_sdata && sched_scan_req) /* * 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_stopped = true; mutex_unlock(&local->mtx); |