From 1b8f8c5ab8fcadd2317b7e6a0a3b555fb50c1273 Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Thu, 26 Mar 2026 14:35:04 +0800 Subject: [PATCH 1/3] feat(wifi): Added new API to return value for vendor ie cb --- .../esp_wifi/include/esp_private/wifi.h | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/include/esp_private/wifi.h b/components/esp_wifi/include/esp_private/wifi.h index f5d7c0a3ef..37610d45c9 100644 --- a/components/esp_wifi/include/esp_private/wifi.h +++ b/components/esp_wifi/include/esp_private/wifi.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -846,6 +846,28 @@ void pm_beacon_offset_funcs_empty_init(void); */ void esp_wifi_enable_easy_fragment(bool enable); +/** + * @brief Function signature for received Vendor-Specific Information Element callback with return value. + * @param ctx Context argument, as passed to esp_wifi_set_vendor_ie_cb() when registering callback. + * @param type Information element type, based on frame type received. + * @param sa Source 802.11 address. + * @param vnd_ie Pointer to the vendor specific element data received. + * @param rssi Received signal strength indication. + */ +typedef esp_err_t (*esp_vendor_ie_cb_with_ret_t)(void *ctx, wifi_vendor_ie_type_t type, const uint8_t sa[6], const vendor_ie_data_t *vnd_ie, int rssi); + +/** + * @brief Register Vendor-Specific Information Element monitoring callback. + * + * @param cb Callback function with return value + * @param ctx Context argument, passed to callback function. + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + */ +esp_err_t esp_wifi_set_vendor_ie_with_ret_cb(esp_vendor_ie_cb_with_ret_t cb, void *ctx); + #ifdef __cplusplus } #endif From 0e1d7a5c329d83cb17963a0dc96867baa17e4d4e Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Thu, 12 Mar 2026 16:35:54 +0800 Subject: [PATCH 2/3] feat(wifi): add new api to return home channel info --- components/esp_wifi/include/esp_wifi.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index d88298e17c..5894489c0c 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2015-2026 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -805,6 +805,20 @@ esp_err_t esp_wifi_set_channel(uint8_t primary, wifi_second_chan_t second); */ esp_err_t esp_wifi_get_channel(uint8_t *primary, wifi_second_chan_t *second); +/** + * @brief Get the home channel of device + * + * @param primary store primary channel + * @param[out] second store second channel + * + * @return + * - ESP_OK: succeed + * - ESP_ERR_WIFI_NOT_INIT: WiFi is not initialized by esp_wifi_init + * - ESP_ERR_WIFI_NOT_STARTED: WiFi is not started by esp_wifi_start + * - ESP_ERR_INVALID_ARG: invalid argument + */ +esp_err_t esp_wifi_get_home_channel(uint8_t *primary, wifi_second_chan_t *second); + /** * @brief configure country info * From 2c3f1b72a4ada26afaf2dad9a1a8433662643247 Mon Sep 17 00:00:00 2001 From: zhangyanjiao Date: Tue, 7 Apr 2026 10:21:26 +0800 Subject: [PATCH 3/3] feat(wifi): update wifi lib for vendor ie cb and home channel --- components/esp_wifi/lib | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 70f2a4b2ce..237d8463de 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 70f2a4b2ced458bacf1c1138b470f6adf5186611 +Subproject commit 237d8463de9e9d8c8c2e48f307203ba85340c236