From 1134e55150de1a9c2b17aa5e6a941f4a8e7a6840 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Fri, 30 Apr 2021 13:42:38 -0400 Subject: [PATCH] client: Show WEP networks as unsupported WEP networks are not supported by iwd. However, the only indication is the message "Operation not supported" while trying to connect. It is not clear enough that this is due to intentional lack of support (as opposed to some kind of misconfiguration). This patch explicitly lists WEP networks shown with get-networks as unsupported. Hopefully this will make it clearer for those of us not as familiar with iwd. --- client/station.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/station.c b/client/station.c index de25d12b..425b10a1 100644 --- a/client/station.c +++ b/client/station.c @@ -352,7 +352,7 @@ static void ordered_networks_display(struct l_queue *ordered_networks) display_table_header("Available networks", "%s%-*s%-*s%-*s%*s", MARGIN, 2, "", 32, "Network name", - 10, "Security", 6, "Signal"); + 18, "Security", 6, "Signal"); if (!l_queue_length(ordered_networks)) { display("No networks available\n"); @@ -369,13 +369,16 @@ static void ordered_networks_display(struct l_queue *ordered_networks) const char *network_name = network_get_name(network_i); const char *network_type = network_get_type(network_i); + if (!strcmp(network_type, "wep")) + network_type = "wep (unsupported)"; + if (display_signal_as_dbms) dbms = l_strdup_printf("%d", network->signal_strength); display("%s%-*s%-*s%-*s%-*s\n", MARGIN, 2, network_is_connected(network_i) ? COLOR_BOLDGRAY "> " COLOR_OFF : "", - 32, network_name, 10, network_type, + 32, network_name, 18, network_type, 6, display_signal_as_dbms ? dbms : dbms_tostars(network->signal_strength));