Skip to content

Commit

Permalink
modules: hostap: Fix the macro rename
Browse files Browse the repository at this point in the history
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 <Chaitanya.Tata@nordicsemi.no>
  • Loading branch information
krish2718 authored and nordicjm committed Oct 11, 2023
1 parent da1b186 commit 9ca2b27
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/hostap/src/supp_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include <sys/fcntl.h>
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 <mbedtls/platform.h>
#endif /* CONFIG_WPA_SUPP_CRYPTO */
#endif /* !CONFIG_WPA_SUPP_CRYPTO_NONE && !CONFIG_MBEDTLS_ENABLE_HEAP */

#include <zephyr/net/wifi_nm.h>

Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 9ca2b27

Please sign in to comment.