Skip to content

Commit

Permalink
Merge branch 'release_internal' into release_external
Browse files Browse the repository at this point in the history
* release_internal:
  Iotthd 4495 (ARMmbed#2556)
  RPL Prefix handling update:
  Close Nanostack v12.8.0 ChangeLog (ARMmbed#2549)
  • Loading branch information
Arto Kinnunen committed Jan 22, 2021
2 parents f8ae0e9 + 3999b6e commit 91f3ff6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
6 changes: 6 additions & 0 deletions source/RPL/rpl_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
#include "RPL/rpl_downward.h"
#include "RPL/rpl_policy.h"
#include "RPL/rpl_control.h"
#include "6LoWPAN/ws/ws_common.h"

#define TRACE_GROUP "rplc"

Expand Down Expand Up @@ -886,6 +887,11 @@ static void rpl_control_process_prefix_options(protocol_interface_info_entry_t *
uint32_t preferred = common_read_32_bit(ptr + 8);
const uint8_t *prefix = ptr + 16;

if (ws_info(cur)) {
//For Wi-SUN Interoperability force length to 64
prefix_len = 64;
}

if (rpl_upward_accept_prefix_update(dodag, neighbour, pref_parent)) {

/* Store prefixes for possible forwarding */
Expand Down
7 changes: 6 additions & 1 deletion source/Service_Libs/fhss/fhss_ws.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,13 @@ static void fhss_broadcast_handler(const fhss_api_t *fhss_api, uint16_t delay)
if (!fhss_structure) {
return;
}

platform_enter_critical();
if (fhss_structure->ws->fhss_configuration.fhss_bc_dwell_interval == 0 || fhss_structure->ws->fhss_configuration.fhss_broadcast_interval == 0) {
// stop broadcast schedule
fhss_structure->ws->is_on_bc_channel = false;
fhss_structure->ws->synchronization_time = 0;
fhss_structure->ws->broadcast_timer_running = false;
platform_exit_critical();
return;
}

Expand Down Expand Up @@ -409,6 +410,7 @@ static void fhss_broadcast_handler(const fhss_api_t *fhss_api, uint16_t delay)
tr_info("%u BC_done", fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api));
}
#endif
platform_exit_critical();
}

static int own_floor(float value)
Expand Down Expand Up @@ -955,6 +957,7 @@ static void fhss_unicast_handler(const fhss_api_t *fhss_api, uint16_t delay)
if (!fhss_structure) {
return;
}
platform_enter_critical();
int32_t delay_us = fhss_structure->callbacks.read_timestamp(fhss_structure->fhss_api) - fhss_structure->ws->next_uc_timeout;
if (!fhss_structure->ws->uc_slot && !fhss_structure->ws->next_uc_timeout) {
delay_us = 0;
Expand All @@ -974,6 +977,7 @@ static void fhss_unicast_handler(const fhss_api_t *fhss_api, uint16_t delay)
if (!timeout) {
fhss_stop_timer(fhss_structure, fhss_unicast_handler);
fhss_structure->ws->unicast_timer_running = false;
platform_exit_critical();
return;
}
fhss_ws_start_timer(fhss_structure, timeout - (delay_us * fhss_structure->platform_functions.fhss_resolution_divider), fhss_unicast_handler);
Expand All @@ -985,6 +989,7 @@ static void fhss_unicast_handler(const fhss_api_t *fhss_api, uint16_t delay)
fhss_structure->callbacks.tx_poll(fhss_structure->fhss_api);
}
}
platform_exit_critical();
}

int fhss_ws_set_callbacks(fhss_structure_t *fhss_structure)
Expand Down

0 comments on commit 91f3ff6

Please sign in to comment.