From 3703e15a940a01585971bb59b152f3da6447847c Mon Sep 17 00:00:00 2001 From: Junchi Chen Date: Fri, 26 Dec 2025 20:01:34 +0800 Subject: [PATCH] fix(wifi): return specific error in API --- components/esp_wifi/include/esp_private/wifi.h | 6 ++++++ components/esp_wifi/include/esp_wifi.h | 2 ++ components/esp_wifi/lib | 2 +- components/esp_wifi/remote/include/injected/esp_wifi.h | 2 ++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/include/esp_private/wifi.h b/components/esp_wifi/include/esp_private/wifi.h index e8e6dc2830..c53a28dbd4 100644 --- a/components/esp_wifi/include/esp_private/wifi.h +++ b/components/esp_wifi/include/esp_private/wifi.h @@ -499,6 +499,9 @@ esp_err_t esp_wifi_internal_get_config_channel(wifi_interface_t ifx, uint8_t *pr * * @return * - ESP_OK: succeed + * - ESP_ERR_INVALID_ARG : invalid argument + * - ESP_ERR_WIFI_NOT_STARTED : WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_NOT_CONNECT : No connection between STA and AP */ esp_err_t esp_wifi_internal_get_negotiated_channel(wifi_interface_t ifx, uint8_t aid, uint8_t *primary, uint8_t *second); @@ -510,6 +513,9 @@ esp_err_t esp_wifi_internal_get_negotiated_channel(wifi_interface_t ifx, uint8_t * * @return * - ESP_OK: succeed + * - ESP_ERR_INVALID_ARG : invalid argument + * - ESP_ERR_WIFI_NOT_STARTED : WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_NOT_CONNECT : No connection between STA and AP */ esp_err_t esp_wifi_internal_get_negotiated_bandwidth(wifi_interface_t ifx, uint8_t aid, uint8_t *bw); diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index 9152c68d27..ee2713fc3a 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -1589,6 +1589,8 @@ esp_err_t esp_wifi_sta_get_aid(uint16_t *aid); * * @return * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_NOT_CONNECT: No connection between STA and AP */ esp_err_t esp_wifi_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode); diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index a711e3213f..c35e69a10c 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit a711e3213f500ab22bfb12bac4f9bd5711f143b4 +Subproject commit c35e69a10ca1c25a7765311656d97ee9c9e39f16 diff --git a/components/esp_wifi/remote/include/injected/esp_wifi.h b/components/esp_wifi/remote/include/injected/esp_wifi.h index 42ea067985..c6f602de34 100644 --- a/components/esp_wifi/remote/include/injected/esp_wifi.h +++ b/components/esp_wifi/remote/include/injected/esp_wifi.h @@ -1589,6 +1589,8 @@ esp_err_t esp_wifi_sta_get_aid(uint16_t *aid); * * @return * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_WIFI_NOT_CONNECT: No connection between STA and AP */ esp_err_t esp_wifi_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode);