hostap: only add STA interface when hostapd enabled

For add_interface(), only add STA interface when hostapd enabled,
and the Soft-AP interface will be added in zephyr_hostapd_init().

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
This commit is contained in:
Maochen Wang 2024-09-02 12:27:52 +08:00 committed by Henrik Brix Andersen
parent 82700b8b88
commit e2f671ee00
1 changed files with 6 additions and 0 deletions

View File

@ -507,6 +507,12 @@ static void iface_cb(struct net_if *iface, void *user_data)
return;
}
#ifdef CONFIG_WIFI_NM_HOSTAPD_AP
if (wifi_nm_iface_is_sap(iface)) {
return;
}
#endif
if (!net_if_is_admin_up(iface)) {
return;
}