From 155fe737574e2bdfc0564186928f2c478e9a444e Mon Sep 17 00:00:00 2001 From: muhaidong Date: Tue, 12 Dec 2023 19:19:36 +0800 Subject: [PATCH 1/7] fix(wifi): fix some wifi issues 1. fix qos encapsulated eapol issue 2. fixed dhcp offer and dhcp ack data rates --- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 4 ++-- components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld | 2 +- components/esp_rom/esp32c3/ld/esp32c3.rom.ld | 2 +- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index aa5bbc79d6..dddb97237b 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -1846,7 +1846,7 @@ ic_reset_rx_ba = 0x40001fa8; ieee80211_align_eb = 0x40001fac; ieee80211_ampdu_reorder = 0x40001fb0; ieee80211_ampdu_start_age_timer = 0x40001fb4; -ieee80211_encap_esfbuf = 0x40001fb8; +/*ieee80211_encap_esfbuf = 0x40001fb8;*/ ieee80211_is_tx_allowed = 0x40001fbc; ieee80211_output_pending_eb = 0x40001fc0; /* ieee80211_output_process = 0x40001fc4; */ @@ -1856,7 +1856,7 @@ wifi_get_macaddr = 0x40001fd0; wifi_rf_phy_disable = 0x40001fd4; wifi_rf_phy_enable = 0x40001fd8; ic_ebuf_alloc = 0x40001fdc; -ieee80211_classify = 0x40001fe0; +/*ieee80211_classify = 0x40001fe0;*/ ieee80211_copy_eb_header = 0x40001fe4; ieee80211_recycle_cache_eb = 0x40001fe8; ieee80211_search_node = 0x40001fec; diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld index f683992188..42b1fc1002 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld @@ -35,7 +35,7 @@ wDev_ProcessRxSucData = 0x400017f4; ppProcTxDone = 0x40001804; pm_tx_data_done_process = 0x40001808; ppMapWaitTxq = 0x40001810; -ieee80211_encap_esfbuf = 0x4000185c; +/*ieee80211_encap_esfbuf = 0x4000185c;*/ /*sta_input = 0x40001870;*/ ieee80211_crypto_decap = 0x4000189c; ieee80211_decap = 0x400018a0; diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index bf70a7473d..f136a07151 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -1729,7 +1729,7 @@ wifi_get_macaddr = 0x40001874; wifi_rf_phy_disable = 0x40001878; wifi_rf_phy_enable = 0x4000187c; ic_ebuf_alloc = 0x40001880; -ieee80211_classify = 0x40001884; +/*ieee80211_classify = 0x40001884;*/ ieee80211_copy_eb_header = 0x40001888; ieee80211_recycle_cache_eb = 0x4000188c; ieee80211_search_node = 0x40001890; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index b1156b4ca6..bdf5037cdf 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -2036,7 +2036,7 @@ wifi_get_macaddr = 0x40005ab4; wifi_rf_phy_disable = 0x40005ac0; wifi_rf_phy_enable = 0x40005acc; ic_ebuf_alloc = 0x40005ad8; -ieee80211_classify = 0x40005ae4; +/*ieee80211_classify = 0x40005ae4;*/ ieee80211_copy_eb_header = 0x40005af0; ieee80211_recycle_cache_eb = 0x40005afc; ieee80211_search_node = 0x40005b08; From cd242a6684f8ef3dc7aad76a46d36d3a9585e784 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Wed, 21 Feb 2024 18:09:35 +0800 Subject: [PATCH 2/7] fix(wifi): fix lmac_stop_hw_txq issue --- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index dddb97237b..099e003f0e 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD + * SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ @@ -1631,9 +1631,9 @@ hal_mac_set_txq_invalid = 0x40001d60; hal_mac_txq_disable = 0x40001d64; hal_mac_is_txq_enabled = 0x40001d68; hal_mac_get_txq_pmd = 0x40001d6c; -lmacDiscardFrameExchangeSequence = 0x40001d70; -lmacDisableTransmit = 0x40001d74; -lmacProcessTxTimeout = 0x40001d78; +/*lmacDiscardFrameExchangeSequence = 0x40001d70;*/ +/*lmacDisableTransmit = 0x40001d74;*/ +/*lmacProcessTxTimeout = 0x40001d78;*/ /*lmacProcessTxSuccess = 0x40001d7c;*/ lmacProcessCollision = 0x40001d80; lmacProcessTxRtsError = 0x40001d84; @@ -1665,7 +1665,7 @@ mac_last_rxbuf_init = 0x40001de8; hal_attenna_init = 0x40001dec; hal_timer_update_by_rtc = 0x40001df0; hal_coex_pti_init = 0x40001df4; -lmac_stop_hw_txq = 0x40001df8; +/*lmac_stop_hw_txq = 0x40001df8;*/ ppDirectRecycleAmpdu = 0x40001dfc; esp_wifi_internal_set_rts = 0x40001e00; esp_wifi_internal_get_rts = 0x40001e04; From a91a74d12a63eb9927b1f1122468f7fa34419204 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Mon, 18 Mar 2024 11:44:53 +0800 Subject: [PATCH 3/7] fix(wifi): fix multicast address qos frames issue --- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 2 +- components/esp_rom/esp32c3/ld/esp32c3.rom.ld | 2 +- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 099e003f0e..b67ca219ce 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -1844,7 +1844,7 @@ ic_ebuf_recycle_rx = 0x40001fa0; ic_ebuf_recycle_tx = 0x40001fa4; ic_reset_rx_ba = 0x40001fa8; ieee80211_align_eb = 0x40001fac; -ieee80211_ampdu_reorder = 0x40001fb0; +/*ieee80211_ampdu_reorder = 0x40001fb0;*/ ieee80211_ampdu_start_age_timer = 0x40001fb4; /*ieee80211_encap_esfbuf = 0x40001fb8;*/ ieee80211_is_tx_allowed = 0x40001fbc; diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index f136a07151..79ee4e4747 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -1717,7 +1717,7 @@ ic_ebuf_recycle_rx = 0x40001844; ic_ebuf_recycle_tx = 0x40001848; ic_reset_rx_ba = 0x4000184c; ieee80211_align_eb = 0x40001850; -ieee80211_ampdu_reorder = 0x40001854; +/*ieee80211_ampdu_reorder = 0x40001854;*/ ieee80211_ampdu_start_age_timer = 0x40001858; /*ieee80211_encap_esfbuf = 0x4000185c;*/ ieee80211_is_tx_allowed = 0x40001860; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index bdf5037cdf..486e9b4672 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -2024,7 +2024,7 @@ ic_ebuf_recycle_rx = 0x40005a24; ic_ebuf_recycle_tx = 0x40005a30; ic_reset_rx_ba = 0x40005a3c; ieee80211_align_eb = 0x40005a48; -ieee80211_ampdu_reorder = 0x40005a54; +/* ieee80211_ampdu_reorder = 0x40005a54; */ ieee80211_ampdu_start_age_timer = 0x40005a60; /* ieee80211_encap_esfbuf = 0x40005a6c; */ ieee80211_is_tx_allowed = 0x40005a78; From 705afe51629c8cf81a701605413b4ce26fd66cb5 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Thu, 11 Apr 2024 12:03:11 +0800 Subject: [PATCH 4/7] fix(wifi): fixed task watchdog got triggered by esp_wifi_stop issue --- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 2 +- components/esp_rom/esp32c3/ld/esp32c3.rom.ld | 2 +- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index b67ca219ce..be223e1f85 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -1482,7 +1482,7 @@ is_lmac_idle = 0x40001b0c; /*lmacAdjustTimestamp = 0x40001b10;*/ lmacDiscardAgedMSDU = 0x40001b14; /*lmacDiscardMSDU = 0x40001b18;*/ -lmacEndFrameExchangeSequence = 0x40001b1c; +/*lmacEndFrameExchangeSequence = 0x40001b1c;*/ lmacIsIdle = 0x40001b20; lmacIsLongFrame = 0x40001b24; /*lmacMSDUAged = 0x40001b28;*/ diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index 79ee4e4747..f346a40e82 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -1516,7 +1516,7 @@ is_lmac_idle = 0x400015e8; /*lmacAdjustTimestamp = 0x400015ec;*/ lmacDiscardAgedMSDU = 0x400015f0; /*lmacDiscardMSDU = 0x400015f4;*/ -lmacEndFrameExchangeSequence = 0x400015f8; +/*lmacEndFrameExchangeSequence = 0x400015f8;*/ lmacIsIdle = 0x400015fc; lmacIsLongFrame = 0x40001600; /*lmacMSDUAged = 0x40001604;*/ diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index 486e9b4672..5cc8e4a572 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -1816,7 +1816,7 @@ is_lmac_idle = 0x400052f8; /*lmacAdjustTimestamp = 0x40005304;*/ lmacDiscardAgedMSDU = 0x40005310; /*lmacDiscardMSDU = 0x4000531c;*/ -lmacEndFrameExchangeSequence = 0x40005328; +/*lmacEndFrameExchangeSequence = 0x40005328;*/ lmacIsIdle = 0x40005334; lmacIsLongFrame = 0x40005340; /*lmacMSDUAged = 0x4000534c;*/ From 33c519400852b79c467925ca8901e49349f61780 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Sun, 28 Apr 2024 20:00:37 +0800 Subject: [PATCH 5/7] fix(wifi): fixed scan get ap number issue --- examples/wifi/scan/main/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/wifi/scan/main/scan.c b/examples/wifi/scan/main/scan.c index 5dcf9efe08..07520a4e0b 100644 --- a/examples/wifi/scan/main/scan.c +++ b/examples/wifi/scan/main/scan.c @@ -153,8 +153,8 @@ static void wifi_scan(void) ESP_ERROR_CHECK(esp_wifi_start()); esp_wifi_scan_start(NULL, true); ESP_LOGI(TAG, "Max AP number ap_info can hold = %u", number); - ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&number, ap_info)); ESP_ERROR_CHECK(esp_wifi_scan_get_ap_num(&ap_count)); + ESP_ERROR_CHECK(esp_wifi_scan_get_ap_records(&number, ap_info)); ESP_LOGI(TAG, "Total APs scanned = %u, actual AP number ap_info holds = %u", ap_count, number); for (int i = 0; i < number; i++) { ESP_LOGI(TAG, "SSID \t\t%s", ap_info[i].ssid); From bc6d79c84ac5f2bb80d6f3023854287a926c70af Mon Sep 17 00:00:00 2001 From: muhaidong Date: Mon, 4 Mar 2024 20:37:39 +0800 Subject: [PATCH 6/7] fix(doc): update api esp_wifi_sta_get_rssic docs Closes https://github.com/espressif/esp-idf/issues/12685 --- components/esp_wifi/include/esp_wifi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/esp_wifi/include/esp_wifi.h b/components/esp_wifi/include/esp_wifi.h index 1cb528afd4..cccf64e3f7 100644 --- a/components/esp_wifi/include/esp_wifi.h +++ b/components/esp_wifi/include/esp_wifi.h @@ -391,6 +391,7 @@ esp_err_t esp_wifi_restore(void); * - 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_WIFI_MODE: WiFi mode error * - ESP_ERR_WIFI_CONN: WiFi internal error, station or soft-AP control block wrong * - ESP_ERR_WIFI_SSID: SSID of AP which station connects is invalid */ @@ -1457,9 +1458,10 @@ esp_err_t esp_wifi_sta_get_aid(uint16_t *aid); esp_err_t esp_wifi_sta_get_negotiated_phymode(wifi_phy_mode_t *phymode); /** - * @brief Get the rssi info after station connected to AP + * @brief Get the rssi information of AP to which the device is associated with * - * @attention This API should be called after station connected to AP. + * @attention 1. This API should be called after station connected to AP. + * @attention 2. Use this API only in WIFI_MODE_STA or WIFI_MODE_APSTA mode. * * @param rssi store the rssi info received from last beacon. * From 4ae21b7f82a05631eb0720703b6d3d6a702ee4bd Mon Sep 17 00:00:00 2001 From: muhaidong Date: Fri, 17 May 2024 16:50:54 +0800 Subject: [PATCH 7/7] =?UTF-8?q?fix(wifi):=20fixed=20some=20wifi=20bugs=202?= =?UTF-8?q?40517=20=20=20=20=20=20=C2=A0=C2=A0=201.=20fix=20esp=5Fwifi=5Fs?= =?UTF-8?q?et=5Fmode()=20return=20error=20issue=202.=20fix=20qos=20encapsu?= =?UTF-8?q?lated=20eapol=20issue=203.=20eapol=20arp=20and=20dhcp=20add=20f?= =?UTF-8?q?lag=20PP=5FF=5FPER=5FPKT=5FRATE=204.=20fix=20lmac=5Fstop=5Fhw?= =?UTF-8?q?=5Ftxq=20issue=205.=20fix=20typo=206.=20limite=20number=20of=20?= =?UTF-8?q?amsdu=C2=A0=20block=20in=20eb=207.=20fix=20recycle=20cache=20su?= =?UTF-8?q?b=20amsdu=20eb=20issue=208.=20update=20ba=20session=20store=20a?= =?UTF-8?q?nd=20restore=20rx=20ba=20num=209.=20fix=20multicast=20address?= =?UTF-8?q?=20qos=20frame=20by=20reset=20rx=20ba=2010.=20fix=20lmacStopTra?= =?UTF-8?q?nsmit=20issue=2011.=20sync=20multi=20antenna=20gpio=20register?= =?UTF-8?q?=20from=20IDF=2012.=20clear=20eb=20to=20fix=20tx=20single=20AMP?= =?UTF-8?q?DU=20to=20some=20AP=20not=20reply=20BA=20when=20ampdu=5Fentry?= =?UTF-8?q?=20single=20bit=20was=20set=2013.=20fix=20internal=20set=20log?= =?UTF-8?q?=20level=20check=20fail=20issue=2014.=20update=20esp=5Fwifi=5Fc?= =?UTF-8?q?onnect=20doc=2015.=20update=20api=20esp=5Fwifi=5Fsta=5Fget=5Frs?= =?UTF-8?q?si=20docs=2016.=20add=20interupt=20lock=20during=20hardware=20r?= =?UTF-8?q?eload=20of=20Rx=20link?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 80294cd2b0..e0ee52e2b6 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 80294cd2b02703f0feb408373f4e507117cfc010 +Subproject commit e0ee52e2b664695bbf8d027ea11685f153618745