fix(esp_wifi): Address review comments

This commit is contained in:
Kapil Gupta
2025-09-24 18:38:06 +05:30
parent b0498569c8
commit ce00aa9b78
4 changed files with 69 additions and 26 deletions

View File

@@ -476,8 +476,8 @@ static void nan_app_action_receive(void *arg, esp_event_base_t event_base, int32
ESP_LOGD(TAG, "Received payload from Peer "MACSTR" [Peer Service id - %d] - ", MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
ESP_LOG_BUFFER_HEXDUMP(TAG, evt->ssi, evt->ssi_len, ESP_LOG_DEBUG);
} else {
ESP_LOGD(TAG, "Received message '%s' from Peer "MACSTR" [Peer Service id - %d]",
evt->peer_svc_info, MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
ESP_LOGD(TAG, "Received message from Peer "MACSTR" [Peer Service id - %d]",
MAC2STR(evt->peer_if_mac), evt->peer_inst_id);
}
NAN_DATA_LOCK();

View File

@@ -8,29 +8,6 @@ Removed Functions and Types
The following functions and types have been removed.
- **WPA2 Enterprise:** The header file :project_file:`components/wpa_supplicant/esp_supplicant/include/esp_wpa2.h` has been removed. Please use the APIs from :project_file:`components/wpa_supplicant/esp_supplicant/include/esp_eap_client.h` instead. The following functions have been removed:
- ``esp_wifi_sta_wpa2_ent_enable``, use ``esp_eap_client_enable`` instead.
- ``esp_wifi_sta_wpa2_ent_disable``, use ``esp_eap_client_disable`` instead.
- ``esp_wifi_sta_wpa2_ent_set_identity``, use ``esp_eap_client_set_identity`` instead.
- ``esp_wifi_sta_wpa2_ent_clear_identity``, use ``esp_eap_client_clear_identity`` instead.
- ``esp_wifi_sta_wpa2_ent_set_username``, use ``esp_eap_client_set_username`` instead.
- ``esp_wifi_sta_wpa2_ent_clear_username``, use ``esp_eap_client_clear_username`` instead.
- ``esp_wifi_sta_wpa2_ent_set_password``, use ``esp_eap_client_set_password`` instead.
- ``esp_wifi_sta_wpa2_ent_clear_password``, use ``esp_eap_client_clear_password`` instead.
- ``esp_wifi_sta_wpa2_ent_set_new_password``, use ``esp_eap_client_set_new_password`` instead.
- ``esp_wifi_sta_wpa2_ent_clear_new_password``, use ``esp_eap_client_clear_new_password`` instead.
- ``esp_wifi_sta_wpa2_ent_set_ca_cert``, use ``esp_eap_client_set_ca_cert`` instead.
- ``esp_wifi_sta_wpa2_ent_clear_ca_cert``, use ``esp_eap_client_clear_ca_cert`` instead.
- ``esp_wifi_sta_wpa2_ent_set_cert_key``, use ``esp_eap_client_set_certificate_and_key`` instead.
- ``esp_wifi_sta_wpa2_ent_clear_cert_key``, use ``esp_eap_client_clear_certificate_and_key`` instead.
- ``esp_wifi_sta_wpa2_ent_set_disable_time_check``, use ``esp_eap_client_set_disable_time_check`` instead.
- ``esp_wifi_sta_wpa2_ent_get_disable_time_check``, use ``esp_eap_client_get_disable_time_check`` instead.
- ``esp_wifi_sta_wpa2_ent_set_ttls_phase2_method``, use ``esp_eap_client_set_ttls_phase2_method`` instead.
- ``esp_wifi_sta_wpa2_set_suiteb_192bit_certification``, use ``esp_eap_client_set_suiteb_192bit_certification`` instead.
- ``esp_wifi_sta_wpa2_ent_set_pac_file``, use ``esp_eap_client_set_pac_file`` instead.
- ``esp_wifi_sta_wpa2_ent_set_fast_phase1_params``, use ``esp_eap_client_set_fast_params`` instead.
- ``esp_wifi_sta_wpa2_use_default_cert_bundle``, use ``esp_eap_client_use_default_cert_bundle`` instead.
- **DPP:**
- The DPP event callback ``esp_supp_dpp_event_cb_t`` and event enum ``esp_supp_dpp_event_t`` have been removed. Please use Wi-Fi events directly (e.g. ``WIFI_EVENT_DPP_URI_READY``, ``WIFI_EVENT_DPP_CFG_RECVD``, ``WIFI_EVENT_DPP_FAILED``).

View File

@@ -0,0 +1,46 @@
Wi-Fi
=====
本文档概述了 v6.0 版本中与 Wi-Fi 相关的重大更改。
已移除的函数和类型
-------------------
以下函数和类型已被移除。
- **DPP**
- DPP 事件回调 ``esp_supp_dpp_event_cb_t`` 和事件枚举 ``esp_supp_dpp_event_t`` 已被移除。请直接使用 Wi-Fi 事件(例如 ``WIFI_EVENT_DPP_URI_READY````WIFI_EVENT_DPP_CFG_RECVD````WIFI_EVENT_DPP_FAILED``)。
- **RRM** 函数 ``esp_rrm_send_neighbor_rep_request`` 已被移除。请改用 ``esp_rrm_send_neighbor_report_request``
- **天线配置:**
- 函数 ``esp_wifi_set_ant_gpio````esp_wifi_get_ant_gpio````esp_wifi_set_ant````esp_wifi_get_ant`` 已被移除。请改用 ``esp_phy`` 组件中的等效函数:``esp_phy_set_ant_gpio````esp_phy_get_ant_gpio````esp_phy_set_ant````esp_phy_get_ant``
- **ESP-NOW** 函数 ``esp_wifi_config_espnow_rate`` 已被移除。请改用 ``esp_now_set_peer_rate_config``
已移除的变量、宏和枚举值
---------------------------
- **认证模式:** 认证模式 ``WIFI_AUTH_WPA3_EXT_PSK````WIFI_AUTH_WPA3_EXT_PSK_MIXED_MODE`` 已被移除。请改用 ``WIFI_AUTH_WPA3_PSK``
- **邻居报告事件:**``wifi_event_neighbor_report_t`` 结构体中,``report`` 字段已被移除。请改用 ``n_report`` 字段,它是一个灵活的数组成员。
- **Wi-Fi 接口:** 头文件 :project_file:`components/esp_wifi/include/esp_interface.h` 已被移除。``wifi_interface_t`` 枚举现在定义在 :project_file:`components/esp_wifi/include/esp_wifi_types_generic.h` 中。枚举值(例如 ``WIFI_IF_STA````WIFI_IF_AP``)不再基于 ``ESP_IF_WIFI_STA````ESP_IF_WIFI_AP`` 等定义。
- **NAN**
- 结构体 ``wifi_nan_publish_cfg_t````wifi_nan_subscribe_cfg_t````wifi_nan_followup_params_t````wifi_event_ndp_indication_t````wifi_event_ndp_confirm_t`` 中的字段 ``svc_info`` 已被移除。请改用等效字段 ``ssi````ssi_len``
- 结构体 ``wifi_event_nan_receive_t`` 中的字段 ``peer_svc_info`` 已被移除。请改用等效字段 ``ssi````ssi_len``
- **FTM** 结构体 ``wifi_ftm_initiator_cfg_t`` 中的字段 ``use_get_report_api`` 和结构体 ``wifi_event_ftm_report_t`` 中的字段 ``ftm_report_data`` 已被移除。请改用 ``esp_wifi_ftm_get_report`` 获取原始 FTM 报告数据。
已修改的函数和类型
-------------------
以下 Wi-Fi 函数已修改。
- **DPP** 函数 ``esp_supp_dpp_init`` 不再接受回调函数,应调用为 ``esp_supp_dpp_init(void)``
- **WPS** 函数 ``esp_wifi_wps_start`` 不再接受 ``timeout_ms`` 参数。现在应调用为 ``esp_wifi_wps_start(void)``
- **NAN** 函数 ``esp_wifi_nan_publish_service`` 的参数 ``ndp_resp_needed`` 已移至结构体 ``wifi_nan_publish_cfg_t``

View File

@@ -583,7 +583,7 @@
-
re: "cannot open linker script file bootloader.ld"
hint: "The file 'bootloader.ld' was renamed to 'bootloader.ld.in' in ESP-IDF v6.0. Please use update your build scripts."
-
re: "fatal error: esp_wpa2.h: No such file or directory"
hint: "The header file 'esp_wpa2.h' has been removed. Please use 'esp_eap_client.h' instead."
@@ -629,3 +629,23 @@
-
re: "fatal error: esp_interface.h: No such file or directory"
hint: "The header file 'esp_interface.h' has been removed. The 'wifi_interface_t' enum is now defined in 'esp_wifi_types_generic.h'."
-
re: "error: 'use_get_report_api' undeclared"
hint: "The field 'use_get_report_api' from structure 'wifi_ftm_initiator_cfg_t' has been removed. Please use 'esp_wifi_ftm_get_report' to fetch raw FTM report data instead."
-
re: "error: 'ftm_report_data' undeclared"
hint: "The field 'ftm_report_data' from structure 'wifi_event_ftm_report_t' has been removed. Please use 'esp_wifi_ftm_get_report' to fetch raw FTM report data instead."
-
re: "error: 'svc_info' undeclared"
hint: "The field 'svc_info' from structures 'wifi_nan_publish_cfg_t', 'wifi_nan_subscribe_cfg_t', 'wifi_nan_followup_params_t', 'wifi_event_ndp_indication_t', 'wifi_event_ndp_confirm_t' has been removed. Please use the equivalent fields 'ssi' and 'ssi_len' instead."
-
re: "error: 'peer_svc_info' undeclared"
hint: "The field 'peer_svc_info' from structure 'wifi_event_nan_receive_t' has been removed. Please use the equivalent fields 'ssi' and 'ssi_len' instead."
-
re: "error: too few arguments to function 'esp_wifi_nan_publish_service'"
hint: "The function argument 'ndp_resp_needed' of 'esp_wifi_nan_publish_service' has been moved to structure 'wifi_nan_publish_cfg_t'."