This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch releases/13.0
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/releases/13.0 by this push:
new b32a70b11a8 arch/risc-v/espressif: fix SoftAP-only build of the Wi-Fi
event handler
b32a70b11a8 is described below
commit b32a70b11a83bd9b867d022f82229322653f1a44
Author: Felipe Moura <[email protected]>
AuthorDate: Sun Aug 16 17:45:04 2026 -0300
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 <[email protected]>
---
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 67273a9c220..bc816428118 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
@@ -100,6 +100,7 @@ static bool g_wifi_handler_registered;
*
****************************************************************************/
+#ifdef ESP_WLAN_HAS_STA
static void esp_reconnect_work_cb(void *arg)
{
UNUSED(arg);
@@ -119,6 +120,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