From 643e6ffdf1cec5e835ec4123785030c1480c60b2 Mon Sep 17 00:00:00 2001 From: luoxu Date: Mon, 19 May 2025 12:00:11 +0800 Subject: [PATCH] feat(ble_mesh): Change the type of rpl size from uint8 to uint16 --- components/bt/esp_ble_mesh/Kconfig.in | 2 +- components/bt/esp_ble_mesh/lib/ext.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/bt/esp_ble_mesh/Kconfig.in b/components/bt/esp_ble_mesh/Kconfig.in index e805231edc..3555390a20 100644 --- a/components/bt/esp_ble_mesh/Kconfig.in +++ b/components/bt/esp_ble_mesh/Kconfig.in @@ -477,7 +477,7 @@ if BLE_MESH int "Maximum capacity of solicitation replay protection list" depends on BLE_MESH_PROXY_SOLIC_PDU_RX default 2 - range 1 255 + range 1 65536 help This option specifies the maximum capacity of the solicitation replay protection list. The solicitation replay protection list is used to diff --git a/components/bt/esp_ble_mesh/lib/ext.c b/components/bt/esp_ble_mesh/lib/ext.c index b09e152c13..486a9e8808 100644 --- a/components/bt/esp_ble_mesh/lib/ext.c +++ b/components/bt/esp_ble_mesh/lib/ext.c @@ -1175,17 +1175,17 @@ uint8_t *bt_mesh_ext_net_get_dev_key_ca(void) return bt_mesh.dev_key_ca; } -uint8_t bt_mesh_ext_net_get_rpl_count(void) +uint16_t bt_mesh_ext_net_get_rpl_count(void) { return ARRAY_SIZE(bt_mesh.rpl); } -uint16_t bt_mesh_ext_net_get_rpl_src(uint8_t index) +uint16_t bt_mesh_ext_net_get_rpl_src(uint16_t index) { return bt_mesh.rpl[index].src; } -void bt_mesh_ext_net_reset_rpl(uint8_t index) +void bt_mesh_ext_net_reset_rpl(uint16_t index) { memset(&bt_mesh.rpl[index], 0, sizeof(bt_mesh.rpl[index])); } @@ -3813,7 +3813,7 @@ void *bt_mesh_ext_brc_srv_get_bridge_table_entry(void *srv, uint8_t index) #endif /* CONFIG_BLE_MESH_BRC_SRV */ } -void *bt_mesh_ext_brc_srv_get_bridge_rpl(uint8_t index) +void *bt_mesh_ext_brc_srv_get_bridge_rpl(uint16_t index) { #if CONFIG_BLE_MESH_BRC_SRV return &bridge_rpl[index]; @@ -4584,7 +4584,7 @@ typedef struct { uint16_t (*_bt_mesh_ext_sub_get_sbr_net_idx)(void *sub); void (*_bt_mesh_ext_sub_set_sbr_net_idx)(void *sub, uint16_t sbr_net_idx); void *(*_bt_mesh_ext_brc_srv_get_bridge_table_entry)(void *srv, uint8_t index); - void *(*_bt_mesh_ext_brc_srv_get_bridge_rpl)(uint8_t index); + void *(*_bt_mesh_ext_brc_srv_get_bridge_rpl)(uint16_t index); /* CONFIG_BLE_MESH_BRC_SRV */ /* CONFIG_BLE_MESH_AGG_CLI */