Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[noup] zephyr: Create dedicated heap for supplicant #74

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rado17
Copy link
Contributor

@rado17 rado17 commented Jan 2, 2025

Create dedicated heap for supplicant operations. Currently, WPA supplicant uses the k_malloc, which is shared across various subsystems, and we cannot enforce a minimum availability. Using a dedicated HEAP that can be pre-allocated solves this by always having necessary memory.

Create dedicated heap for supplicant operations.

Signed-off-by: Ravi Dondaputi <[email protected]>
@MaochenWang1
Copy link
Collaborator

why we need this dedicated heap for supplicant?
BTW, currently WPA supplicant uses the kernel k_malloc, not the libc malloc

@rado17
Copy link
Contributor Author

rado17 commented Jan 2, 2025

@sachinthegreen

why we need this dedicated heap for supplicant? BTW, currently WPA supplicant uses the kernel k_malloc, not the libc malloc

Updated the description to correct this. Since the kernel heap is shared across various subsystems, we cannot enforce a minimum availability for supplicant. Using a pre-allocated heap solves this problem.

Comment on lines +21 to +26
#if defined(CONFIG_NOCACHE_MEMORY)
K_HEAP_DEFINE_NOCACHE(wifi_nm_wpa_supplicant_mem_pool, CONFIG_WIFI_NM_WPA_SUPPLICANT_HEAP);
#else
K_HEAP_DEFINE(wifi_nm_wpa_supplicant_mem_pool, CONFIG_WIFI_NM_WPA_SUPPLICANT_HEAP);
#endif /* CONFIG_NOCACHE_MEMORY */
#define WORD_SIZE 4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need nocache memory for supplicant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants