Skip to content

Commit c2472e8

Browse files
nxf58150nashif
authored andcommitted
net: l2: wifi: Fix issue command wifi connect fail.
Increase wifi connect input parameters max count to 13. Previous count 7 is not enough if other security type is supported. When enabling softAP, the parameter cnx_params in cmd_wifi_ap_enable() is with static key word. Then the parameter will always save configurations of last time. Remove static keyword to eliminate effects of configs from last tim and do memset before setting up softAP. Signed-off-by: Hui Bai <[email protected]>
1 parent dbc6cdc commit c2472e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

subsys/net/l2/wifi/wifi_shell.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,7 @@ static int cmd_wifi_ap_enable(const struct shell *sh, size_t argc,
13821382
char *argv[])
13831383
{
13841384
struct net_if *iface = net_if_get_wifi_sap();
1385-
static struct wifi_connect_req_params cnx_params;
1385+
struct wifi_connect_req_params cnx_params = {0};
13861386
int ret;
13871387

13881388
context.sh = sh;
@@ -2666,7 +2666,7 @@ SHELL_STATIC_SUBCMD_SET_CREATE(wifi_commands,
26662666
"[-K, --key-passwd]: Private key passwd for enterprise mode.\n"
26672667
"[-h, --help]: Print out the help for the connect command.\n",
26682668
cmd_wifi_connect,
2669-
2, 7),
2669+
2, 13),
26702670
SHELL_CMD_ARG(disconnect, NULL, "Disconnect from the Wi-Fi AP.\n",
26712671
cmd_wifi_disconnect,
26722672
1, 0),

0 commit comments

Comments
 (0)