Skip to content

Commit 666dbbf

Browse files
author
Jarkko Paso
committed
FHSS: Start broadcast schedule only if device is border router
1 parent 98f9991 commit 666dbbf

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,13 @@ static fhss_ws_neighbor_timing_info_t *ws_get_neighbor_info(const fhss_api_t *ap
158158
static int8_t ws_enable_fhss(protocol_interface_info_entry_t *cur)
159159
{
160160
fhss_ws_configuration_t fhss_configuration;
161+
memset(&fhss_configuration, 0, sizeof(fhss_ws_configuration_t));
161162
fhss_configuration.bsi = cur->ws_info->hopping_schdule.fhss_bsi;
162163
memcpy(fhss_configuration.channel_mask, cur->ws_info->hopping_schdule.channel_mask, sizeof(uint32_t) * 8);
163-
fhss_configuration.fhss_bc_dwell_interval = cur->ws_info->hopping_schdule.fhss_bc_dwell_interval;
164-
fhss_configuration.fhss_broadcast_interval = cur->ws_info->hopping_schdule.fhss_broadcast_interval;
164+
if (cur->bootsrap_mode == ARM_NWK_BOOTSRAP_MODE_6LoWPAN_BORDER_ROUTER) {
165+
fhss_configuration.fhss_bc_dwell_interval = cur->ws_info->hopping_schdule.fhss_bc_dwell_interval;
166+
fhss_configuration.fhss_broadcast_interval = cur->ws_info->hopping_schdule.fhss_broadcast_interval;
167+
}
165168
fhss_configuration.fhss_uc_dwell_interval = cur->ws_info->hopping_schdule.fhss_uc_dwell_interval;
166169
fhss_configuration.get_neighbor_info = &ws_get_neighbor_info;
167170
fhss_configuration.ws_channel_function = cur->ws_info->hopping_schdule.channel_function;

0 commit comments

Comments
 (0)