From b7e382e0a5d98ec835b74756e7350efb06d8fe90 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Mon, 15 Jan 2024 16:27:30 +0800 Subject: [PATCH 1/5] fix(wifi): fix smart config bssid set issue --- examples/wifi/smart_config/main/Kconfig.projbuild | 7 +++++++ examples/wifi/smart_config/main/smartconfig_main.c | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 examples/wifi/smart_config/main/Kconfig.projbuild diff --git a/examples/wifi/smart_config/main/Kconfig.projbuild b/examples/wifi/smart_config/main/Kconfig.projbuild new file mode 100644 index 0000000000..6cc47b939a --- /dev/null +++ b/examples/wifi/smart_config/main/Kconfig.projbuild @@ -0,0 +1,7 @@ +menu "Example Configuration" + + config SET_MAC_ADDRESS_OF_TARGET_AP + bool "whether set MAC address of target AP or not" + default y + +endmenu diff --git a/examples/wifi/smart_config/main/smartconfig_main.c b/examples/wifi/smart_config/main/smartconfig_main.c index 930127a7f4..7b35f432bf 100644 --- a/examples/wifi/smart_config/main/smartconfig_main.c +++ b/examples/wifi/smart_config/main/smartconfig_main.c @@ -13,13 +13,14 @@ #include "freertos/task.h" #include "freertos/event_groups.h" #include "esp_wifi.h" -#include "esp_wpa2.h" +#include "esp_eap_client.h" #include "esp_event.h" #include "esp_log.h" #include "esp_system.h" #include "nvs_flash.h" #include "esp_netif.h" #include "esp_smartconfig.h" +#include "esp_mac.h" /* FreeRTOS event group to signal when we are connected & ready to make a request */ static EventGroupHandle_t s_wifi_event_group; @@ -59,10 +60,14 @@ static void event_handler(void* arg, esp_event_base_t event_base, bzero(&wifi_config, sizeof(wifi_config_t)); memcpy(wifi_config.sta.ssid, evt->ssid, sizeof(wifi_config.sta.ssid)); memcpy(wifi_config.sta.password, evt->password, sizeof(wifi_config.sta.password)); + +#ifdef CONFIG_SET_MAC_ADDRESS_OF_TARGET_AP wifi_config.sta.bssid_set = evt->bssid_set; if (wifi_config.sta.bssid_set == true) { + ESP_LOGI(TAG, "Set MAC address of target AP: "MACSTR" ", MAC2STR(evt->bssid)); memcpy(wifi_config.sta.bssid, evt->bssid, sizeof(wifi_config.sta.bssid)); } +#endif memcpy(ssid, evt->ssid, sizeof(evt->ssid)); memcpy(password, evt->password, sizeof(evt->password)); From becd279fd771ba9cba4ce7f7d394880078f2eb58 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Sun, 18 Feb 2024 17:00:44 +0800 Subject: [PATCH 2/5] fix(example): fixed app partion is too small for binary size --- examples/protocols/esp_local_ctrl/sdkconfig.defaults | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/protocols/esp_local_ctrl/sdkconfig.defaults b/examples/protocols/esp_local_ctrl/sdkconfig.defaults index a9595bf0c1..4c2dbbc17e 100644 --- a/examples/protocols/esp_local_ctrl/sdkconfig.defaults +++ b/examples/protocols/esp_local_ctrl/sdkconfig.defaults @@ -1 +1,2 @@ CONFIG_ESP_HTTPS_SERVER_ENABLE=y +CONFIG_COMPILER_OPTIMIZATION_SIZE=y From 0aadc3ec2a074bc0f6f079eba451d644879333bc Mon Sep 17 00:00:00 2001 From: muhaidong Date: Tue, 12 Dec 2023 19:19:36 +0800 Subject: [PATCH 3/5] 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/esp32c6/ld/esp32c6.rom.net80211.ld | 4 ++-- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index e5839b5d84..01de15db8b 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -1847,7 +1847,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; */ @@ -1857,7 +1857,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 0a40764534..19f62f387c 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 1e470d51ae..a287e60447 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/esp32c6/ld/esp32c6.rom.net80211.ld b/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld index c096f96239..6156a8bc83 100644 --- a/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld +++ b/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld @@ -33,7 +33,7 @@ ic_reset_rx_ba = 0x40000b78; ieee80211_align_eb = 0x40000b7c; ieee80211_ampdu_reorder = 0x40000b80; ieee80211_ampdu_start_age_timer = 0x40000b84; -ieee80211_encap_esfbuf = 0x40000b88; +/*ieee80211_encap_esfbuf = 0x40000b88;*/ ieee80211_is_tx_allowed = 0x40000b8c; ieee80211_output_pending_eb = 0x40000b90; /*ieee80211_output_process = 0x40000b94;*/ @@ -43,7 +43,7 @@ wifi_get_macaddr = 0x40000ba0; wifi_rf_phy_disable = 0x40000ba4; wifi_rf_phy_enable = 0x40000ba8; ic_ebuf_alloc = 0x40000bac; -ieee80211_classify = 0x40000bb0; +/*ieee80211_classify = 0x40000bb0;*/ ieee80211_copy_eb_header = 0x40000bb4; ieee80211_recycle_cache_eb = 0x40000bb8; ieee80211_search_node = 0x40000bbc; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index ef2addbeaf..b38a8772a1 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -2037,7 +2037,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 4ae8d2179d1648fc7571cf537047f409f2c00ee3 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Wed, 21 Feb 2024 18:09:35 +0800 Subject: [PATCH 4/5] 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 01de15db8b..da0153ee39 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 */ @@ -1632,9 +1632,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; @@ -1666,7 +1666,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 ec16fa7dd55cd71e8736d5097ddd13a611b06115 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Mon, 4 Mar 2024 19:36:33 +0800 Subject: [PATCH 5/5] fix(wifi): fix some amsdu issue 1. fix qos encapsulated eapol issue 2. fix qos eapol eb data length issue 3. eapol arp and dhcp add flag PP_F_PER_PKT_RATE 4. fix lmac_stop_hw_txq issue 5. limit the number of sub amsdu 6. fix recycle cache sub amsdu eb issue --- 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 cd8d74b378..2034132db8 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit cd8d74b378f6e3e749c5b0c2c1602571e3a0c75a +Subproject commit 2034132db8e2952cf203995d703170a21594b2b8