Skip to content

Commit 15bacb4

Browse files
authored
Merge pull request #12934 from juhhei01/mbed-os-5.15
[mbed-os-5.15]Add possibility to configure Mesh MAC neighbourtable size.
2 parents b6370b4 + e1c9c58 commit 15bacb4

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

features/nanostack/mbed-mesh-api/mbed_lib.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
"help": "Nanostack's heap size [bytes: 0-‭4294967295‬]",
77
"value": 32500
88
},
9+
"mac-neigh-table-size": {
10+
"help": "Number of devices stored to the SW MAC neighbour table",
11+
"value_min": 5,
12+
"value_max": 255,
13+
"value": 32
14+
},
915
"use-malloc-for-heap": {
1016
"help": "Use `malloc()` for reserving the Nanostack's internal heap.",
1117
"value": false

features/nanostack/mbed-mesh-api/source/nd_tasklet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ int8_t nd_tasklet_network_init(int8_t device_id)
425425
{
426426
// TODO, read interface name from configuration
427427
mac_description_storage_size_t storage_sizes;
428-
storage_sizes.device_decription_table_size = 32;
428+
storage_sizes.device_decription_table_size = MBED_CONF_MBED_MESH_API_MAC_NEIGH_TABLE_SIZE;
429429
storage_sizes.key_description_table_size = 3;
430430
storage_sizes.key_lookup_size = 1;
431431
storage_sizes.key_usage_size = 3;

features/nanostack/mbed-mesh-api/source/thread_tasklet.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ int8_t thread_tasklet_network_init(int8_t device_id)
461461
{
462462
// TODO, read interface name from configuration
463463
mac_description_storage_size_t storage_sizes;
464-
storage_sizes.device_decription_table_size = 32;
464+
storage_sizes.device_decription_table_size = MBED_CONF_MBED_MESH_API_MAC_NEIGH_TABLE_SIZE;
465465
storage_sizes.key_description_table_size = 6;
466466
storage_sizes.key_lookup_size = 1;
467467
storage_sizes.key_usage_size = 3;

features/nanostack/mbed-mesh-api/source/wisun_tasklet.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include MBED_CONF_MBED_MESH_API_CERTIFICATE_HEADER
3939
#endif
4040

41+
4142
// For tracing we need to define flag, have include and define group
4243
//#define HAVE_DEBUG
4344
#define TRACE_GROUP "WSND"
@@ -575,7 +576,7 @@ int8_t wisun_tasklet_network_init(int8_t device_id)
575576
{
576577
// TODO, read interface name from configuration
577578
mac_description_storage_size_t storage_sizes;
578-
storage_sizes.device_decription_table_size = 32;
579+
storage_sizes.device_decription_table_size = MBED_CONF_MBED_MESH_API_MAC_NEIGH_TABLE_SIZE;
579580
storage_sizes.key_description_table_size = 4;
580581
storage_sizes.key_lookup_size = 1;
581582
storage_sizes.key_usage_size = 3;

0 commit comments

Comments
 (0)