Skip to content

Commit b6236f9

Browse files
author
Jarkko Paso
committed
WS bootstrap: Separated unicast and broadcast channel functions
1 parent bbc0d77 commit b6236f9

File tree

12 files changed

+144
-53
lines changed

12 files changed

+144
-53
lines changed

nanostack/fhss_config.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ typedef struct fhss_ws_configuration
116116
/** Broadcast dwell interval. Range: 15-250 milliseconds. */
117117
uint8_t fhss_bc_dwell_interval;
118118

119+
/** Unicast fixed channel */
120+
uint8_t unicast_fixed_channel;
121+
122+
/** Broadcast fixed channel */
123+
uint8_t broadcast_fixed_channel;
124+
119125
/** Channel mask. */
120126
uint32_t channel_mask[8];
121127

nanostack/fhss_ws_extension.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ typedef struct unicast_timing_info {
3737
unsigned unicast_channel_function:3; /**< Unicast schedule channel function */
3838
uint8_t unicast_dwell_interval; /**< Unicast dwell interval */
3939
uint16_t unicast_number_of_channels; /**< Unicast number of channels */
40-
uint16_t fixed_channel; /**< fixed channel*/
40+
uint16_t fixed_channel; /**< Unicast fixed channel*/
4141
uint_fast24_t ufsi; /**< Unicast fractional sequence interval */
4242
uint32_t utt_rx_timestamp; /**< UTT-IE reception timestamp */
4343
} unicast_timing_info_t;
@@ -48,6 +48,7 @@ typedef struct unicast_timing_info {
4848
typedef struct broadcast_timing_info {
4949
unsigned broadcast_channel_function:3; /**< Broadcast schedule channel function */
5050
uint8_t broadcast_dwell_interval; /**< Broadcast dwell interval */
51+
uint16_t fixed_channel; /**< Broadcast fixed channel*/
5152
uint16_t broadcast_slot; /**< Broadcast slot number */
5253
uint16_t broadcast_schedule_id; /**< Broadcast schedule identifier */
5354
uint_fast24_t broadcast_interval_offset; /**< Broadcast interval offset */

nanostack/ws_management_api.h

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
#include "ns_types.h"
3232
#include "net_interface.h" /* Declaration for channel_list_s. */
3333

34+
// TODO: Remove when application updated
35+
#define ws_management_fhss_channel_function_configure ws_management_fhss_unicast_channel_function_configure
36+
3437
#ifdef __cplusplus
3538
extern "C" {
3639
#endif
@@ -140,7 +143,8 @@ int ws_management_channel_mask_set(
140143
*
141144
* \param interface_id Network interface ID.
142145
* \param channel_plan Channel plan must be 1 application defined if deviating from regulatory domain (0).
143-
* \param channel_function 0: Fixed channel, 1:TR51CF, 2: Direct Hash, 3: Vendor defined.
146+
* \param uc_channel_function 0: Fixed channel, 1:TR51CF, 2: Direct Hash, 3: Vendor defined.
147+
* \param bc_channel_function 0: Fixed channel, 1:TR51CF, 2: Direct Hash, 3: Vendor defined.
144148
* \param ch0_freq ch0 center frequency.
145149
* \param channel_spacing Channel spacing value 0:200k, 1:400k, 2:600k, 3:100k.
146150
* \param number_of_channels FHSS phy operating mode default to "1b".
@@ -151,7 +155,8 @@ int ws_management_channel_mask_set(
151155
int ws_management_channel_plan_set(
152156
int8_t interface_id,
153157
uint8_t channel_plan,
154-
uint8_t channel_function,
158+
uint8_t uc_channel_function,
159+
uint8_t bc_channel_function,
155160
uint32_t ch0_freq, // Stack can not modify this
156161
uint8_t channel_spacing,// Stack can not modify this
157162
uint8_t number_of_channels);// Stack can not modify this
@@ -176,19 +181,36 @@ int ws_management_fhss_timing_configure(
176181
uint8_t fhss_bc_dwell_interval);
177182

178183
/**
179-
* Configure channel function.
184+
* Configure unicast channel function.
185+
*
186+
* Change the default configuration for Wi-SUN FHSS operation.
187+
* This will use randomized value for fixed channel if used.
188+
* if application defined is used the behaviour is undefined
189+
*
190+
* \param interface_id Network interface ID.
191+
* \param channel_function Unicast channel function
192+
*
193+
* \return 0, Init OK.
194+
* \return <0 Init fail.
195+
*/
196+
int ws_management_fhss_unicast_channel_function_configure(
197+
int8_t interface_id,
198+
uint8_t channel_function);
199+
200+
/**
201+
* Configure broadcast channel function.
180202
*
181203
* Change the default configuration for Wi-SUN FHSS operation.
182204
* This will use randomized value for fixed channel if used.
183205
* if application defined is used the behaviour is undefined
184206
*
185207
* \param interface_id Network interface ID.
186-
* \param channel_function channel
208+
* \param channel_function Broadcast channel function
187209
*
188210
* \return 0, Init OK.
189211
* \return <0 Init fail.
190212
*/
191-
int ws_management_fhss_channel_function_configure(
213+
int ws_management_fhss_broadcast_channel_function_configure(
192214
int8_t interface_id,
193215
uint8_t channel_function);
194216

source/6LoWPAN/ws/ws_bootstrap.c

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,8 @@ static fhss_ws_neighbor_timing_info_t *ws_get_neighbor_info(const fhss_api_t *ap
182182
static void ws_bootstrap_llc_hopping_update(struct protocol_interface_info_entry *cur, const fhss_ws_configuration_t *fhss_configuration)
183183
{
184184
memcpy(cur->ws_info->hopping_schdule.channel_mask, fhss_configuration->channel_mask, sizeof(uint32_t) * 8);
185-
cur->ws_info->hopping_schdule.channel_function = fhss_configuration->ws_uc_channel_function;
185+
cur->ws_info->hopping_schdule.uc_channel_function = fhss_configuration->ws_uc_channel_function;
186+
cur->ws_info->hopping_schdule.bc_channel_function = fhss_configuration->ws_bc_channel_function;
186187
cur->ws_info->hopping_schdule.fhss_bc_dwell_interval = fhss_configuration->fhss_bc_dwell_interval;
187188
cur->ws_info->hopping_schdule.fhss_broadcast_interval = fhss_configuration->fhss_broadcast_interval;
188189
cur->ws_info->hopping_schdule.fhss_uc_dwell_interval = fhss_configuration->fhss_uc_dwell_interval;
@@ -206,6 +207,7 @@ static int8_t ws_fhss_initialize(protocol_interface_info_entry_t *cur)
206207

207208
fhss_configuration.fhss_uc_dwell_interval = cur->ws_info->fhss_uc_dwell_interval;
208209
fhss_configuration.ws_uc_channel_function = cur->ws_info->fhss_uc_channel_function;
210+
fhss_configuration.ws_bc_channel_function = cur->ws_info->fhss_bc_channel_function;
209211
fhss_configuration.fhss_bc_dwell_interval = cur->ws_info->fhss_bc_dwell_interval;
210212
fhss_configuration.fhss_broadcast_interval = cur->ws_info->fhss_bc_interval;
211213

@@ -224,6 +226,7 @@ static int8_t ws_fhss_initialize(protocol_interface_info_entry_t *cur)
224226
}
225227
memcpy(cur->ws_info->fhss_channel_mask, fhss_configuration->channel_mask, sizeof(uint32_t) * 8);
226228
cur->ws_info->fhss_uc_channel_function = fhss_configuration->ws_uc_channel_function;
229+
cur->ws_info->fhss_bc_channel_function = fhss_configuration->ws_bc_channel_function;
227230
cur->ws_info->fhss_bc_dwell_interval = fhss_configuration->fhss_bc_dwell_interval;
228231
cur->ws_info->fhss_bc_interval = fhss_configuration->fhss_broadcast_interval;
229232
cur->ws_info->fhss_uc_dwell_interval = fhss_configuration->fhss_uc_dwell_interval;
@@ -234,10 +237,11 @@ static int8_t ws_fhss_set_defaults(protocol_interface_info_entry_t *cur, fhss_ws
234237
{
235238
fhss_configuration->fhss_uc_dwell_interval = cur->ws_info->fhss_uc_dwell_interval;
236239
fhss_configuration->ws_uc_channel_function = cur->ws_info->fhss_uc_channel_function;
237-
// TODO: Just temporarily using hard coded broadcast channel function
238-
fhss_configuration->ws_bc_channel_function = WS_DH1CF;
240+
fhss_configuration->ws_bc_channel_function = cur->ws_info->fhss_bc_channel_function;
239241
fhss_configuration->fhss_bc_dwell_interval = cur->ws_info->fhss_bc_dwell_interval;
240242
fhss_configuration->fhss_broadcast_interval = cur->ws_info->fhss_bc_interval;
243+
fhss_configuration->unicast_fixed_channel = cur->ws_info->hopping_schdule.uc_fixed_channel;
244+
fhss_configuration->broadcast_fixed_channel = cur->ws_info->hopping_schdule.bc_fixed_channel;
241245
ws_generate_channel_list(fhss_configuration->channel_mask, cur->ws_info->hopping_schdule.number_of_channels, cur->ws_info->hopping_schdule.regulatory_domain);
242246

243247
// using bitwise AND operation for user set channel mask to remove channels not allowed in this device
@@ -270,12 +274,15 @@ static int8_t ws_fhss_discovery_configure(protocol_interface_info_entry_t *cur)
270274

271275
fhss_configuration.fhss_uc_dwell_interval = 0;
272276
fhss_configuration.ws_uc_channel_function = WS_FIXED_CHANNEL;
277+
fhss_configuration.ws_bc_channel_function = WS_FIXED_CHANNEL;
273278
fhss_configuration.fhss_bc_dwell_interval = 0;
274279
fhss_configuration.fhss_broadcast_interval = 0;
275-
cur->ws_info->hopping_schdule.fixed_channel = randLIB_get_random_in_range(0,cur->ws_info->hopping_schdule.number_of_channels - 1);
280+
cur->ws_info->hopping_schdule.uc_fixed_channel = randLIB_get_random_in_range(0,cur->ws_info->hopping_schdule.number_of_channels - 1);
281+
cur->ws_info->hopping_schdule.bc_fixed_channel = randLIB_get_random_in_range(0,cur->ws_info->hopping_schdule.number_of_channels - 1);
276282
memset(fhss_configuration.channel_mask, 0, sizeof(uint32_t) * 8);
277-
channel_list_set_channel(fhss_configuration.channel_mask, cur->ws_info->hopping_schdule.fixed_channel, true);
278-
283+
channel_list_set_channel(fhss_configuration.channel_mask, cur->ws_info->hopping_schdule.uc_fixed_channel, true);
284+
fhss_configuration.unicast_fixed_channel = cur->ws_info->hopping_schdule.uc_fixed_channel;
285+
fhss_configuration.broadcast_fixed_channel = cur->ws_info->hopping_schdule.bc_fixed_channel;
279286
ns_fhss_ws_configuration_set(cur->ws_info->fhss_api,&fhss_configuration);
280287
ws_bootstrap_llc_hopping_update(cur,&fhss_configuration);
281288

@@ -313,17 +320,16 @@ static void ws_bootstrap_primary_parent_set(struct protocol_interface_info_entry
313320

314321
ws_fhss_set_defaults(cur, &fhss_configuration);
315322

316-
// Learning unicast network configuration
317-
fhss_configuration.ws_uc_channel_function = neighbor_info->ws_neighbor->fhss_data.uc_timing_info.unicast_channel_function;
318-
if (fhss_configuration.ws_uc_channel_function == WS_FIXED_CHANNEL) {
319-
cur->ws_info->hopping_schdule.fixed_channel = neighbor_info->ws_neighbor->fhss_data.uc_timing_info.fixed_channel;
323+
// Learning broadcast network configuration
324+
fhss_configuration.ws_bc_channel_function = neighbor_info->ws_neighbor->fhss_data.bc_timing_info.broadcast_channel_function;
325+
if (fhss_configuration.ws_bc_channel_function == WS_FIXED_CHANNEL) {
326+
cur->ws_info->hopping_schdule.bc_fixed_channel = neighbor_info->ws_neighbor->fhss_data.bc_timing_info.fixed_channel;
320327
}
321-
/* Learning different unicast is not working currently at fhss network follows border router
322-
*/
323-
// Learn broadcast information from selected parent
324328
fhss_configuration.bsi = neighbor_info->ws_neighbor->fhss_data.bc_timing_info.broadcast_schedule_id;
325329
fhss_configuration.fhss_bc_dwell_interval = neighbor_info->ws_neighbor->fhss_data.bc_timing_info.broadcast_dwell_interval;
326330
fhss_configuration.fhss_broadcast_interval = neighbor_info->ws_neighbor->fhss_data.bc_timing_info.broadcast_interval;
331+
fhss_configuration.unicast_fixed_channel = cur->ws_info->hopping_schdule.uc_fixed_channel;
332+
fhss_configuration.broadcast_fixed_channel = cur->ws_info->hopping_schdule.bc_fixed_channel;
327333
ns_fhss_ws_configuration_set(cur->ws_info->fhss_api, &fhss_configuration);
328334

329335
if (fhss_configuration.fhss_bc_dwell_interval && fhss_configuration.fhss_broadcast_interval) {
@@ -1152,7 +1158,7 @@ static void ws_bootstrap_fhss_activate(protocol_interface_info_entry_t *cur)
11521158
tr_debug("MAC init");
11531159
mac_helper_pib_boolean_set(cur, macRxOnWhenIdle, true);
11541160
cur->lowpan_info &= ~INTERFACE_NWK_CONF_MAC_RX_OFF_IDLE;
1155-
ws_bootstrap_mac_activate(cur, cur->ws_info->hopping_schdule.fixed_channel, cur->ws_info->network_pan_id, true);
1161+
ws_bootstrap_mac_activate(cur, cur->ws_info->hopping_schdule.uc_fixed_channel, cur->ws_info->network_pan_id, true);
11561162
return;
11571163
}
11581164

@@ -1555,7 +1561,8 @@ static void ws_bootstrap_event_handler(arm_event_s *event)
15551561
if (cur->bootsrap_mode == ARM_NWK_BOOTSRAP_MODE_6LoWPAN_BORDER_ROUTER) {
15561562
tr_debug("Border router start network");
15571563
// Randomize fixed channel. Only used if channel plan is fixed
1558-
cur->ws_info->hopping_schdule.fixed_channel = randLIB_get_random_in_range(0,cur->ws_info->hopping_schdule.number_of_channels - 1);
1564+
cur->ws_info->hopping_schdule.uc_fixed_channel = randLIB_get_random_in_range(0,cur->ws_info->hopping_schdule.number_of_channels - 1);
1565+
cur->ws_info->hopping_schdule.bc_fixed_channel = randLIB_get_random_in_range(0,cur->ws_info->hopping_schdule.number_of_channels - 1);
15591566
cur->ws_info->network_pan_id = randLIB_get_random_in_range(0,0xfffd);
15601567
cur->ws_info->pan_information.pan_size = 0;
15611568
cur->ws_info->pan_information.pan_version = randLIB_get_random_in_range(0,0xffff);

source/6LoWPAN/ws/ws_common.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ int8_t ws_common_allocate_and_init(protocol_interface_info_entry_t *cur)
155155
cur->ws_info->fhss_bc_interval = WS_FHSS_BC_INTERVAL;
156156
cur->ws_info->fhss_bc_dwell_interval = WS_FHSS_BC_DWELL_INTERVAL;
157157
cur->ws_info->fhss_uc_channel_function = WS_FIXED_CHANNEL;
158+
cur->ws_info->fhss_bc_channel_function = WS_DH1CF;
158159
for (uint8_t n = 0;n < 8;n++) {
159160
cur->ws_info->fhss_channel_mask[n] = 0xffffffff;
160161
}

source/6LoWPAN/ws/ws_common_defines.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ typedef struct ws_hopping_schedule_s {
7373
uint8_t operating_class; /**< PHY operating class default to 1 */
7474
uint8_t operating_mode; /**< PHY operating mode default to "1b" symbol rate 50, modulation index 1 */
7575
uint8_t channel_plan; /**< 0: use regulatory domain values 1: application defined plan */
76-
uint8_t channel_function; /**< 0: Fixed channel, 1:TR51CF, 2: Direct Hash, 3: Vendor defined */
76+
uint8_t uc_channel_function; /**< 0: Fixed channel, 1:TR51CF, 2: Direct Hash, 3: Vendor defined */
77+
uint8_t bc_channel_function; /**< 0: Fixed channel, 1:TR51CF, 2: Direct Hash, 3: Vendor defined */
7778
uint8_t channel_spacing; /**< derived from regulatory domain. 0:200k, 1:400k, 2:600k, 3:100k */
7879
uint8_t number_of_channels; /**< derived from regulatory domain */
7980
uint8_t clock_drift;
8081
uint8_t timing_accurancy;
81-
uint16_t fixed_channel;
82+
uint16_t uc_fixed_channel;
83+
uint16_t bc_fixed_channel;
8284
uint16_t fhss_bsi;
8385
uint32_t fhss_broadcast_interval;
8486
uint32_t channel_mask[8];

source/6LoWPAN/ws/ws_empty_functions.c

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,16 @@ int ws_management_channel_mask_set(
6363
int ws_management_channel_plan_set(
6464
int8_t interface_id,
6565
uint8_t channel_plan,
66-
uint8_t channel_function,
66+
uint8_t uc_channel_function,
67+
uint8_t bc_channel_function,
6768
uint32_t ch0_freq, // Stack can not modify this
6869
uint8_t channel_spacing,// Stack can not modify this
6970
uint8_t number_of_channels)
7071
{
7172
(void)interface_id;
7273
(void)channel_plan;
73-
(void)channel_function;
74+
(void)uc_channel_function;
75+
(void)bc_channel_function;
7476
(void)ch0_freq;
7577
(void)channel_spacing;
7678
(void)number_of_channels;
@@ -90,14 +92,24 @@ int ws_management_fhss_timing_configure(
9092
return -1;
9193
}
9294

93-
int ws_management_fhss_channel_function_configure(
95+
int ws_management_fhss_unicast_channel_function_configure(
96+
int8_t interface_id,
97+
uint8_t channel_function)
98+
{
99+
(void)interface_id;
100+
(void)channel_function;
101+
return -1;
102+
}
103+
104+
int ws_management_fhss_broadcast_channel_function_configure(
94105
int8_t interface_id,
95106
uint8_t channel_function)
96107
{
97108
(void)interface_id;
98109
(void)channel_function;
99110
return -1;
100111
}
112+
101113
/* ### test api ### */
102114
int ws_test_pan_size_set(int8_t interface_id, uint16_t pan_size)
103115
{

source/6LoWPAN/ws/ws_ie_lib.c

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,18 @@ static uint16_t ws_channel_function_length(uint8_t channel_function, uint16_t ho
6969
uint16_t ws_wp_nested_hopping_schedule_length(struct ws_hopping_schedule_s *hopping_schedule, bool unicast_schedule)
7070
{
7171
uint16_t length;
72+
uint8_t channel_function;
7273
if (unicast_schedule) {
7374
length = 4;
75+
channel_function = hopping_schedule->uc_channel_function;
7476
} else {
7577
length = 10;
78+
channel_function = hopping_schedule->bc_channel_function;
7679
}
7780

7881
length += ws_channel_plan_length(hopping_schedule->channel_plan);
79-
length += ws_channel_function_length(hopping_schedule->channel_function, 1);
82+
83+
length += ws_channel_function_length(channel_function, 1);
8084

8185
//Todo Derive some how exluded channel control
8286
return length;
@@ -147,7 +151,11 @@ uint8_t *ws_wp_nested_hopping_schedule_write(uint8_t *ptr,struct ws_hopping_sche
147151
*ptr++ = hopping_schedule->timing_accurancy;
148152
uint8_t channel_info_base = 0;
149153
channel_info_base = (hopping_schedule->channel_plan);
150-
channel_info_base |= (hopping_schedule->channel_function << 3);
154+
if (unicast_schedule) {
155+
channel_info_base |= (hopping_schedule->uc_channel_function << 3);
156+
} else {
157+
channel_info_base |= (hopping_schedule->bc_channel_function << 3);
158+
}
151159
//Todo define excluded channel ctrl
152160

153161
*ptr++ = channel_info_base;
@@ -167,11 +175,18 @@ uint8_t *ws_wp_nested_hopping_schedule_write(uint8_t *ptr,struct ws_hopping_sche
167175
default:
168176
break;
169177
}
170-
171-
switch (hopping_schedule->channel_function) {
178+
uint8_t cf = hopping_schedule->uc_channel_function;
179+
uint16_t fixed_channel = hopping_schedule->uc_fixed_channel;
180+
if (!unicast_schedule) {
181+
cf = hopping_schedule->bc_channel_function;
182+
}
183+
switch (cf) {
172184
case 0:
173185
//Fixed channel inline
174-
ptr = common_write_16_bit_inverse(hopping_schedule->fixed_channel, ptr);
186+
if (!unicast_schedule) {
187+
fixed_channel = hopping_schedule->bc_fixed_channel;
188+
}
189+
ptr = common_write_16_bit_inverse(fixed_channel, ptr);
175190
break;
176191
case 1:
177192
case 2:

source/6LoWPAN/ws/ws_management_api.c

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ int ws_management_channel_mask_set(
106106
int ws_management_channel_plan_set(
107107
int8_t interface_id,
108108
uint8_t channel_plan,
109-
uint8_t channel_function,
109+
uint8_t uc_channel_function,
110+
uint8_t bc_channel_function,
110111
uint32_t ch0_freq, // Stack can not modify this
111112
uint8_t channel_spacing,// Stack can not modify this
112113
uint8_t number_of_channels)
@@ -118,7 +119,8 @@ int ws_management_channel_plan_set(
118119
return -1;
119120
}
120121
cur->ws_info->hopping_schdule.channel_plan = channel_plan;
121-
cur->ws_info->hopping_schdule.channel_function = channel_function;
122+
cur->ws_info->hopping_schdule.uc_channel_function = uc_channel_function;
123+
cur->ws_info->hopping_schdule.bc_channel_function = bc_channel_function;
122124
cur->ws_info->hopping_schdule.ch0_freq = ch0_freq;
123125
cur->ws_info->hopping_schdule.channel_spacing = channel_spacing;
124126
cur->ws_info->hopping_schdule.number_of_channels = number_of_channels;
@@ -159,7 +161,7 @@ int ws_management_fhss_timing_configure(
159161
return 0;
160162
}
161163

162-
int ws_management_fhss_channel_function_configure(
164+
int ws_management_fhss_unicast_channel_function_configure(
163165
int8_t interface_id,
164166
uint8_t channel_function)
165167
{
@@ -184,5 +186,32 @@ int ws_management_fhss_channel_function_configure(
184186
}
185187
return 0;
186188

189+
}
190+
191+
int ws_management_fhss_broadcast_channel_function_configure(
192+
int8_t interface_id,
193+
uint8_t channel_function)
194+
{
195+
protocol_interface_info_entry_t *cur;
196+
197+
cur = protocol_stack_interface_info_get_by_id(interface_id);
198+
if (!cur || !ws_info(cur)) {
199+
return -1;
200+
}
201+
if (channel_function != WS_FIXED_CHANNEL &&
202+
channel_function != WS_VENDOR_DEF_CF &&
203+
channel_function != WS_DH1CF &&
204+
channel_function != WS_TR51CF) {
205+
return -2;
206+
}
207+
cur->ws_info->fhss_bc_channel_function = channel_function;
208+
209+
// if settings change reset_restart for the settings needed
210+
if (cur->lowpan_info & INTERFACE_NWK_ACTIVE) {
211+
// bootstrap active need to restart
212+
ws_bootstrap_restart(interface_id);
213+
}
214+
return 0;
215+
187216
}
188217
#endif // HAVE_WS

source/6LoWPAN/ws/ws_neighbor_class.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ void ws_neighbor_class_neighbor_broadcast_time_info_update(ws_neighbor_class_ent
112112

113113
void ws_neighbor_class_neighbor_broadcast_schedule_set(ws_neighbor_class_entry_t *ws_neighbor, ws_bs_ie_t *ws_bs_ie)
114114
{
115+
ws_neighbor->fhss_data.bc_timing_info.broadcast_channel_function = ws_bs_ie->channel_function;
116+
if (ws_bs_ie->channel_function == WS_FIXED_CHANNEL) {
117+
ws_neighbor->fhss_data.bc_timing_info.fixed_channel = ws_bs_ie->function.zero.fixed_channel;
118+
}
115119
ws_neighbor->fhss_data.bc_timing_info.broadcast_dwell_interval = ws_bs_ie->dwell_interval;
116120
ws_neighbor->fhss_data.bc_timing_info.broadcast_interval = ws_bs_ie->broadcast_interval;
117121
ws_neighbor->fhss_data.bc_timing_info.broadcast_schedule_id = ws_bs_ie->broadcast_schedule_identifier;

0 commit comments

Comments
 (0)