Interworking: Prevent scan during ANQP fetch and Interworking select

Reject external scan request while either ANQP fetch or Interworking
select is in progress. Not doing so could lead to a situation in which
Interworking automatic network selection does not get triggered because
of a new scan result event forcing the ANQP fetch cycle to be disrupted
and restarted all over again. Interworking automatic network selection
is only triggered when AQNP fetch cycle, that is, ANQP exchange with
every Interworking capable BSS in the current BSS list, is completed.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Neelansh Mittal 2015-03-20 00:32:44 +05:30 committed by Jouni Malinen
parent 97c6d0d873
commit 9772af66ba

View file

@ -6943,6 +6943,15 @@ static void wpas_ctrl_scan(struct wpa_supplicant *wpa_s, char *params,
return; return;
} }
#ifdef CONFIG_INTERWORKING
if (wpa_s->fetch_anqp_in_progress || wpa_s->network_select) {
wpa_printf(MSG_DEBUG,
"Interworking select in progress - reject new scan");
*reply_len = os_snprintf(reply, reply_size, "FAIL-BUSY\n");
return;
}
#endif /* CONFIG_INTERWORKING */
if (params) { if (params) {
if (os_strncasecmp(params, "TYPE=ONLY", 9) == 0) if (os_strncasecmp(params, "TYPE=ONLY", 9) == 0)
scan_only = 1; scan_only = 1;