Skip to content

Commit 0d2f23f

Browse files
gangli02dleach02
authored andcommitted
net: wifi: Fix the ap config command using the sta interface
The "wifi ap config" command uses the station interface via net_if_get_first_wifi(), and should use the ap interface. Signed-off-by: Gang Li <[email protected]>
1 parent cbaafe2 commit 0d2f23f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

subsys/net/l2/wifi/wifi_shell.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,11 @@ static int wifi_ap_config_args_to_params(const struct shell *sh, size_t argc, ch
16941694
static int cmd_wifi_ap_config_params(const struct shell *sh, size_t argc,
16951695
char *argv[])
16961696
{
1697+
#ifdef CONFIG_WIFI_NM_HOSTAPD_AP
1698+
struct net_if *iface = net_if_get_wifi_sap();
1699+
#else
16971700
struct net_if *iface = net_if_get_first_wifi();
1701+
#endif
16981702
struct wifi_ap_config_params ap_config_params = { 0 };
16991703
int ret = -1;
17001704

0 commit comments

Comments
 (0)