File tree Expand file tree Collapse file tree 5 files changed +26
-3
lines changed Expand file tree Collapse file tree 5 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -1577,13 +1577,13 @@ static bool ws_rpl_dio_new_parent_accept(struct protocol_interface_info_entry *i
1577
1577
uint16_t parent_candidate_size = rpl_control_parent_candidate_list_size (interface , false);
1578
1578
//TODO check bootstarap state for review
1579
1579
//if we have enough candidates at list do not accept new multicast neighbours
1580
- if (parent_candidate_size > WS_NEIGHBOUR_MAX_CANDIDATE_PROBE ) {
1580
+ if (parent_candidate_size > interface -> ws_info -> rpl_parent_candidate_max ) {
1581
1581
return false;
1582
1582
}
1583
1583
1584
1584
parent_candidate_size = rpl_control_parent_candidate_list_size (interface , true);
1585
- //If we have already enough parent selected Candidates count is bigger tahn 4
1586
- if (parent_candidate_size >= 2 ) {
1585
+ //If we have already enough parent selected Candidates count is bigger than configured
1586
+ if (parent_candidate_size >= interface -> ws_info -> rpl_selected_parent_max ) {
1587
1587
return false;
1588
1588
}
1589
1589
Original file line number Diff line number Diff line change @@ -300,6 +300,8 @@ int8_t ws_common_allocate_and_init(protocol_interface_info_entry_t *cur)
300
300
cur -> ws_info -> hopping_schdule .operating_class = 2 ;
301
301
ws_common_regulatory_domain_config (cur );
302
302
cur -> ws_info -> network_size_config = NETWORK_SIZE_MEDIUM ;
303
+ cur -> ws_info -> rpl_parent_candidate_max = WS_RPL_PARENT_CANDIDATE_MAX ;
304
+ cur -> ws_info -> rpl_selected_parent_max = WS_RPL_SELECTED_PARENT_MAX ;
303
305
ws_common_network_size_configure (cur , 200 ); // defaults to medium network size
304
306
305
307
// Set defaults for the device. user can modify these.
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ typedef struct ws_info_s {
72
72
trickle_t trickle_pan_advertisement ;
73
73
trickle_params_t trickle_params_pan_discovery ;
74
74
uint8_t network_size_config ; // configuration for network size selection of application.
75
+ uint16_t rpl_parent_candidate_max ;
76
+ uint16_t rpl_selected_parent_max ;
75
77
uint8_t rpl_state ; // state from rpl_event_t
76
78
uint8_t pas_requests ; // Amount of PAN solicits sent
77
79
parent_info_t parent_info [WS_PARENT_LIST_SIZE ];
Original file line number Diff line number Diff line change @@ -207,6 +207,12 @@ typedef struct ws_bs_ie {
207
207
208
208
#define WS_ETX_MIN_WAIT_TIME 60
209
209
210
+ #define WS_RPL_PARENT_CANDIDATE_MAX 5
211
+ #define WS_RPL_SELECTED_PARENT_MAX 2
212
+
213
+ #define WS_CERTIFICATE_RPL_PARENT_CANDIDATE_MAX 8
214
+ #define WS_CERTIFICATE_RPL_SELECTED_PARENT_MAX 3
215
+
210
216
/**
211
217
* Wi-sun spesific non-preferred prefix policy label
212
218
*/
Original file line number Diff line number Diff line change @@ -140,6 +140,17 @@ int ws_management_network_size_set(
140
140
uint8_t old_setup = ws_info (cur )-> network_size_config ;
141
141
ws_info (cur )-> network_size_config = network_size ;
142
142
143
+ uint16_t rpl_parent_candidate_max ;
144
+ uint16_t rpl_selected_parent_max ;
145
+
146
+ if (network_size == NETWORK_SIZE_CERTIFICATE ) {
147
+ rpl_parent_candidate_max = WS_CERTIFICATE_RPL_PARENT_CANDIDATE_MAX ;
148
+ rpl_selected_parent_max = WS_CERTIFICATE_RPL_SELECTED_PARENT_MAX ;
149
+ } else {
150
+ rpl_parent_candidate_max = WS_RPL_PARENT_CANDIDATE_MAX ;
151
+ rpl_selected_parent_max = WS_RPL_SELECTED_PARENT_MAX ;
152
+ }
153
+
143
154
if (network_size == NETWORK_SIZE_LARGE ) {
144
155
ws_common_network_size_configure (cur , 5000 );
145
156
} else if (network_size == NETWORK_SIZE_MEDIUM ) {
@@ -152,6 +163,8 @@ int ws_management_network_size_set(
152
163
ws_info (cur )-> network_size_config = old_setup ;
153
164
return -2 ;
154
165
}
166
+ cur -> ws_info -> rpl_parent_candidate_max = rpl_parent_candidate_max ;
167
+ cur -> ws_info -> rpl_selected_parent_max = rpl_selected_parent_max ;
155
168
return 0 ;
156
169
}
157
170
You can’t perform that action at this time.
0 commit comments