|
@@ -545,7 +545,6 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
|
|
{
|
|
|
struct wpa_supplicant *wpa_s = eloop_ctx;
|
|
|
struct wpa_ssid *ssid;
|
|
|
- enum scan_req_type scan_req = NORMAL_SCAN_REQ;
|
|
|
int ret;
|
|
|
struct wpabuf *extra_ie = NULL;
|
|
|
struct wpa_driver_scan_params params;
|
|
@@ -630,7 +629,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
|
|
max_ssids = WPAS_MAX_SCAN_SSIDS;
|
|
|
}
|
|
|
|
|
|
- scan_req = wpa_s->scan_req;
|
|
|
+ wpa_s->last_scan_req = wpa_s->scan_req;
|
|
|
wpa_s->scan_req = NORMAL_SCAN_REQ;
|
|
|
|
|
|
os_memset(¶ms, 0, sizeof(params));
|
|
@@ -648,7 +647,8 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
|
|
goto scan;
|
|
|
}
|
|
|
|
|
|
- if (scan_req != MANUAL_SCAN_REQ && wpa_s->connect_without_scan) {
|
|
|
+ if (wpa_s->last_scan_req != MANUAL_SCAN_REQ &&
|
|
|
+ wpa_s->connect_without_scan) {
|
|
|
for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) {
|
|
|
if (ssid == wpa_s->connect_without_scan)
|
|
|
break;
|
|
@@ -687,7 +687,8 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (scan_req != MANUAL_SCAN_REQ && wpa_s->conf->ap_scan == 2) {
|
|
|
+ if (wpa_s->last_scan_req != MANUAL_SCAN_REQ &&
|
|
|
+ wpa_s->conf->ap_scan == 2) {
|
|
|
wpa_s->connect_without_scan = NULL;
|
|
|
wpa_s->prev_scan_wildcard = 0;
|
|
|
wpa_supplicant_assoc_try(wpa_s, ssid);
|
|
@@ -843,7 +844,8 @@ scan:
|
|
|
* station interface when we are not configured to prefer station
|
|
|
* connection and a concurrent operation is already in process.
|
|
|
*/
|
|
|
- if (wpa_s->scan_for_connection && scan_req == NORMAL_SCAN_REQ &&
|
|
|
+ if (wpa_s->scan_for_connection &&
|
|
|
+ wpa_s->last_scan_req == NORMAL_SCAN_REQ &&
|
|
|
!scan_params->freqs && !params.freqs &&
|
|
|
wpas_is_p2p_prioritized(wpa_s) &&
|
|
|
wpa_s->p2p_group_interface == NOT_P2P_GROUP_INTERFACE &&
|
|
@@ -874,7 +876,7 @@ scan:
|
|
|
if (prev_state != wpa_s->wpa_state)
|
|
|
wpa_supplicant_set_state(wpa_s, prev_state);
|
|
|
/* Restore scan_req since we will try to scan again */
|
|
|
- wpa_s->scan_req = scan_req;
|
|
|
+ wpa_s->scan_req = wpa_s->last_scan_req;
|
|
|
wpa_supplicant_req_scan(wpa_s, 1, 0);
|
|
|
} else {
|
|
|
wpa_s->scan_for_connection = 0;
|