From 36e082d6e222fd29e4cdb770dd6ad37b4fffec01 Mon Sep 17 00:00:00 2001 From: alanmaxwell Date: Thu, 21 Sep 2023 14:00:33 +0800 Subject: [PATCH 1/5] feat(wifi): support esp32c3 v1.1 WiFi 1.bringup c3 v1.1 and sync func to c3 eco7 rom 2.support to set null&probe lifetime 3.support to adjust listen interval to dtim period 4.support tx pkt w/o wake null 5.allow to tx null0 if requtest to rx data --- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 4 ++-- components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld | 6 +++--- components/esp_rom/esp32c3/ld/esp32c3.rom.ld | 4 ++-- components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld | 4 ++-- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 4 ++-- components/esp_wifi/lib | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index c5470ffb4f7..9a518fce926 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -1483,13 +1483,13 @@ ic_get_trc = 0x40001afc; ic_mac_init = 0x40001b04; ic_interface_enabled = 0x40001b08; is_lmac_idle = 0x40001b0c; -lmacAdjustTimestamp = 0x40001b10; +/*lmacAdjustTimestamp = 0x40001b10;*/ lmacDiscardAgedMSDU = 0x40001b14; /*lmacDiscardMSDU = 0x40001b18;*/ lmacEndFrameExchangeSequence = 0x40001b1c; lmacIsIdle = 0x40001b20; lmacIsLongFrame = 0x40001b24; -lmacMSDUAged = 0x40001b28; +/*lmacMSDUAged = 0x40001b28;*/ lmacPostTxComplete = 0x40001b2c; lmacProcessAllTxTimeout = 0x40001b30; lmacProcessCollisions = 0x40001b34; diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld index 6b137a44e83..7062fb97e4c 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld @@ -9,13 +9,13 @@ esf_buf_recycle = 0x400015c4; hal_mac_tx_set_ppdu = 0x400015d4; ic_mac_deinit = 0x400015dc; lmacDiscardMSDU = 0x400015f4; -lmacSetTxFrame = 0x40001628; +/*lmacSetTxFrame = 0x40001628;*/ lmacTxDone = 0x4000162c; lmacTxFrame = 0x40001630; mac_tx_set_htsig = 0x40001638; mac_tx_set_plcp1 = 0x40001640; pm_on_beacon_rx = 0x4000167c; -pm_parse_beacon = 0x40001688; +/*pm_parse_beacon = 0x40001688;*/ pm_process_tim = 0x4000168c; pm_rx_beacon_process = 0x40001690; pm_rx_data_process = 0x40001694; @@ -28,7 +28,7 @@ ppProcTxSecFrame = 0x400016dc; rcTxUpdatePer = 0x40001770; rcUpdateTxDone = 0x4000177c; wDevCheckBlockError = 0x400017b4; -wDev_IndicateFrame = 0x400017c8; +/* wDev_IndicateFrame = 0x400017c8;*/ wDev_ProcessFiq = 0x400017f0; wDev_ProcessRxSucData = 0x400017f4; ppProcTxDone = 0x40001804; diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index 21d1db799a3..7dd2d34a5e3 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -1513,13 +1513,13 @@ ic_get_trc = 0x400015d8; ic_mac_init = 0x400015e0; ic_interface_enabled = 0x400015e4; is_lmac_idle = 0x400015e8; -lmacAdjustTimestamp = 0x400015ec; +/*lmacAdjustTimestamp = 0x400015ec;*/ lmacDiscardAgedMSDU = 0x400015f0; /*lmacDiscardMSDU = 0x400015f4;*/ lmacEndFrameExchangeSequence = 0x400015f8; lmacIsIdle = 0x400015fc; lmacIsLongFrame = 0x40001600; -lmacMSDUAged = 0x40001604; +/*lmacMSDUAged = 0x40001604;*/ lmacPostTxComplete = 0x40001608; lmacProcessAllTxTimeout = 0x4000160c; lmacProcessCollisions = 0x40001610; diff --git a/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld b/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld index 0bd51bb71f2..a0e5b0afea9 100644 --- a/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld +++ b/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld @@ -34,13 +34,13 @@ ic_get_trc = 0x40000c04; ic_mac_init = 0x40000c0c; ic_interface_enabled = 0x40000c10; is_lmac_idle = 0x40000c14; -lmacAdjustTimestamp = 0x40000c18; +/*lmacAdjustTimestamp = 0x40000c18;*/ lmacDiscardAgedMSDU = 0x40000c1c; /*lmacDiscardMSDU = 0x40000c20;*/ lmacEndFrameExchangeSequence = 0x40000c24; lmacIsIdle = 0x40000c28; lmacIsLongFrame = 0x40000c2c; -lmacMSDUAged = 0x40000c30; +/*lmacMSDUAged = 0x40000c30;*/ lmacPostTxComplete = 0x40000c34; lmacProcessAllTxTimeout = 0x40000c38; lmacProcessCollisions = 0x40000c3c; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index fc514b44eaa..8f811518d33 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -1814,13 +1814,13 @@ ic_get_trc = 0x400052c8; ic_mac_init = 0x400052e0; ic_interface_enabled = 0x400052ec; is_lmac_idle = 0x400052f8; -lmacAdjustTimestamp = 0x40005304; +/*lmacAdjustTimestamp = 0x40005304;*/ lmacDiscardAgedMSDU = 0x40005310; /*lmacDiscardMSDU = 0x4000531c;*/ lmacEndFrameExchangeSequence = 0x40005328; lmacIsIdle = 0x40005334; lmacIsLongFrame = 0x40005340; -lmacMSDUAged = 0x4000534c; +/*lmacMSDUAged = 0x4000534c;*/ lmacPostTxComplete = 0x40005358; lmacProcessAllTxTimeout = 0x40005364; lmacProcessCollisions = 0x40005370; diff --git a/components/esp_wifi/lib b/components/esp_wifi/lib index 9bb605e822e..ab3ac826d0e 160000 --- a/components/esp_wifi/lib +++ b/components/esp_wifi/lib @@ -1 +1 @@ -Subproject commit 9bb605e822e5fa473448aa6a80b740e09c3c8df2 +Subproject commit ab3ac826d0e102b0a079022e946db63a3fc625e3 From e6efcc407e54713bd31eae1bbdbbf3554ee6deda Mon Sep 17 00:00:00 2001 From: liuning Date: Tue, 24 Oct 2023 18:00:07 +0800 Subject: [PATCH 2/5] fix(rom): remove related rom funcs in c3 rom eco7 MR --- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 10 +++++----- components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld | 1 + components/esp_rom/esp32c3/ld/esp32c3.rom.ld | 2 +- components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld | 2 +- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 2 +- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index 9a518fce926..d6fdf0943c4 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -1617,7 +1617,7 @@ ppDequeueTxDone_Locked = 0x40001d18; /*ppProcTxDone = 0x40001d1c;*/ /*pm_tx_data_done_process = 0x40001d20;*/ config_is_cache_tx_buf_enabled = 0x40001d24; -ppMapWaitTxq = 0x40001d28; +//ppMapWaitTxq = 0x40001d28; ppProcessWaitingQueue = 0x40001d2c; ppDisableQueue = 0x40001d30; pm_allow_tx = 0x40001d34; @@ -1715,14 +1715,14 @@ pp_timer_do_process = 0x40001ea0; rcUpdateAMPDUParam = 0x40001ea4; rcUpdatePhyMode = 0x40001ea8; rcGetHighestRateIdx = 0x40001eac; -pm_tx_null_data_done_process = 0x40001eb0; -pm_tx_data_process = 0x40001eb4; +//pm_tx_null_data_done_process = 0x40001eb0; +//pm_tx_data_process = 0x40001eb4; /* pm_attach = 0x40001eb8; */ /* pm_coex_schm_process = 0x40001ebc; */ ppInitTxq = 0x40001ec0; pp_attach = 0x40001ec4; pp_deattach = 0x40001ec8; -pm_on_probe_resp_rx = 0x40001ecc; +//pm_on_probe_resp_rx = 0x40001ecc; hal_set_sta_tsf = 0x40001ed0; ic_update_sta_tsf = 0x40001ed4; ic_tx_pkt = 0x40001ed8; @@ -1901,7 +1901,7 @@ wifi_get_init_state = 0x40002088; /* cnx_coexist_timeout = 0x40002090; */ /* sta_recv_mgmt = 0x40002094;*/ ieee80211_send_setup = 0x40002098; -ieee80211_send_probereq = 0x4000209c; +//ieee80211_send_probereq = 0x4000209c; sta_auth_shared = 0x400020a4; /* cnx_coexist_timeout_process = 0x400020ac; */ ieee80211_alloc_challenge = 0x400020b0; diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld index 7062fb97e4c..7db9247db2a 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld @@ -33,6 +33,7 @@ wDev_ProcessFiq = 0x400017f0; wDev_ProcessRxSucData = 0x400017f4; ppProcTxDone = 0x40001804; pm_tx_data_done_process = 0x40001808; +ppMapWaitTxq = 0x40001810; ieee80211_encap_esfbuf = 0x4000185c; sta_input = 0x40001870; ieee80211_crypto_decap = 0x4000189c; diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index 7dd2d34a5e3..b9661d07855 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -1644,7 +1644,7 @@ wdev_csi_len_align = 0x400017fc; ppDequeueTxDone_Locked = 0x40001800; /*pm_tx_data_done_process = 0x40001808;*/ config_is_cache_tx_buf_enabled = 0x4000180c; -ppMapWaitTxq = 0x40001810; +//ppMapWaitTxq = 0x40001810; ppProcessWaitingQueue = 0x40001814; ppDisableQueue = 0x40001818; pm_allow_tx = 0x4000181c; diff --git a/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld b/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld index a0e5b0afea9..e9256ac1fd8 100644 --- a/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld +++ b/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld @@ -165,7 +165,7 @@ ppDequeueTxDone_Locked = 0x40000e14; //ppProcTxDone = 0x40000e18; //pm_tx_data_done_process = 0x40000e1c; config_is_cache_tx_buf_enabled = 0x40000e20; -ppMapWaitTxq = 0x40000e24; +//ppMapWaitTxq = 0x40000e24; ppProcessWaitingQueue = 0x40000e28; ppDisableQueue = 0x40000e2c; pm_allow_tx = 0x40000e30; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index 8f811518d33..3967479a822 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -1950,7 +1950,7 @@ ppDequeueTxDone_Locked = 0x40005940; /*ppProcTxDone = 0x4000594c;*/ /*pm_tx_data_done_process = 0x40005958;*/ config_is_cache_tx_buf_enabled = 0x40005964; -ppMapWaitTxq = 0x40005970; +//ppMapWaitTxq = 0x40005970; ppProcessWaitingQueue = 0x4000597c; ppDisableQueue = 0x40005988; pm_allow_tx = 0x40005994; From afbe2d1165796bd82207121f5d59482375561b4a Mon Sep 17 00:00:00 2001 From: liuning Date: Tue, 31 Oct 2023 14:44:31 +0800 Subject: [PATCH 3/5] fix(rom): fix rom ld for v5.1 --- components/esp_rom/esp32c2/ld/esp32c2.rom.ld | 4 ++-- components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld | 1 + components/esp_rom/esp32c3/ld/esp32c3.rom.ld | 2 +- components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld | 2 +- components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld | 2 +- components/esp_rom/esp32s3/ld/esp32s3.rom.ld | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld index d6fdf0943c4..603d29e1d06 100644 --- a/components/esp_rom/esp32c2/ld/esp32c2.rom.ld +++ b/components/esp_rom/esp32c2/ld/esp32c2.rom.ld @@ -1506,7 +1506,7 @@ mac_tx_set_htsig = 0x40001b5c; mac_tx_set_plcp0 = 0x40001b60; mac_tx_set_plcp1 = 0x40001b64; mac_tx_set_plcp2 = 0x40001b68; -pm_check_state = 0x40001b6c; +/* pm_check_state = 0x40001b6c; */ pm_disable_dream_timer = 0x40001b70; pm_disable_sleep_delay_timer = 0x40001b74; pm_dream = 0x40001b78; @@ -1866,7 +1866,7 @@ ieee80211_recycle_cache_eb = 0x40001fe8; ieee80211_search_node = 0x40001fec; roundup2 = 0x40001ff0; ieee80211_crypto_encap = 0x40001ff4; -ieee80211_crypto_decap = 0x40001ff8; +/* ieee80211_crypto_decap = 0x40001ff8; */ ieee80211_decap = 0x40001ffc; ieee80211_set_tx_pti = 0x40002000; wifi_is_started = 0x40002004; diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld index 7db9247db2a..f17fd513c85 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld @@ -14,6 +14,7 @@ lmacTxDone = 0x4000162c; lmacTxFrame = 0x40001630; mac_tx_set_htsig = 0x40001638; mac_tx_set_plcp1 = 0x40001640; +pm_check_state = 0x40001648; pm_on_beacon_rx = 0x4000167c; /*pm_parse_beacon = 0x40001688;*/ pm_process_tim = 0x4000168c; diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld index b9661d07855..3008884be9b 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.ld @@ -1535,7 +1535,7 @@ mac_tx_set_duration = 0x40001634; mac_tx_set_plcp0 = 0x4000163c; /* mac_tx_set_plcp1 = 0x40001640;*/ mac_tx_set_plcp2 = 0x40001644; -pm_check_state = 0x40001648; +/* pm_check_state = 0x40001648; */ pm_disable_dream_timer = 0x4000164c; pm_disable_sleep_delay_timer = 0x40001650; pm_dream = 0x40001654; diff --git a/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld b/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld index e5bd02bd984..c096f962399 100644 --- a/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld +++ b/components/esp_rom/esp32c6/ld/esp32c6.rom.net80211.ld @@ -48,7 +48,7 @@ ieee80211_copy_eb_header = 0x40000bb4; ieee80211_recycle_cache_eb = 0x40000bb8; ieee80211_search_node = 0x40000bbc; ieee80211_crypto_encap = 0x40000bc0; -ieee80211_crypto_decap = 0x40000bc4; +/* ieee80211_crypto_decap = 0x40000bc4; */ ieee80211_decap = 0x40000bc8; wifi_is_started = 0x40000bcc; ieee80211_gettid = 0x40000bd0; diff --git a/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld b/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld index e9256ac1fd8..af1fbbc8e1b 100644 --- a/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld +++ b/components/esp_rom/esp32c6/ld/esp32c6.rom.pp.ld @@ -56,7 +56,7 @@ mac_tx_set_duration = 0x40000c60; //mac_tx_set_plcp0 = 0x40000c64; //mac_tx_set_plcp1 = 0x40000c68; mac_tx_set_plcp2 = 0x40000c6c; -pm_check_state = 0x40000c70; +/* pm_check_state = 0x40000c70; */ /* pm_disable_dream_timer = 0x40000c74; */ pm_disable_sleep_delay_timer = 0x40000c78; pm_dream = 0x40000c7c; diff --git a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld index 3967479a822..5a86f0cef7b 100644 --- a/components/esp_rom/esp32s3/ld/esp32s3.rom.ld +++ b/components/esp_rom/esp32s3/ld/esp32s3.rom.ld @@ -1837,7 +1837,7 @@ mac_tx_set_duration = 0x400053dc; mac_tx_set_plcp0 = 0x400053f4; /* mac_tx_set_plcp1 = 0x40005400;*/ mac_tx_set_plcp2 = 0x4000540c; -pm_check_state = 0x40005418; +/* pm_check_state = 0x40005418; */ pm_disable_dream_timer = 0x40005424; pm_disable_sleep_delay_timer = 0x40005430; pm_dream = 0x4000543c; From e7b20b754fad5eb6e3119d86c1766c0c51ea86c7 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Thu, 14 Dec 2023 17:57:51 +0800 Subject: [PATCH 4/5] fix(wifi): fix beacon eb memory leak issue --- components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld index f17fd513c85..403f198d4c7 100644 --- a/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld +++ b/components/esp_rom/esp32c3/ld/esp32c3.rom.eco7.ld @@ -32,7 +32,7 @@ wDevCheckBlockError = 0x400017b4; /* wDev_IndicateFrame = 0x400017c8;*/ wDev_ProcessFiq = 0x400017f0; wDev_ProcessRxSucData = 0x400017f4; -ppProcTxDone = 0x40001804; +/*ppProcTxDone = 0x40001804;*/ pm_tx_data_done_process = 0x40001808; ppMapWaitTxq = 0x40001810; ieee80211_encap_esfbuf = 0x4000185c; From 58de97b1934fdedceed3a0e82aac575ef3a89814 Mon Sep 17 00:00:00 2001 From: alanmaxwell Date: Tue, 26 Dec 2023 17:01:38 +0800 Subject: [PATCH 5/5] fix(wifi): change default flash freq from 40M to 80M for esp32 in iperf --- examples/wifi/iperf/sdkconfig.defaults.esp32 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/wifi/iperf/sdkconfig.defaults.esp32 b/examples/wifi/iperf/sdkconfig.defaults.esp32 index b6947c7a213..34c6b6f280e 100644 --- a/examples/wifi/iperf/sdkconfig.defaults.esp32 +++ b/examples/wifi/iperf/sdkconfig.defaults.esp32 @@ -16,7 +16,7 @@ CONFIG_LWIP_UDP_RECVMBOX_SIZE=64 CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=64 CONFIG_ESPTOOLPY_FLASHMODE_QIO=y -CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +CONFIG_ESPTOOLPY_FLASHFREQ_80M=y CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240=y CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ=240