Add disable_scan_offload parameter to disable automatic scan offloading

This new configuration parameter can be used to disable automatic
offloading of scan requests to the driver which was previously used
by default if the driver supported sched_scan.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2012-04-17 16:30:15 +03:00 committed by Jouni Malinen
parent 5b9cecafaf
commit 54ddd74369
4 changed files with 14 additions and 1 deletions

View file

@ -2822,6 +2822,7 @@ static const struct global_parse_data global_fields[] = {
#endif /* CONFIG_CTRL_IFACE */
{ INT_RANGE(eapol_version, 1, 2), 0 },
{ INT(ap_scan), 0 },
{ INT(disable_scan_offload), 0 },
{ INT(fast_reauth), 0 },
{ STR(opensc_engine_path), 0 },
{ STR(pkcs11_engine_path), 0 },

View file

@ -243,6 +243,15 @@ struct wpa_config {
*/
int ap_scan;
/**
* disable_scan_offload - Disable automatic offloading of scan requests
*
* By default, %wpa_supplicant tries to offload scanning if the driver
* indicates support for this (sched_scan). This configuration
* parameter can be used to disable this offloading mechanism.
*/
int disable_scan_offload;
/**
* ctrl_interface - Parameters for the control interface
*

View file

@ -710,6 +710,9 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
fprintf(f, "eapol_version=%d\n", config->eapol_version);
if (config->ap_scan != DEFAULT_AP_SCAN)
fprintf(f, "ap_scan=%d\n", config->ap_scan);
if (config->disable_scan_offload)
fprintf(f, "disable_scan_offload=%d\n",
config->disable_scan_offload);
if (config->fast_reauth != DEFAULT_FAST_REAUTH)
fprintf(f, "fast_reauth=%d\n", config->fast_reauth);
if (config->opensc_engine_path)

View file

@ -755,7 +755,7 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
max_sched_scan_ssids = WPAS_MAX_SCAN_SSIDS;
else
max_sched_scan_ssids = wpa_s->max_sched_scan_ssids;
if (max_sched_scan_ssids < 1)
if (max_sched_scan_ssids < 1 || wpa_s->conf->disable_scan_offload)
return -1;
if (wpa_s->sched_scanning) {