From b18541768be23afb28d1aca5ab0f540400b7d45d Mon Sep 17 00:00:00 2001 From: Maochen Wang Date: Thu, 21 Nov 2024 03:53:19 +0800 Subject: [PATCH] hostap: distinguish suppliant AP and hostapd AP To make AP related code/config more clear and clean, use CONFIG_WIFI_NM_WPA_SUPPLICANT_AP for supplicant based AP case, and use CONFIG_WIFI_NM_HOSTAPD_AP for hostapd based AP case. Signed-off-by: Maochen Wang --- modules/hostap/CMakeLists.txt | 6 ++++-- modules/hostap/Kconfig | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/hostap/CMakeLists.txt b/modules/hostap/CMakeLists.txt index 744febe542a..56d4cc6c6d1 100644 --- a/modules/hostap/CMakeLists.txt +++ b/modules/hostap/CMakeLists.txt @@ -166,7 +166,8 @@ zephyr_library_sources_ifdef(CONFIG_IEEE80211R ${HOSTAP_SRC_BASE}/ap/wpa_auth_ft.c ) -zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_AP +if(CONFIG_WIFI_NM_WPA_SUPPLICANT_AP OR CONFIG_WIFI_NM_HOSTAPD_AP) +zephyr_library_sources( ${WIFI_NM_WPA_SUPPLICANT_BASE}/ap.c ${HOSTAP_SRC_BASE}/ap/ap_config.c ${HOSTAP_SRC_BASE}/ap/ap_drv_ops.c @@ -217,7 +218,7 @@ zephyr_library_sources_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_11AX ${HOSTAP_SRC_BASE}/ap/ieee802_11_he.c ) -zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_AP +zephyr_library_compile_definitions( CONFIG_AP CONFIG_NO_RADIUS CONFIG_NO_VLAN @@ -231,6 +232,7 @@ zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_AP zephyr_library_compile_definitions_ifdef(CONFIG_WIFI_NM_WPA_SUPPLICANT_11AX CONFIG_IEEE80211AX ) +endif() zephyr_include_directories_ifdef(CONFIG_WIFI_NM_HOSTAPD_AP ${WIFI_NM_HOSTAPD_BASE}/ diff --git a/modules/hostap/Kconfig b/modules/hostap/Kconfig index 4516fb88c9b..836f84b4baf 100644 --- a/modules/hostap/Kconfig +++ b/modules/hostap/Kconfig @@ -25,7 +25,7 @@ if WIFI_NM_WPA_SUPPLICANT config HEAP_MEM_POOL_ADD_SIZE_HOSTAP def_int 85000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE && !MBEDTLS_ENABLE_HEAP - def_int 40000 if WIFI_NM_WPA_SUPPLICANT_AP + def_int 40000 if WIFI_NM_WPA_SUPPLICANT_AP || WIFI_NM_HOSTAPD_AP # 8192 for MbedTLS heap def_int 21808 if MBEDTLS_ENABLE_HEAP # 30K is mandatory, but might need more for long duration use cases @@ -417,8 +417,8 @@ config TESTING_OPTIONS config AP bool - depends on WIFI_NM_WPA_SUPPLICANT_AP - default y if WIFI_NM_WPA_SUPPLICANT_AP + depends on WIFI_NM_WPA_SUPPLICANT_AP || WIFI_NM_HOSTAPD_AP + default y if WIFI_NM_WPA_SUPPLICANT_AP || WIFI_NM_HOSTAPD_AP config NO_RADIUS bool