Skip to content

Commit d4fded3

Browse files
author
Juha Heiskanen
authored
Merge pull request ARMmbed#1996 from ARMmbed/ws_bbr_pan_size
Fixed Default small network setup set to follow standard.
2 parents 90a335b + da6fd12 commit d4fded3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

source/6LoWPAN/ws/ws_common.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ int8_t ws_common_allocate_and_init(protocol_interface_info_entry_t *cur)
274274
cur->ws_info->hopping_schdule.operating_mode = OPERATING_MODE_3;
275275
cur->ws_info->hopping_schdule.operating_class = 2;
276276
ws_common_regulatory_domain_config(cur);
277+
cur->ws_info->network_size_config = NETWORK_SIZE_AUTOMATIC;
277278
ws_common_network_size_configure(cur, 10); // defaults to small network size
278279

279280
// Set defaults for the device. user can modify these.
@@ -302,7 +303,12 @@ void ws_common_network_size_configure(protocol_interface_info_entry_t *cur, uint
302303
// imin: 14 (16s)
303304
// doublings:3 (128s)
304305
// redundancy; 0 Disabled
305-
ws_bbr_rpl_config(14, 3, 0);
306+
if (cur->ws_info->network_size_config == NETWORK_SIZE_AUTOMATIC) {
307+
ws_bbr_rpl_config(14, 3, 0);
308+
} else {
309+
ws_bbr_rpl_config(0, 0, 0);
310+
}
311+
306312
} else if (network_size < 300) {
307313
// Configure the Wi-SUN discovery trickle parameters
308314
cur->ws_info->trickle_params_pan_discovery = trickle_params_pan_discovery_medium;

0 commit comments

Comments
 (0)