Skip to content

Commit

Permalink
net: wifi_credentials: Fix commands mixup
Browse files Browse the repository at this point in the history
With the recent changes to Wi-Fi shell to use the separate command
declaration so that Wi-Fi commands can be extended externally, this
causes some sort of conflict with wifi_cred, possibly because both
command parent names start with "wifi", few commands from "wifi" end up
wth "wifi_cred".

As we debug the root cause, temporarily renamed the parent to
"nwifi_cred" to avoid this mixup, the shell command is still
"wifi_cred", so, this is acceptable.

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 authored and simensrostad committed Oct 23, 2024
1 parent 9d46bb1 commit 39674b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions subsys/net/lib/wifi_credentials/wifi_credentials_shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ static int cmd_list_networks(const struct shell *shell, size_t argc, char *argv[
return 0;
}

SHELL_SUBCMD_SET_CREATE(sub_wifi_cred, (wifi_cred));
SHELL_SUBCMD_ADD((wifi_cred),
SHELL_SUBCMD_SET_CREATE(sub_wifi_cred, (nwifi_cred));
SHELL_SUBCMD_ADD((nwifi_cred),
add, NULL,
"Add network to storage.\n"
"<-s --ssid \"<SSID>\">: SSID.\n"
Expand All @@ -338,9 +338,9 @@ SHELL_SUBCMD_ADD((wifi_cred),
"[-K, --key-passwd]: Private key passwd for enterprise mode.\n"
"[-h, --help]: Print out the help for the connect command.\n",
cmd_add_network, 2, 12);
SHELL_SUBCMD_ADD((wifi_cred),
SHELL_SUBCMD_ADD((nwifi_cred),
delete, NULL, "Delete network from storage.", cmd_delete_network, 0, 0);
SHELL_SUBCMD_ADD((wifi_cred),
SHELL_SUBCMD_ADD((nwifi_cred),
list, NULL, "List stored networks.", cmd_list_networks, 0, 0);

SHELL_CMD_REGISTER(wifi_cred, &sub_wifi_cred, "Wi-Fi Credentials commands", NULL);

0 comments on commit 39674b6

Please sign in to comment.