This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 94703f50ad6 arch/risc-v/espressif: fix SoftAP-only build of the Wi-Fi
event handler
94703f50ad6 is described below
commit 94703f50ad669c558243bea2d9314f0bc9358e19
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 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