From 9e7d75cb95003f604bfeaf9644e5e952faf77132 Mon Sep 17 00:00:00 2001 From: ChenJianxing Date: Tue, 13 Jul 2021 15:33:20 +0800 Subject: [PATCH] esp_wifi: fix some wifi bugs 1. support config 80211 tx rate 2. fix 80211 tx crash issue 3. disable ampdu+amsdu bit --- components/esp_rom/esp32c3/ld/esp32c3.rom.ld | 2 +- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 2 +- components/esp_wifi/include/esp_wifi.h | 16 +++++++++++++++- components/esp_wifi/lib | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index da079eeb14..a146d8f39d 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -1606,7 +1606,7 @@ rcSetTxAmpduLimit = 0x4000176c; rcTxUpdatePer = 0x40001770; rcUpdateAckSnr = 0x40001774; rcUpdateRate = 0x40001778; -rcUpdateTxDone = 0x4000177c; +/* rcUpdateTxDone = 0x4000177c; */ rcUpdateTxDoneAmpdu2 = 0x40001780; rcUpSched = 0x40001784; rssi_margin = 0x40001788; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index ed23ae3f62..556b3eecc0 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -1913,7 +1913,7 @@ rcSetTxAmpduLimit = 0x40005784; rcTxUpdatePer = 0x40005790; rcUpdateAckSnr = 0x4000579c; rcUpdateRate = 0x400057a8; -rcUpdateTxDone = 0x400057b4; +/* rcUpdateTxDone = 0x400057b4; */ rcUpdateTxDoneAmpdu2 = 0x400057c0; rcUpSched = 0x400057cc; rssi_margin = 0x400057d8; diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index dfd43bff44..51e0323484 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -1224,7 +1224,7 @@ esp_err_t esp_wifi_config_11b_rate(wifi_interface_t ifx, bool disable); * @attention 1. This API should be called after esp_wifi_init() and before esp_wifi_start(). * * @param ifx Interface to be configured. - * @param rate Only support 1M, 6M and MCS0_LGI + * @param rate Phy rate to be configured. * * @return * - ESP_OK: succeed @@ -1289,6 +1289,20 @@ esp_err_t esp_wifi_set_country_code(const char *country, bool ieee80211d_enabled */ esp_err_t esp_wifi_get_country_code(char *country); +/** + * @brief Config 80211 tx rate of specified interface + * + * @attention 1. This API should be called after esp_wifi_init() and before esp_wifi_start(). + * + * @param ifx Interface to be configured. + * @param rate Phy rate to be configured. + * + * @return + * - ESP_OK: succeed + * - others: failed + */ +esp_err_t esp_wifi_config_80211_tx_rate(wifi_interface_t ifx, wifi_phy_rate_t rate); + #ifdef __cplusplus } #endif diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 484521faaa..0a82aeac1f 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 484521faaa48cd9c9713eb65c93964cad50c439b +Subproject commit 0a82aeac1f8ca7837ce642b8778f652c072e1904