From bfdbe6cd86195839de7cd161f033e6546cf84f77 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Tue, 4 Nov 2025 14:44:32 +0800 Subject: [PATCH] fix(wifi): add migration guides for esp_wifi_init --- docs/en/migration-guides/release-6.x/6.0/wifi.rst | 2 ++ docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst | 2 ++ 2 files changed, 4 insertions(+) diff --git a/docs/en/migration-guides/release-6.x/6.0/wifi.rst b/docs/en/migration-guides/release-6.x/6.0/wifi.rst index bf81351511..1cdb5d2ec6 100644 --- a/docs/en/migration-guides/release-6.x/6.0/wifi.rst +++ b/docs/en/migration-guides/release-6.x/6.0/wifi.rst @@ -61,3 +61,5 @@ The following Wi-Fi functions have been modified. - **Off-Channel Operations:** - The structure :cpp:struct:`wifi_action_tx_req_t` now includes a ``bssid`` field that is placed in Address3 of the transmitted action frame. Initialise this field explicitly; leaving it all zeros retains the previous behaviour where the Wi-Fi driver inserts the broadcast address, so frames do not carry unintended BSSID values. - The structure :cpp:struct:`wifi_roc_req_t` now includes an ``allow_broadcast`` flag that controls whether broadcast and multicast action frames are passed to the ``rx_cb`` callback during remain-on-channel operations. Existing applications should review the default ``false`` value and enable it when discovery of broadcast peers is required. Frames whose Address3/BSSID is already broadcast continue to reach the callback even when ``allow_broadcast`` remains ``false``. + +- **Wi-Fi Initialization:** If the Wi-Fi driver has already been initialized by function `esp_wifi_init`, calling the function `esp_wifi_init` again will not reinitialize the driver and will return `ESP_ERR_INVALID_STATE` instead of `ESP_OK`. diff --git a/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst b/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst index 68cb03ad4c..c1547b1af6 100644 --- a/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst +++ b/docs/zh_CN/migration-guides/release-6.x/6.0/wifi.rst @@ -61,3 +61,5 @@ Wi-Fi - **离信道操作:** - 结构体 :cpp:struct:`wifi_action_tx_req_t` 新增 ``bssid`` 字段,该字段会写入发送动作帧的 Address3。请显式初始化该字段;保持全零时将沿用之前的行为,由 Wi-Fi 驱动填入广播地址,从而避免帧携带意外的 BSSID。 - 结构体 :cpp:struct:`wifi_roc_req_t` 新增 ``allow_broadcast`` 标志,用于控制在驻留信道期间是否将广播/组播动作帧传递给 ``rx_cb`` 回调。现有应用应结合默认值 ``false`` 评估是否需要启用该选项,以便在需要时进行广播节点发现。若动作帧的 Address3/BSSID 本身为广播地址,即便 ``allow_broadcast`` 保持 ``false``,回调仍会收到该帧。 + +- **Wi-Fi Initialization:** 如果 Wi-Fi 驱动已经初始化成功,再次调用函数 ``esp_wifi_init`` ,将不再返回 ``ESP_OK``,而是 ``ESP_ERR_INVALID_STATE``。