Compare commits

...

9 Commits

Author SHA1 Message Date
Jiang Jiang Jian
0c4a4ef019 Merge branch 'feat/ide_requirements_v5.1' into 'release/v5.1'
feat(tools/requirements): Add IDE requirements files (v5.1)

See merge request espressif/esp-idf!40944
2025-08-01 11:58:54 +08:00
Jiang Jiang Jian
477099dd80 Merge branch 'fix/fix_esp32c2_eco4_ld_issue_v51' into 'release/v5.1'
fix(wifi): fix esp32c2 eco4 ld issue v51

See merge request espressif/esp-idf!40925
2025-08-01 10:31:34 +08:00
Jiang Jiang Jian
690cefd69b Merge branch 'fix/improve_tcp_performance_v51' into 'release/v5.1'
fix(wifi): improve esp32c2 and esp32s2 tcp performance v51

See merge request espressif/esp-idf!40938
2025-07-31 21:10:00 +08:00
Jiang Jiang Jian
bb1446e805 Merge branch 'fix_ot_src_addr_select_v5.1' into 'release/v5.1'
Fix ot src addr select (v5.1)

See merge request espressif/esp-idf!40877
2025-07-31 21:09:23 +08:00
Peter Dragun
cbc67b2a8a feat(tools/requirements): Add IDE requirements files 2025-07-31 12:06:48 +02:00
wangtao@espressif.com
17974244fc fix(wifi): improve esp32c2 and esp32s2 tcp performance 2025-07-31 17:26:13 +08:00
wangtao@espressif.com
5f8cf8b598 fix(wifi): fix esp32c2 eco4 ld issue 2025-07-31 11:08:37 +08:00
zwx
00bba2fc06 fix(openthread): use OpenThread API in lwIP source address selection hook 2025-07-30 15:18:39 +08:00
zwx
4f2cd9eb45 fix(openthread): fix the preference of the ip6 address set to lwip 2025-07-29 11:51:31 +08:00
8 changed files with 45 additions and 18 deletions

View File

@@ -109,6 +109,7 @@ ieee80211_output_do = 0x4000210c;
ieee80211_send_nulldata = 0x40002110;
//ieee80211_setup_robust_mgmtframe = 0x40002114;
//ieee80211_mgmt_output = 0x40002118;
ieee80211_encap_null_data = 0x4000211c;
//ieee80211_send_deauth_no_bss = 0x40002120;
//ieee80211_tx_mgt_cb = 0x4000212c;
//sta_rx_csa = 0x40002134;

View File

@@ -1015,7 +1015,7 @@ ieee80211_alloc_tx_buf = 0x40002108;
/* ieee80211_output_do = 0x4000210c; */
/* ieee80211_send_nulldata = 0x40002110; */
/* ieee80211_setup_robust_mgmtframe = 0x40002114; */
ieee80211_encap_null_data = 0x4000211c;
//ieee80211_encap_null_data = 0x4000211c;
//ieee80211_send_deauth_no_bss = 0x40002120;
ieee80211_alloc_deauth = 0x40002124;
ieee80211_send_proberesp = 0x40002128;

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -153,21 +153,29 @@ static err_t openthread_netif_init(struct netif *netif)
const ip_addr_t *lwip_hook_ip6_select_source_address(struct netif *netif, const ip6_addr_t *dest)
{
const ip6_addr_t *cur_addr;
ip6_addr_t cand_addr = { 0 };
uint8_t idx = 0;
otError err = OT_ERROR_NONE;
// Only process with ot netif.
if (!(netif->name[0] == 'o' && netif->name[1] == 't')) {
return NULL;
}
// Currently, prefer the address with the same prefix of the destination address.
// If no address found, return NULL for selection source address using the default algorithm.
for (idx = 0; idx < LWIP_IPV6_NUM_ADDRESSES; idx++) {
if (!ip6_addr_isvalid(netif_ip6_addr_state(netif, idx))) {
continue;
}
cur_addr = netif_ip6_addr(netif, idx);
if (ip6_addr_netcmp_zoneless(cur_addr, dest)) {
return netif_ip_addr6(netif, idx);
otMessageInfo message_info = { 0 };
memcpy(message_info.mPeerAddr.mFields.m32, dest->addr, sizeof(message_info.mPeerAddr.mFields.m32));
otInstance *instance = esp_openthread_get_instance();
esp_openthread_task_switching_lock_acquire(portMAX_DELAY);
err = otIp6SelectSourceAddress(instance, &message_info);
esp_openthread_task_switching_lock_release();
if (err == OT_ERROR_NONE) {
// If a Src address was selected by the OT stack, use this address.
memcpy(cand_addr.addr, message_info.mSockAddr.mFields.m32, sizeof(cand_addr.addr));
for (idx = 0; idx < LWIP_IPV6_NUM_ADDRESSES; idx++) {
if (!ip6_addr_isvalid(netif_ip6_addr_state(netif, idx))) {
continue;
}
if (ip6_addr_cmp_zoneless(netif_ip6_addr(netif, idx), &cand_addr)) {
return netif_ip_addr6(netif, idx);
}
}
}
return NULL;

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -106,9 +106,13 @@ static void process_thread_address(const otIp6AddressInfo *address_info, bool is
} else {
ip_event_add_ip6_t add_addr;
add_addr.addr = addr;
// if an address is not mesh local or link local, we set preferred for this address.
add_addr.preferred =
is_mesh_local_addr(address_info->mAddress) || is_link_local_addr(address_info->mAddress) ? 0 : 1;
// Only mark the address as preferred if
// it is marked preferred by OpenThread and it is neither a mesh-local nor a link-local address.
if (address_info->mPreferred == 0 || is_mesh_local_addr(address_info->mAddress) || is_link_local_addr(address_info->mAddress)) {
add_addr.preferred = 0;
} else {
add_addr.preferred = 1;
}
if (esp_event_post(OPENTHREAD_EVENT, OPENTHREAD_EVENT_GOT_IP6, &add_addr, sizeof(add_addr), 0) != ESP_OK) {
ESP_LOGE(OT_PLAT_LOG_TAG, "Failed to post OpenThread got ip6 address event");
}

View File

@@ -9,7 +9,7 @@ CONFIG_ESP_WIFI_TX_BA_WIN=16
CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP_WIFI_RX_BA_WIN=14
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=11520
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=7200
CONFIG_LWIP_TCP_WND_DEFAULT=11520
CONFIG_LWIP_TCP_RECVMBOX_SIZE=32
CONFIG_LWIP_UDP_RECVMBOX_SIZE=32

View File

@@ -9,7 +9,7 @@ CONFIG_ESP_WIFI_TX_BA_WIN=16
CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP_WIFI_RX_BA_WIN=16
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=28000
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=17280
CONFIG_LWIP_TCP_WND_DEFAULT=28000
CONFIG_LWIP_TCP_RECVMBOX_SIZE=32
CONFIG_LWIP_UDP_RECVMBOX_SIZE=32

View File

@@ -36,6 +36,12 @@
"description": "Packages for building ESP-IDF documentation",
"optional": true,
"requirement_path": "tools/requirements/requirements.docs.txt"
},
{
"name": "ide",
"description": "Packages for IDE support in ESP-IDF",
"optional": true,
"requirement_path": "tools/requirements/requirements.ide.txt"
}
]
}

View File

@@ -0,0 +1,8 @@
# Python package requirements for IDE support in ESP-IDF.
# This feature can be enabled by running "install.{sh,bat,ps1,fish} --enable-ide"
#
# This file lists Python packages without version specifiers. Version details
# are stored in a separate constraints file. For more information, visit:
# https://docs.espressif.com/projects/esp-idf/en/latest/api-guides/tools/idf-tools.html
esp-idf-monitor[ide]