aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant
diff options
context:
space:
mode:
Diffstat (limited to 'wpa_supplicant')
-rw-r--r--wpa_supplicant/config.c1
-rw-r--r--wpa_supplicant/config.h6
-rw-r--r--wpa_supplicant/config_file.c3
-rw-r--r--wpa_supplicant/ctrl_iface.c7
4 files changed, 15 insertions, 2 deletions
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index c89fb39..9d93161 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -3001,6 +3001,7 @@ static const struct global_parse_data global_fields[] = {
MAX_NUM_SCHED_SCAN_SHORT_INTERVALS), 0 },
{ INT_RANGE(sched_scan_short_interval, 1, MAX_SCHED_SCAN_INTERVAL), 0 },
{ INT_RANGE(sched_scan_long_interval, 1, MAX_SCHED_SCAN_INTERVAL), 0 },
+ { INT_RANGE(concurrent_sched_scan, 0, 1), 0 },
};
#undef FUNC
diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
index 31e7a9a..8273f14 100644
--- a/wpa_supplicant/config.h
+++ b/wpa_supplicant/config.h
@@ -747,6 +747,12 @@ struct wpa_config {
* p2p_disabled - Whether P2P operations are disabled for this interface
*/
int p2p_disabled;
+
+ /*
+ * concurrent_sched_scan - sched scan can run concurrently with normal
+ * scan and no need to stop one to do the other.
+ */
+ int concurrent_sched_scan;
};
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index 9bb01b4..cba8604 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -919,6 +919,9 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
if (config->p2p_conc_mode)
fprintf(f, "p2p_conc_mode=%u\n", config->p2p_conc_mode);
#endif
+ if (config->concurrent_sched_scan)
+ fprintf(f, "concurrent_sched_scan=%u\n",
+ config->concurrent_sched_scan);
}
#endif /* CONFIG_NO_CONFIG_WRITE */
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 8aad951..0f5f431 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -4577,13 +4577,16 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
if (wpa_s->wpa_state == WPA_INTERFACE_DISABLED)
reply_len = -1;
else {
- if (!wpa_s->sched_scanning && !wpa_s->scanning &&
+ if ((wpa_s->conf->concurrent_sched_scan ||
+ !wpa_s->sched_scanning) &&
+ !wpa_s->scanning &&
((wpa_s->wpa_state <= WPA_SCANNING) ||
(wpa_s->wpa_state == WPA_COMPLETED))) {
wpa_s->normal_scans = 0;
wpa_s->scan_req = 2;
wpa_supplicant_req_scan(wpa_s, 0, 0);
- } else if (wpa_s->sched_scanning) {
+ } else if (wpa_s->sched_scanning &&
+ !wpa_s->conf->concurrent_sched_scan) {
wpa_printf(MSG_DEBUG, "Stop ongoing "
"sched_scan to allow requested "
"full scan to proceed");