Skip to content

Commit 7837f5e

Browse files
joelguittetkartben
authored andcommitted
drivers: wifi: esp32: fix integration of connection manager
Connection manager doesn't depends on ESP32 Wi-FI AP+STA mode. This modification fix integration of connection manager binding in the Wi-Fi ESP32 driver. Signed-off-by: Joel Guittet <joelguittet@gmail.com>
1 parent 29add12 commit 7837f5e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎drivers/wifi/esp32/src/esp_wifi_drv.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ LOG_MODULE_REGISTER(esp32_wifi, CONFIG_WIFI_LOG_LEVEL);
1313
#include <zephyr/net/net_pkt.h>
1414
#include <zephyr/net/net_if.h>
1515
#include <zephyr/net/wifi_mgmt.h>
16+
#if defined(CONFIG_NET_CONNECTION_MANAGER_CONNECTIVITY_WIFI_MGMT)
17+
#include <zephyr/net/conn_mgr/connectivity_wifi_mgmt.h>
18+
#endif
1619
#if defined(CONFIG_ESP32_WIFI_AP_STA_MODE)
1720
#include <zephyr/net/wifi_nm.h>
18-
#include <zephyr/net/conn_mgr/connectivity_wifi_mgmt.h>
1921
#endif
2022
#include <zephyr/device.h>
2123
#include <soc.h>
@@ -993,6 +995,8 @@ NET_DEVICE_DT_INST_DEFINE(1,
993995
NET_L2_GET_CTX_TYPE(ETHERNET_L2), NET_ETH_MTU);
994996

995997
DEFINE_WIFI_NM_INSTANCE(esp32_wifi_nm, &esp32_wifi_mgmt);
998+
#endif
996999

1000+
#if defined(CONFIG_NET_CONNECTION_MANAGER_CONNECTIVITY_WIFI_MGMT)
9971001
CONNECTIVITY_WIFI_MGMT_BIND(Z_DEVICE_DT_DEV_ID(DT_DRV_INST(0)));
9981002
#endif

0 commit comments

Comments
 (0)