arch/xtensa: Scope Wi-Fi disconnect case declarations.

- fix a "a label can only be part of a statement and
  a declaration is not a statement" compile error.
- toolchain xtensa-esp32s3-elf-gcc
  (crosstool-NG esp-2021r2) 8.4.0

Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
This commit is contained in:
Shunchao Hu
2026-04-21 07:18:29 +08:00
committed by Xiang Xiao
parent 7141f487c0
commit 04cc4740ea
@@ -205,6 +205,7 @@ static void esp_evt_work_cb(void *arg)
break; break;
case WIFI_EVENT_STA_DISCONNECTED: case WIFI_EVENT_STA_DISCONNECTED:
{
wifi_event_sta_disconnected_t *event = wifi_event_sta_disconnected_t *event =
(wifi_event_sta_disconnected_t *)evt_adpt->buf; (wifi_event_sta_disconnected_t *)evt_adpt->buf;
wifi_err_reason_t reason = event->reason; wifi_err_reason_t reason = event->reason;
@@ -216,6 +217,7 @@ static void esp_evt_work_cb(void *arg)
work_queue(LPWORK, &g_wifi_evt_work, esp_reconnect_work_cb, work_queue(LPWORK, &g_wifi_evt_work, esp_reconnect_work_cb,
NULL, 0); NULL, 0);
} }
}
break; break;