Request new scan only for the original interface
Request new scan only for the interface for which the original scan request and results has come. Otherwise while sharing scan results along with P2P interfaces, the new scan will be requested on P2P interfaces. Signed-hostap: Jithu Jance <jithu@broadcom.com>
This commit is contained in:
parent
fa58da2e6c
commit
cc4952ad63
1 changed files with 10 additions and 5 deletions
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
#ifndef CONFIG_NO_SCAN_PROCESSING
|
#ifndef CONFIG_NO_SCAN_PROCESSING
|
||||||
static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
|
static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
|
||||||
int new_scan);
|
int new_scan, int own_request);
|
||||||
#endif /* CONFIG_NO_SCAN_PROCESSING */
|
#endif /* CONFIG_NO_SCAN_PROCESSING */
|
||||||
|
|
||||||
|
|
||||||
|
@ -1302,12 +1302,12 @@ static int _wpa_supplicant_event_scan_results(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
wpa_scan_results_free(scan_res);
|
wpa_scan_results_free(scan_res);
|
||||||
|
|
||||||
return wpas_select_network_from_last_scan(wpa_s, 1);
|
return wpas_select_network_from_last_scan(wpa_s, 1, own_request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
|
static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
|
||||||
int new_scan)
|
int new_scan, int own_request)
|
||||||
{
|
{
|
||||||
struct wpa_bss *selected;
|
struct wpa_bss *selected;
|
||||||
struct wpa_ssid *ssid = NULL;
|
struct wpa_ssid *ssid = NULL;
|
||||||
|
@ -1342,7 +1342,12 @@ static int wpas_select_network_from_last_scan(struct wpa_supplicant *wpa_s,
|
||||||
wpa_supplicant_associate(wpa_s, NULL, ssid);
|
wpa_supplicant_associate(wpa_s, NULL, ssid);
|
||||||
if (new_scan)
|
if (new_scan)
|
||||||
wpa_supplicant_rsn_preauth_scan_results(wpa_s);
|
wpa_supplicant_rsn_preauth_scan_results(wpa_s);
|
||||||
} else {
|
} else if (own_request) {
|
||||||
|
/*
|
||||||
|
* No SSID found. If SCAN results are as a result of
|
||||||
|
* own scan request and not due to a scan request on
|
||||||
|
* another shared interface, try another scan.
|
||||||
|
*/
|
||||||
int timeout_sec = wpa_s->scan_interval;
|
int timeout_sec = wpa_s->scan_interval;
|
||||||
int timeout_usec = 0;
|
int timeout_usec = 0;
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
|
@ -1446,7 +1451,7 @@ int wpa_supplicant_fast_associate(struct wpa_supplicant *wpa_s)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return wpas_select_network_from_last_scan(wpa_s, 0);
|
return wpas_select_network_from_last_scan(wpa_s, 0, 1);
|
||||||
#endif /* CONFIG_NO_SCAN_PROCESSING */
|
#endif /* CONFIG_NO_SCAN_PROCESSING */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue