network: remove wpa-none
from key_mgmt
Network Manager dropped `wpa-none` value from `key_mgmt` a while ago[0]
There is no need to test for this option anymore.
[0]c97e0ce30b
This commit is contained in:
parent
2a409e7872
commit
cc529478dc
3 changed files with 5 additions and 13 deletions
|
@ -233,8 +233,7 @@ get_connection_security_type (NMConnection *c)
|
|||
if (g_strcmp0 (key_mgmt, "none") == 0)
|
||||
return "WEP";
|
||||
|
||||
if (g_strcmp0 (key_mgmt, "wpa-none") == 0 ||
|
||||
g_strcmp0 (key_mgmt, "wpa-psk") == 0)
|
||||
if (g_strcmp0 (key_mgmt, "wpa-psk") == 0)
|
||||
return "WPA";
|
||||
|
||||
return "nopass";
|
||||
|
@ -255,11 +254,7 @@ is_qr_code_supported (NMConnection *c)
|
|||
|
||||
key_mgmt = nm_setting_wireless_security_get_key_mgmt (setting);
|
||||
|
||||
/* No IEEE 802.1x */
|
||||
if (g_str_equal (key_mgmt, "none"))
|
||||
return TRUE;
|
||||
|
||||
if (g_str_equal (key_mgmt, "wpa-none") ||
|
||||
if (g_str_equal (key_mgmt, "none") ||
|
||||
g_str_equal (key_mgmt, "wpa-psk"))
|
||||
return TRUE;
|
||||
|
||||
|
|
|
@ -98,8 +98,7 @@ get_default_type_for_security (NMSettingWirelessSecurity *sec)
|
|||
}
|
||||
#endif
|
||||
|
||||
if ( !strcmp (key_mgmt, "wpa-none")
|
||||
|| !strcmp (key_mgmt, "wpa-psk")) {
|
||||
if ( !strcmp (key_mgmt, "wpa-psk")) {
|
||||
if (find_proto (sec, "rsn"))
|
||||
return NMU_SEC_WPA2_PSK;
|
||||
else if (find_proto (sec, "wpa"))
|
||||
|
|
|
@ -222,8 +222,7 @@ device_get_hotspot_security_details (NetDeviceWifi *self,
|
|||
tmp_security = C_("Wifi security", "None");
|
||||
|
||||
/* Key management values:
|
||||
* "none" = WEP
|
||||
* "wpa-none" = WPAv1 Ad-Hoc mode (not supported in NM >= 0.9.4)
|
||||
* "none" = WEP or no password protection
|
||||
* "wpa-psk" = WPAv2 Ad-Hoc mode (eg IBSS RSN) and AP-mode WPA v1 and v2
|
||||
*/
|
||||
key_mgmt = nm_setting_wireless_security_get_key_mgmt (sws);
|
||||
|
@ -231,8 +230,7 @@ device_get_hotspot_security_details (NetDeviceWifi *self,
|
|||
tmp_secret = nm_setting_wireless_security_get_wep_key (sws, 0);
|
||||
tmp_security = _("WEP");
|
||||
}
|
||||
else if (strcmp (key_mgmt, "wpa-none") == 0 ||
|
||||
strcmp (key_mgmt, "wpa-psk") == 0) {
|
||||
else if (strcmp (key_mgmt, "wpa-psk") == 0) {
|
||||
tmp_secret = nm_setting_wireless_security_get_psk (sws);
|
||||
tmp_security = _("WPA");
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue