summaryrefslogtreecommitdiff
path: root/clients/cli/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'clients/cli/devices.c')
-rw-r--r--clients/cli/devices.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/clients/cli/devices.c b/clients/cli/devices.c
index b35e0f172c..0c38419234 100644
--- a/clients/cli/devices.c
+++ b/clients/cli/devices.c
@@ -2782,22 +2782,21 @@ set_wireless_security_for_hotspot (NMSettingWirelessSecurity *s_wsec,
if (g_strcmp0 (wifi_mode, NM_SETTING_WIRELESS_MODE_AP) == 0) {
if (caps & NM_WIFI_DEVICE_CAP_RSN) {
nm_setting_wireless_security_add_proto (s_wsec, "rsn");
- nm_setting_wireless_security_add_pairwise (s_wsec, "none");
nm_setting_wireless_security_add_pairwise (s_wsec, "ccmp");
nm_setting_wireless_security_add_group (s_wsec, "ccmp");
- key_mgmt = "wpa-none";
+ key_mgmt = "wpa-psk";
} else if (caps & NM_WIFI_DEVICE_CAP_WPA) {
nm_setting_wireless_security_add_proto (s_wsec, "wpa");
- nm_setting_wireless_security_add_pairwise (s_wsec, "none");
nm_setting_wireless_security_add_pairwise (s_wsec, "tkip");
nm_setting_wireless_security_add_group (s_wsec, "tkip");
- key_mgmt = "wpa-none";
+ key_mgmt = "wpa-psk";
} else
key_mgmt = "none";
} else
key_mgmt = "none";
- if (g_strcmp0 (key_mgmt, "wpa-none") == 0) {
+ if (g_strcmp0 (key_mgmt, "wpa-psk") == 0) {
+ /* use WPA */
if (password) {
if (!nm_utils_wpa_psk_valid (password)) {
g_set_error (error, NMCLI_ERROR, 0, _("'%s' is not valid WPA PSK"), password);
@@ -2813,6 +2812,7 @@ set_wireless_security_for_hotspot (NMSettingWirelessSecurity *s_wsec,
NM_SETTING_WIRELESS_SECURITY_PSK, key,
NULL);
} else {
+ /* use WEP */
if (password) {
if (!nm_utils_wep_key_valid (password, NM_WEP_KEY_TYPE_KEY)) {
g_set_error (error, NMCLI_ERROR, 0,