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.
This commit is contained in:
Sean Anderson 2021-04-30 13:42:38 -04:00 committed by Denis Kenzior
parent 486c859ad6
commit 1134e55150
1 changed files with 5 additions and 2 deletions

View File

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