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 <moura.fmo@gmail.com>
This commit is contained in:
Felipe Moura 2026-08-16 17:45:04 -03:00 committed by Xiang Xiao
parent 6955aeb64b
commit 94703f50ad

View file

@ -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