Add an option to request a connection without a new scan
This commit is contained in:
parent
64e58f5189
commit
8cd82735cb
2 changed files with 7 additions and 2 deletions
|
@ -291,7 +291,8 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
||||||
|
|
||||||
if (wpa_s->scan_res_tried == 0 && wpa_s->conf->ap_scan == 1 &&
|
if (wpa_s->scan_res_tried == 0 && wpa_s->conf->ap_scan == 1 &&
|
||||||
!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME) &&
|
!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME) &&
|
||||||
wps != 2 && !wpa_s->conf->filter_ssids) {
|
wps != 2 && !wpa_s->conf->filter_ssids &&
|
||||||
|
!wpa_s->connect_without_scan) {
|
||||||
wpa_s->scan_res_tried++;
|
wpa_s->scan_res_tried++;
|
||||||
wpa_printf(MSG_DEBUG, "Trying to get current scan results "
|
wpa_printf(MSG_DEBUG, "Trying to get current scan results "
|
||||||
"first without requesting a new scan to speed up "
|
"first without requesting a new scan to speed up "
|
||||||
|
@ -322,7 +323,9 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (scan_req != 2 && wpa_s->conf->ap_scan == 2) {
|
if (scan_req != 2 && (wpa_s->conf->ap_scan == 2 ||
|
||||||
|
wpa_s->connect_without_scan)) {
|
||||||
|
wpa_s->connect_without_scan = 0;
|
||||||
wpa_supplicant_assoc_try(wpa_s, ssid);
|
wpa_supplicant_assoc_try(wpa_s, ssid);
|
||||||
return;
|
return;
|
||||||
} else if (wpa_s->conf->ap_scan == 2) {
|
} else if (wpa_s->conf->ap_scan == 2) {
|
||||||
|
|
|
@ -430,6 +430,8 @@ struct wpa_supplicant {
|
||||||
const struct bgscan_ops *bgscan;
|
const struct bgscan_ops *bgscan;
|
||||||
void *bgscan_priv;
|
void *bgscan_priv;
|
||||||
|
|
||||||
|
int connect_without_scan;
|
||||||
|
|
||||||
int after_wps;
|
int after_wps;
|
||||||
unsigned int wps_freq;
|
unsigned int wps_freq;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue