Skip to content

Commit cbc47b6

Browse files
committed
modules: hostap: Define dedicated heap for supplicant
Create dedicated heap for supplicant operations and define the heap size. Signed-off-by: Ravi Dondaputi <ravi.dondaputi@nordicsemi.no>
1 parent 4852719 commit cbc47b6

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

modules/hostap/Kconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,33 @@ config WIFI_NM_WPA_SUPPLICANT
2424

2525
if WIFI_NM_WPA_SUPPLICANT
2626

27+
config WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP
28+
bool "Use Zephyr kernel heap for Wi-Fi driver"
29+
default y
30+
help
31+
Enable this option to use K_HEAP for memory allocations in supplicant.
32+
33+
if !WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP
34+
config WIFI_NM_WPA_SUPPLICANT_HEAP
35+
int "Dedicated memory pool for wpa_supplicant"
36+
def_int 66560 if WIFI_NM_HOSTAPD_AP
37+
def_int 55000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE && WIFI_CREDENTIALS
38+
def_int 48000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
39+
def_int 41808 if WIFI_NM_WPA_SUPPLICANT_AP
40+
# 30K is mandatory, but might need more for long duration use cases
41+
def_int 30000
42+
endif # !WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP
43+
44+
if WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP
2745
config HEAP_MEM_POOL_ADD_SIZE_HOSTAP
2846
def_int 66560 if WIFI_NM_HOSTAPD_AP
2947
def_int 55000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE && WIFI_CREDENTIALS
3048
def_int 48000 if WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
3149
def_int 41808 if WIFI_NM_WPA_SUPPLICANT_AP
3250
# 30K is mandatory, but might need more for long duration use cases
3351
def_int 30000
52+
endif # !WIFI_NM_WPA_SUPPLICANT_GLOBAL_HEAP
53+
3454

3555
config WIFI_NM_WPA_SUPPLICANT_THREAD_STACK_SIZE
3656
int "Stack size for wpa_supplicant thread"

0 commit comments

Comments
 (0)