From 94703f50ad669c558243bea2d9314f0bc9358e19 Mon Sep 17 00:00:00 2001 From: Felipe Moura Date: Sun, 16 Aug 2026 17:45:04 -0300 Subject: [PATCH] arch/risc-v/espressif: fix SoftAP-only build of the Wi-Fi event handler esp_reconnect_work_cb() dereferences g_sta_reconnect, which is only declared under ESP_WLAN_HAS_STA, so CONFIG_ESPRESSIF_WIFI_SOFTAP alone fails to compile. Guard the callback as the Xtensa counterpart does. Assisted-by: Claude Code:claude-opus-5 Signed-off-by: Felipe Moura --- arch/risc-v/src/common/espressif/esp_wifi_event_handler.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/risc-v/src/common/espressif/esp_wifi_event_handler.c b/arch/risc-v/src/common/espressif/esp_wifi_event_handler.c index eb64138b551..02e63f246b8 100644 --- a/arch/risc-v/src/common/espressif/esp_wifi_event_handler.c +++ b/arch/risc-v/src/common/espressif/esp_wifi_event_handler.c @@ -97,6 +97,7 @@ static bool g_wifi_handler_registered; * ****************************************************************************/ +#ifdef ESP_WLAN_HAS_STA static void esp_reconnect_work_cb(void *arg) { UNUSED(arg); @@ -113,6 +114,7 @@ static void esp_reconnect_work_cb(void *arg) wlerr("Failed to reconnect to Wi-Fi on callback\n"); } } +#endif /* ESP_WLAN_HAS_STA */ /**************************************************************************** * Name: esp_wifi_event_handler