mirror of
https://github.com/apache/nuttx.git
synced 2026-05-10 07:18:49 +08:00
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:
@@ -205,17 +205,19 @@ static void esp_evt_work_cb(void *arg)
|
||||
break;
|
||||
|
||||
case WIFI_EVENT_STA_DISCONNECTED:
|
||||
wifi_event_sta_disconnected_t *event =
|
||||
(wifi_event_sta_disconnected_t *)evt_adpt->buf;
|
||||
wifi_err_reason_t reason = event->reason;
|
||||
{
|
||||
wifi_event_sta_disconnected_t *event =
|
||||
(wifi_event_sta_disconnected_t *)evt_adpt->buf;
|
||||
wifi_err_reason_t reason = event->reason;
|
||||
|
||||
wlinfo("Wi-Fi station disconnected, reason: %u\n", reason);
|
||||
esp_wlan_sta_disconnect_hook();
|
||||
if (reason == WIFI_REASON_ASSOC_LEAVE)
|
||||
{
|
||||
work_queue(LPWORK, &g_wifi_evt_work, esp_reconnect_work_cb,
|
||||
NULL, 0);
|
||||
}
|
||||
wlinfo("Wi-Fi station disconnected, reason: %u\n", reason);
|
||||
esp_wlan_sta_disconnect_hook();
|
||||
if (reason == WIFI_REASON_ASSOC_LEAVE)
|
||||
{
|
||||
work_queue(LPWORK, &g_wifi_evt_work, esp_reconnect_work_cb,
|
||||
NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user