From 02a88eed4ecc19d91031e38901eb03de4ab681a3 Mon Sep 17 00:00:00 2001 From: xuxiao Date: Thu, 26 Sep 2024 15:21:58 +0800 Subject: [PATCH] fix(wifi): add bss color support for softap --- components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld | 2 +- components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld | 4 ++-- .../esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld | 2 +- components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld | 4 ++-- components/esp_wifi/include/esp_wifi_he.h | 10 +++++++--- components/esp_wifi/lib | 2 +- 6 files changed, 14 insertions(+), 10 deletions(-) diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld index bd55f3bb3c..1d87aafcb3 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.net80211.ld @@ -60,7 +60,7 @@ ieee80211_find_ext_elem = 0x40000bb0; ieee80211_find_ie = 0x40000bb4; ieee80211_find_ext_ie = 0x40000bb8; ieee80211_merge_mbssid_profile = 0x40000bbc; -ieee80211_encap_esfbuf_htc = 0x40000bc0; +/*ieee80211_encap_esfbuf_htc = 0x40000bc0;*/ /*wifi_get_macaddr = 0x40000bc4;*/ /*wifi_rf_phy_disable = 0x40000bc8;*/ /*wifi_rf_phy_enable = 0x40000bcc;*/ diff --git a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld index 605063d1c6..7515b90cca 100644 --- a/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld +++ b/components/esp_rom/esp32c5/ld/esp32c5.rom.pp.ld @@ -27,14 +27,14 @@ esf_buf_recycle = 0x40000bfc; GetAccess = 0x40000c00; hal_mac_is_low_rate_enabled = 0x40000c04; hal_mac_tx_get_blockack = 0x40000c08; -hal_mac_tx_set_ppdu = 0x40000c0c; +/*hal_mac_tx_set_ppdu = 0x40000c0c;*/ hal_mac_tx_clr_mplen = 0x40000c10; hal_mac_get_txq_state = 0x40000c14; hal_mac_clr_txq_state = 0x40000c18; hal_mac_get_txq_complete = 0x40000c1c; /*hal_mac_deinit_twt_tx = 0x40000c20;*/ hal_mac_is_dma_enable = 0x40000c24; -hal_he_get_bss_color = 0x40000c28; +/*hal_he_get_bss_color = 0x40000c28;*/ hal_he_set_ersu = 0x40000c2c; hal_he_get_mplen_addr_start = 0x40000c30; hal_he_get_mplen_addr_end = 0x40000c34; diff --git a/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld b/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld index 82727daf24..230c560b3d 100644 --- a/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld +++ b/components/esp_rom/esp32c61/ld/esp32c61.rom.net80211.ld @@ -60,7 +60,7 @@ ieee80211_find_ext_elem = 0x40000b18; ieee80211_find_ie = 0x40000b1c; ieee80211_find_ext_ie = 0x40000b20; ieee80211_merge_mbssid_profile = 0x40000b24; -ieee80211_encap_esfbuf_htc = 0x40000b28; +/*ieee80211_encap_esfbuf_htc = 0x40000b28;*/ wifi_get_macaddr = 0x40000b2c; wifi_rf_phy_disable = 0x40000b30; wifi_rf_phy_enable = 0x40000b34; diff --git a/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld b/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld index 54f0a48c42..cf1349b9ab 100644 --- a/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld +++ b/components/esp_rom/esp32c61/ld/esp32c61.rom.pp.ld @@ -27,14 +27,14 @@ esf_buf_recycle = 0x40000b64; GetAccess = 0x40000b68; hal_mac_is_low_rate_enabled = 0x40000b6c; hal_mac_tx_get_blockack = 0x40000b70; -hal_mac_tx_set_ppdu = 0x40000b74; +/*hal_mac_tx_set_ppdu = 0x40000b74;*/ hal_mac_tx_clr_mplen = 0x40000b78; hal_mac_get_txq_state = 0x40000b7c; hal_mac_clr_txq_state = 0x40000b80; hal_mac_get_txq_complete = 0x40000b84; hal_mac_deinit_twt_tx = 0x40000b88; hal_mac_is_dma_enable = 0x40000b8c; -hal_he_get_bss_color = 0x40000b90; +/*hal_he_get_bss_color = 0x40000b90;*/ hal_he_set_ersu = 0x40000b94; hal_he_get_mplen_addr_start = 0x40000b98; hal_he_get_mplen_addr_end = 0x40000b9c; diff --git a/components/esp_wifi/include/esp_wifi_he.h b/components/esp_wifi/include/esp_wifi_he.h index 99a3be564b..619c7b3fa6 100644 --- a/components/esp_wifi/include/esp_wifi_he.h +++ b/components/esp_wifi/include/esp_wifi_he.h @@ -9,6 +9,7 @@ #include #include #include "esp_err.h" +#include "esp_wifi_types.h" #include "esp_wifi_he_types.h" #ifdef __cplusplus @@ -219,15 +220,18 @@ esp_err_t esp_wifi_sta_twt_config(wifi_twt_config_t *config); /** * @brief Enable bss color collision detection. * - * @param[in] enable If true, when the station detects a BSS color collision, it will report the BSS color collision event to the access point (AP). + * @attention Currently, only STA BSS color collision detection is supported. + * + * @param ifx interface to be configured + * @param enable If true, when the STA detects a BSS color collision, it will report the BSS color collision event to the access point (AP). * * @return * - ESP_OK: succeed + * - ESP_ERR_WIFI_IF: Invalid interface * - 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_NOT_SUPPORTED: This API is not supported in AP mode yet */ -esp_err_t esp_wifi_sta_enable_bsscolor_collision_detection(bool enable); +esp_err_t esp_wifi_enable_bsscolor_collision_detection(wifi_interface_t ifx, bool enable); #ifdef __cplusplus } diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 903d1e428f..a93530033a 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 903d1e428f1b08806070be4dc7a39118a4f7e417 +Subproject commit a93530033aece29f1622c9ca9161eb4770aea909