From 85474d15ccc19664861ff0510db2c705dbd3b45a 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 e09165c585..245892d594 100644 --- a/components/bt/esp_ble_mesh/Kconfig.in +++ b/components/bt/esp_ble_mesh/Kconfig.in @@ -409,7 +409,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 a2f0680c0a..4554599b1c 100644 --- a/components/bt/esp_ble_mesh/lib/ext.c +++ b/components/bt/esp_ble_mesh/lib/ext.c @@ -1178,17 +1178,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])); } @@ -3816,7 +3816,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]; @@ -4587,7 +4587,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 */