|
@@ -84,7 +84,7 @@ int wpa_supplicant_enabled_networks(struct wpa_config *conf)
|
|
|
struct wpa_ssid *ssid = conf->ssid;
|
|
|
int count = 0;
|
|
|
while (ssid) {
|
|
|
- if (!ssid->disabled)
|
|
|
+ if (!wpas_network_disabled(ssid))
|
|
|
count++;
|
|
|
ssid = ssid->next;
|
|
|
}
|
|
@@ -96,7 +96,7 @@ static void wpa_supplicant_assoc_try(struct wpa_supplicant *wpa_s,
|
|
|
struct wpa_ssid *ssid)
|
|
|
{
|
|
|
while (ssid) {
|
|
|
- if (!ssid->disabled)
|
|
|
+ if (!wpas_network_disabled(ssid))
|
|
|
break;
|
|
|
ssid = ssid->next;
|
|
|
}
|
|
@@ -553,7 +553,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
|
|
if (ssid == NULL && max_ssids > 1)
|
|
|
ssid = wpa_s->conf->ssid;
|
|
|
while (ssid) {
|
|
|
- if (!ssid->disabled && ssid->scan_ssid) {
|
|
|
+ if (!wpas_network_disabled(ssid) && ssid->scan_ssid) {
|
|
|
wpa_hexdump_ascii(MSG_DEBUG, "Scan SSID",
|
|
|
ssid->ssid, ssid->ssid_len);
|
|
|
params.ssids[params.num_ssids].ssid =
|
|
@@ -573,7 +573,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
|
|
|
}
|
|
|
|
|
|
for (tssid = wpa_s->conf->ssid; tssid; tssid = tssid->next) {
|
|
|
- if (tssid->disabled)
|
|
|
+ if (wpas_network_disabled(tssid))
|
|
|
continue;
|
|
|
if ((params.freqs || !freqs_set) && tssid->scan_freq) {
|
|
|
int_array_concat(¶ms.freqs,
|
|
@@ -689,7 +689,7 @@ void wpa_supplicant_req_scan(struct wpa_supplicant *wpa_s, int sec, int usec)
|
|
|
struct wpa_ssid *ssid = wpa_s->conf->ssid;
|
|
|
|
|
|
while (ssid) {
|
|
|
- if (!ssid->disabled && ssid->scan_ssid)
|
|
|
+ if (!wpas_network_disabled(ssid) && ssid->scan_ssid)
|
|
|
break;
|
|
|
ssid = ssid->next;
|
|
|
}
|
|
@@ -765,14 +765,15 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
|
|
|
|
|
|
need_ssids = 0;
|
|
|
for (ssid = wpa_s->conf->ssid; ssid; ssid = ssid->next) {
|
|
|
- if (!ssid->disabled && !ssid->scan_ssid) {
|
|
|
+ if (!wpas_network_disabled(ssid) && !ssid->scan_ssid) {
|
|
|
/* Use wildcard SSID to find this network */
|
|
|
wildcard = 1;
|
|
|
- } else if (!ssid->disabled && ssid->ssid_len)
|
|
|
+ } else if (!wpas_network_disabled(ssid) && ssid->ssid_len)
|
|
|
need_ssids++;
|
|
|
|
|
|
#ifdef CONFIG_WPS
|
|
|
- if (!ssid->disabled && ssid->key_mgmt == WPA_KEY_MGMT_WPS) {
|
|
|
+ if (!wpas_network_disabled(ssid) &&
|
|
|
+ ssid->key_mgmt == WPA_KEY_MGMT_WPS) {
|
|
|
/*
|
|
|
* Normal scan is more reliable and faster for WPS
|
|
|
* operations and since these are for short periods of
|
|
@@ -843,7 +844,7 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
|
|
|
}
|
|
|
|
|
|
while (ssid) {
|
|
|
- if (ssid->disabled)
|
|
|
+ if (wpas_network_disabled(ssid))
|
|
|
goto next;
|
|
|
|
|
|
if (params.num_filter_ssids < wpa_s->max_match_sets &&
|
|
@@ -880,7 +881,8 @@ int wpa_supplicant_req_sched_scan(struct wpa_supplicant *wpa_s)
|
|
|
do {
|
|
|
ssid = ssid->next;
|
|
|
} while (ssid &&
|
|
|
- (ssid->disabled || !ssid->scan_ssid));
|
|
|
+ (wpas_network_disabled(ssid) ||
|
|
|
+ !ssid->scan_ssid));
|
|
|
break;
|
|
|
}
|
|
|
}
|