Merge branch 'feat/ble_mesh_alignment_to_v6.0_v5.5' into 'release/v5.5'

feat(ble_mesh): alignment to release/v6.0 (v5.5)

See merge request espressif/esp-idf!45594
This commit is contained in:
Island
2026-02-26 11:35:07 +08:00
5 changed files with 15 additions and 8 deletions
@@ -13,6 +13,7 @@
#include <stddef.h> #include <stddef.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
#include "esp_attr.h" #include "esp_attr.h"
#include "esp_heap_caps.h" #include "esp_heap_caps.h"
@@ -1,6 +1,6 @@
/* /*
* SPDX-FileCopyrightText: 2016 Wind River Systems, Inc. * SPDX-FileCopyrightText: 2016 Wind River Systems, Inc.
* SPDX-FileContributor: 2020-2021 Espressif Systems (Shanghai) CO LTD * SPDX-FileContributor: 2020-2026 Espressif Systems (Shanghai) CO LTD
* *
* SPDX-License-Identifier: Apache-2.0 * SPDX-License-Identifier: Apache-2.0
*/ */
@@ -21,9 +21,15 @@
extern "C" { extern "C" {
#endif #endif
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
#define BLE_MESH_PLATFORM_CORE_NUMS CONFIG_FREERTOS_NUMBER_OF_CORES
#else
#define BLE_MESH_PLATFORM_CORE_NUMS portNUM_PROCESSORS
#endif
#ifdef CONFIG_BT_BLUEDROID_ENABLED #ifdef CONFIG_BT_BLUEDROID_ENABLED
#ifdef CONFIG_BT_BLUEDROID_PINNED_TO_CORE #ifdef CONFIG_BT_BLUEDROID_PINNED_TO_CORE
#define BLE_MESH_ADV_TASK_CORE (CONFIG_BT_BLUEDROID_PINNED_TO_CORE < CONFIG_FREERTOS_NUMBER_OF_CORES ? CONFIG_BT_BLUEDROID_PINNED_TO_CORE : tskNO_AFFINITY) #define BLE_MESH_ADV_TASK_CORE (CONFIG_BT_BLUEDROID_PINNED_TO_CORE < BLE_MESH_PLATFORM_CORE_NUMS ? CONFIG_BT_BLUEDROID_PINNED_TO_CORE : tskNO_AFFINITY)
#else #else
#define BLE_MESH_ADV_TASK_CORE (0) #define BLE_MESH_ADV_TASK_CORE (0)
#endif #endif
@@ -31,7 +37,7 @@ extern "C" {
#ifdef CONFIG_BT_NIMBLE_ENABLED #ifdef CONFIG_BT_NIMBLE_ENABLED
#ifdef CONFIG_BT_NIMBLE_PINNED_TO_CORE #ifdef CONFIG_BT_NIMBLE_PINNED_TO_CORE
#define BLE_MESH_ADV_TASK_CORE (CONFIG_BT_NIMBLE_PINNED_TO_CORE < CONFIG_FREERTOS_NUMBER_OF_CORES ? CONFIG_BT_NIMBLE_PINNED_TO_CORE : tskNO_AFFINITY) #define BLE_MESH_ADV_TASK_CORE (CONFIG_BT_NIMBLE_PINNED_TO_CORE < BLE_MESH_PLATFORM_CORE_NUMS ? CONFIG_BT_NIMBLE_PINNED_TO_CORE : tskNO_AFFINITY)
#else #else
#define BLE_MESH_ADV_TASK_CORE (0) #define BLE_MESH_ADV_TASK_CORE (0)
#endif #endif
+2 -2
View File
@@ -2105,9 +2105,9 @@ void bt_mesh_trans_init(void)
#if CONFIG_BLE_MESH_LONG_PACKET #if CONFIG_BLE_MESH_LONG_PACKET
for (i = 0; i < ARRAY_SIZE(ext_seg_rx); i++) { for (i = 0; i < ARRAY_SIZE(ext_seg_rx); i++) {
k_delayed_work_init(&ext_seg_rx[i].ack_timer, seg_ack); k_delayed_work_init(&ext_seg_rx[i].ack_timer, seg_ack);
ext_seg_rx[i].buf.size = CONFIG_BLE_MESH_LONG_PACKET_ADV_LEN; ext_seg_rx[i].buf.size = BLE_MESH_EXT_RX_SDU_MAX;
ext_seg_rx[i].buf.__buf = (ext_seg_rx_buf_data + ext_seg_rx[i].buf.__buf = (ext_seg_rx_buf_data +
(i * CONFIG_BLE_MESH_LONG_PACKET_ADV_LEN)); (i * BLE_MESH_EXT_RX_SDU_MAX));
ext_seg_rx[i].buf.data = ext_seg_rx[i].buf.__buf; ext_seg_rx[i].buf.data = ext_seg_rx[i].buf.__buf;
} }
#endif #endif
@@ -2723,9 +2723,9 @@ void bt_mesh_trans_init(void)
#if CONFIG_BLE_MESH_LONG_PACKET #if CONFIG_BLE_MESH_LONG_PACKET
for (i = 0; i < ARRAY_SIZE(ext_seg_rx); i++) { for (i = 0; i < ARRAY_SIZE(ext_seg_rx); i++) {
ext_seg_rx[i].buf.size = CONFIG_BLE_MESH_LONG_PACKET_ADV_LEN; ext_seg_rx[i].buf.size = BLE_MESH_EXT_RX_SDU_MAX;
ext_seg_rx[i].buf.__buf = (ext_seg_rx_buf_data + ext_seg_rx[i].buf.__buf = (ext_seg_rx_buf_data +
(i * CONFIG_BLE_MESH_LONG_PACKET_ADV_LEN)); (i * BLE_MESH_EXT_RX_SDU_MAX));
ext_seg_rx[i].buf.data = ext_seg_rx[i].buf.__buf; ext_seg_rx[i].buf.data = ext_seg_rx[i].buf.__buf;
} }
#endif #endif
@@ -185,7 +185,7 @@ static void btc_ble_mesh_dfu_client_free_req_data(btc_msg_t *msg)
} }
if (msg->act >= ESP_BLE_MESH_DFU_CLIENT_EVT_MAX) { if (msg->act >= ESP_BLE_MESH_DFU_CLIENT_EVT_MAX) {
BT_ERR("%s, Invalid event %d", __func, msg->act); BT_ERR("%s, Invalid event %d", __func__, msg->act);
return; return;
} }