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:
Ondřej Pohořelský 2023-11-07 15:19:48 +01:00 committed by Felipe Borges
parent 0a0a7bb881
commit 7f104fb9c8
3 changed files with 5 additions and 13 deletions

View file

@ -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;

View file

@ -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"))

View file

@ -230,8 +230,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);
@ -239,8 +238,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 {