mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-03 10:32:33 +01:00
network: Check Autoconnectable as the first condition
This commit is contained in:
parent
c146490567
commit
5bfbdd5a01
@ -535,6 +535,15 @@ int network_autoconnect(struct network *network, struct scan_bss *bss)
|
|||||||
if (!network_settings_load(network))
|
if (!network_settings_load(network))
|
||||||
return -ENOKEY;
|
return -ENOKEY;
|
||||||
|
|
||||||
|
/* If no entry, default to Autoconnectable=True */
|
||||||
|
if (!l_settings_get_bool(network->settings, "Settings",
|
||||||
|
"Autoconnect", &is_autoconnectable))
|
||||||
|
is_autoconnectable = true;
|
||||||
|
|
||||||
|
ret = -EPERM;
|
||||||
|
if (!is_autoconnectable)
|
||||||
|
goto close_settings;
|
||||||
|
|
||||||
if (is_rsn) {
|
if (is_rsn) {
|
||||||
struct ie_rsn_info rsn;
|
struct ie_rsn_info rsn;
|
||||||
|
|
||||||
@ -555,15 +564,6 @@ int network_autoconnect(struct network *network, struct scan_bss *bss)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If no entry, default to Autoconnectable=True */
|
|
||||||
if (!l_settings_get_bool(network->settings, "Settings",
|
|
||||||
"Autoconnect", &is_autoconnectable))
|
|
||||||
is_autoconnectable = true;
|
|
||||||
|
|
||||||
ret = -EPERM;
|
|
||||||
if (!is_autoconnectable)
|
|
||||||
goto close_settings;
|
|
||||||
|
|
||||||
if (security == SECURITY_8021X) {
|
if (security == SECURITY_8021X) {
|
||||||
struct l_queue *missing_secrets = NULL;
|
struct l_queue *missing_secrets = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user