From 5846d1d86a54121812b3c8913a0c8b1f884fd61c Mon Sep 17 00:00:00 2001 From: Ravi Dondaputi Date: Mon, 30 Dec 2024 15:18:53 +0530 Subject: [PATCH 1/2] modules: hostap: Define dedicated heap for supplicant Create dedicated heap for supplicant operations and define the heap size. Signed-off-by: Ravi Dondaputi --- modules/hostap/Kconfig | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/hostap/Kconfig b/modules/hostap/Kconfig index 5d245323d1f58..2d5bec09dba90 100644 --- a/modules/hostap/Kconfig +++ b/modules/hostap/Kconfig @@ -24,6 +24,24 @@ config WIFI_NM_WPA_SUPPLICANT if WIFI_NM_WPA_SUPPLICANT +config WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP + bool "Use Zephyr kernel heap for Wi-Fi driver" + default y + help + Enable this option to use K_HEAP for memory allocations in supplicant. + +if !WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP +config WIFI_NM_WPA_SUPPLICANT_HEAP + int "Dedicated memory pool for wpa_supplicant" + def_int 66560 if WIFI_NM_HOSTAPD_AP + def_int 55000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE && WIFI_CREDENTIALS + def_int 48000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE + def_int 41808 if WIFI_NM_WPA_SUPPLICANT_AP + # 30K is mandatory, but might need more for long duration use cases + def_int 30000 +endif # !WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP + +if WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP config HEAP_MEM_POOL_ADD_SIZE_HOSTAP def_int 66560 if WIFI_NM_HOSTAPD_AP def_int 55000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE && WIFI_CREDENTIALS @@ -31,6 +49,8 @@ config HEAP_MEM_POOL_ADD_SIZE_HOSTAP def_int 41808 if WIFI_NM_WPA_SUPPLICANT_AP # 30K is mandatory, but might need more for long duration use cases def_int 30000 +endif # WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP + config WIFI_NM_WPA_SUPPLICANT_THREAD_STACK_SIZE int "Stack size for wpa_supplicant thread" From 67ff9c49e60731c50a7eee50e0a87b5717d51ca6 Mon Sep 17 00:00:00 2001 From: Ravi Dondaputi Date: Thu, 2 Jan 2025 14:20:23 +0530 Subject: [PATCH 2/2] manifest: hostap: Pull in changes for dedicated heap Pull in changes for dedicated heap for supplicant operations. Signed-off-by: Ravi Dondaputi --- west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/west.yml b/west.yml index fe8253bfa2f22..3779da9132a86 100644 --- a/west.yml +++ b/west.yml @@ -281,7 +281,7 @@ manifest: - hal - name: hostap path: modules/lib/hostap - revision: bc5d22f5838d017b889d1452a5854f9a32895414 + revision: pull/74/head - name: liblc3 revision: 48bbd3eacd36e99a57317a0a4867002e0b09e183 path: modules/lib/liblc3