From 9ca2b27061f8b72d774efeea161d1d9acbab334d Mon Sep 17 00:00:00 2001 From: Chaitanya Tata Date: Tue, 10 Oct 2023 19:19:26 +0530 Subject: [PATCH] modules: hostap: Fix the macro rename The macro for crypto has been renamed (and as a choice), so, use the new macro to see if the crypto has been enabled. Fixes WPA2/WPA3 association. Signed-off-by: Chaitanya Tata --- modules/hostap/src/supp_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/hostap/src/supp_main.c b/modules/hostap/src/supp_main.c index 94c1eb8f1172..096ec0a4867f 100644 --- a/modules/hostap/src/supp_main.c +++ b/modules/hostap/src/supp_main.c @@ -16,9 +16,9 @@ #include LOG_MODULE_REGISTER(wpa_supplicant, LOG_LEVEL_DBG); -#if defined(CONFIG_WPA_SUPP_CRYPTO) && !defined(CONFIG_MBEDTLS_ENABLE_HEAP) +#if !defined(CONFIG_WPA_SUPP_CRYPTO_NONE) && !defined(CONFIG_MBEDTLS_ENABLE_HEAP) #include -#endif /* CONFIG_WPA_SUPP_CRYPTO */ +#endif /* !CONFIG_WPA_SUPP_CRYPTO_NONE && !CONFIG_MBEDTLS_ENABLE_HEAP */ #include @@ -466,10 +466,10 @@ static void z_wpas_start(void) struct wpa_params params; int exitcode = -1; -#if defined(CONFIG_WPA_SUPP_CRYPTO) && !defined(CONFIG_MBEDTLS_ENABLE_HEAP) +#if !defined(CONFIG_WPA_SUPP_CRYPTO_NONE) && !defined(CONFIG_MBEDTLS_ENABLE_HEAP) /* Needed for crypto operation as default is no-op and fails */ mbedtls_platform_set_calloc_free(calloc, free); -#endif /* CONFIG_WPA_CRYPTO */ +#endif /* !CONFIG_WPA_SUPP_CRYPTO_NONE && !CONFIG_MBEDTLS_ENABLE_HEAP */ k_work_queue_init(&z_wpas_iface_wq);