Skip to content

Commit 0b4aa78

Browse files
author
Juha Heiskanen
committed
Parent Broadcast synch fix and TR51CF slot define fix
Fixed Broadcast slot calculation if we keep timing info over 1 second at queue Fixed Parent synch after receiving BT-IE info. Change-Id: Ia493380778ea20f5121d374a8afada7bcf9a7874
1 parent 1f4625e commit 0b4aa78

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

source/6LoWPAN/ws/ws_llc_data_service.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -521,15 +521,16 @@ static void ws_llc_mac_indication_cb(const mac_api_t* api, const mcps_data_ind_t
521521
if (us_ie_inline) {
522522
ws_neighbor_class_neighbor_unicast_schedule_set(neighbor_info.ws_neighbor, &us_ie);
523523

524-
if (neighbor_info.neighbor->link_role == PRIORITY_PARENT_NEIGHBOUR) {
525-
// We have broadcast schedule set up set the broadcast parent schedule
526-
ns_fhss_ws_set_parent(interface->ws_info->fhss_api, neighbor_info.neighbor->mac64, &neighbor_info.ws_neighbor->fhss_data.bc_timing_info);
527-
}
524+
528525
}
529526
//Update BT if it is part of message
530527
ws_bt_ie_t ws_bt;
531528
if (ws_wh_bt_read(ie_ext->headerIeList, ie_ext->headerIeListLength, &ws_bt)) {
532529
ws_neighbor_class_neighbor_broadcast_time_info_update(neighbor_info.ws_neighbor, &ws_bt, data->timestamp);
530+
if (neighbor_info.neighbor->link_role == PRIORITY_PARENT_NEIGHBOUR) {
531+
// We have broadcast schedule set up set the broadcast parent schedule
532+
ns_fhss_ws_set_parent(interface->ws_info->fhss_api, neighbor_info.neighbor->mac64, &neighbor_info.ws_neighbor->fhss_data.bc_timing_info);
533+
}
533534
}
534535

535536
//Refresh Neighbor if unicast

source/Service_Libs/fhss/fhss_ws.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,9 @@ int fhss_ws_set_parent(fhss_structure_t *fhss_structure, const uint8_t eui64[8],
682682
fhss_structure->ws->fhss_configuration.fhss_broadcast_interval = bc_timing_info->broadcast_interval;
683683
fhss_set_txrx_slot_length(fhss_structure);
684684
fhss_structure->ws->bc_slot = bc_timing_info->broadcast_slot + slots_since_reception;
685+
if (fhss_structure->ws->fhss_configuration.ws_bc_channel_function == WS_TR51CF) {
686+
fhss_structure->ws->bc_slot %= fhss_structure->number_of_channels;
687+
}
685688
platform_exit_critical();
686689
//TODO: support multiple parents
687690
fhss_structure->ws->parent_bc_info = bc_timing_info;

0 commit comments

Comments
 (0)