Skip to content

Commit

Permalink
WS bootstrap: renamed channel_function to uc_channel_function
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarkko Paso committed Sep 5, 2018
1 parent 7dbad5e commit bbc0d77
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions source/6LoWPAN/ws/ws_bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ static int8_t ws_fhss_initialize(protocol_interface_info_entry_t *cur)
}

fhss_configuration.fhss_uc_dwell_interval = cur->ws_info->fhss_uc_dwell_interval;
fhss_configuration.ws_uc_channel_function = cur->ws_info->fhss_channel_function;
fhss_configuration.ws_uc_channel_function = cur->ws_info->fhss_uc_channel_function;
fhss_configuration.fhss_bc_dwell_interval = cur->ws_info->fhss_bc_dwell_interval;
fhss_configuration.fhss_broadcast_interval = cur->ws_info->fhss_bc_interval;

Expand All @@ -223,7 +223,7 @@ static int8_t ws_fhss_initialize(protocol_interface_info_entry_t *cur)
return 0;
}
memcpy(cur->ws_info->fhss_channel_mask, fhss_configuration->channel_mask, sizeof(uint32_t) * 8);
cur->ws_info->fhss_channel_function = fhss_configuration->ws_uc_channel_function;
cur->ws_info->fhss_uc_channel_function = fhss_configuration->ws_uc_channel_function;
cur->ws_info->fhss_bc_dwell_interval = fhss_configuration->fhss_bc_dwell_interval;
cur->ws_info->fhss_bc_interval = fhss_configuration->fhss_broadcast_interval;
cur->ws_info->fhss_uc_dwell_interval = fhss_configuration->fhss_uc_dwell_interval;
Expand All @@ -233,7 +233,7 @@ static int8_t ws_fhss_initialize(protocol_interface_info_entry_t *cur)
static int8_t ws_fhss_set_defaults(protocol_interface_info_entry_t *cur, fhss_ws_configuration_t *fhss_configuration)
{
fhss_configuration->fhss_uc_dwell_interval = cur->ws_info->fhss_uc_dwell_interval;
fhss_configuration->ws_uc_channel_function = cur->ws_info->fhss_channel_function;
fhss_configuration->ws_uc_channel_function = cur->ws_info->fhss_uc_channel_function;
// TODO: Just temporarily using hard coded broadcast channel function
fhss_configuration->ws_bc_channel_function = WS_DH1CF;
fhss_configuration->fhss_bc_dwell_interval = cur->ws_info->fhss_bc_dwell_interval;
Expand Down
2 changes: 1 addition & 1 deletion source/6LoWPAN/ws/ws_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ int8_t ws_common_allocate_and_init(protocol_interface_info_entry_t *cur)
cur->ws_info->fhss_uc_dwell_interval = WS_FHSS_UC_DWELL_INTERVAL;
cur->ws_info->fhss_bc_interval = WS_FHSS_BC_INTERVAL;
cur->ws_info->fhss_bc_dwell_interval = WS_FHSS_BC_DWELL_INTERVAL;
cur->ws_info->fhss_channel_function = WS_FIXED_CHANNEL;
cur->ws_info->fhss_uc_channel_function = WS_FIXED_CHANNEL;
for (uint8_t n = 0;n < 8;n++) {
cur->ws_info->fhss_channel_mask[n] = 0xffffffff;
}
Expand Down
3 changes: 2 additions & 1 deletion source/6LoWPAN/ws/ws_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ typedef struct ws_info_s {
uint8_t fhss_uc_dwell_interval;
uint8_t fhss_bc_dwell_interval;
uint32_t fhss_bc_interval;
uint8_t fhss_channel_function;
uint8_t fhss_uc_channel_function;
uint8_t fhss_bc_channel_function;
uint32_t fhss_channel_mask[8];

struct ws_pan_information_s pan_information;
Expand Down
2 changes: 1 addition & 1 deletion source/6LoWPAN/ws/ws_management_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int ws_management_fhss_channel_function_configure(
channel_function != WS_TR51CF) {
return -2;
}
cur->ws_info->fhss_channel_function = channel_function;
cur->ws_info->fhss_uc_channel_function = channel_function;

// if settings change reset_restart for the settings needed
if (cur->lowpan_info & INTERFACE_NWK_ACTIVE) {
Expand Down

0 comments on commit bbc0d77

Please sign in to comment.