diff --git a/nanostack/ws_management_api.h b/nanostack/ws_management_api.h index a5feb7628743..300f2cab2c7b 100644 --- a/nanostack/ws_management_api.h +++ b/nanostack/ws_management_api.h @@ -382,6 +382,8 @@ int ws_management_channel_plan_set( * * Change the default configuration for Wi-SUN FHSS operation. * + * Calling with fhss_uc_dwell_interval = 0, fhss_broadcast_interval = 0xffffffff, + * fhss_bc_dwell_interval = 0 restores stack defaults * * \param interface_id Network interface ID. * \param fhss_uc_dwell_interval default to 250 ms. @@ -403,6 +405,7 @@ int ws_management_fhss_timing_configure( * Change the default configuration for Wi-SUN FHSS operation. * if application defined is used the behaviour is undefined * + * Calling with dwell_interval = 0, channel_function = 0xff, fixed_channel = 0xffff restores stack defaults * * \param interface_id Network interface ID. * \param channel_function Unicast channel function. @@ -458,6 +461,8 @@ int ws_management_fhss_unicast_channel_function_validate( * Change the default configuration for Wi-SUN FHSS operation. * if application defined is used the behaviour is undefined * + * Calling with dwell_interval = 0, channel_function = 0xff, + * broadcast_interval = 0xffffffff, fixed_channel = 0xffff restores stack defaults * * \param interface_id Network interface ID. * \param channel_function Broadcast channel function. diff --git a/source/6LoWPAN/ws/ws_cfg_settings.c b/source/6LoWPAN/ws/ws_cfg_settings.c index 1898b426d88f..3c536fe254bc 100644 --- a/source/6LoWPAN/ws/ws_cfg_settings.c +++ b/source/6LoWPAN/ws/ws_cfg_settings.c @@ -942,7 +942,7 @@ int8_t ws_cfg_fhss_validate(ws_fhss_cfg_t *cfg, ws_fhss_cfg_t *new_cfg) return CFG_SETTINGS_ERROR_FHSS_CONF; } - if (new_cfg->fhss_bc_dwell_interval < 15) { + if (new_cfg->fhss_bc_dwell_interval < 100) { return CFG_SETTINGS_ERROR_FHSS_CONF; } diff --git a/source/6LoWPAN/ws/ws_management_api.c b/source/6LoWPAN/ws/ws_management_api.c index f808becca24f..10fcebf54928 100644 --- a/source/6LoWPAN/ws/ws_management_api.c +++ b/source/6LoWPAN/ws/ws_management_api.c @@ -461,9 +461,9 @@ int ws_management_fhss_timing_configure( return -2; } - if (fhss_uc_dwell_interval == 0xff) { + if (fhss_uc_dwell_interval == 0) { cfg.fhss_uc_dwell_interval = cfg_default.fhss_uc_dwell_interval; - } else if (fhss_uc_dwell_interval > 0) { + } else { cfg.fhss_uc_dwell_interval = fhss_uc_dwell_interval; } @@ -473,9 +473,9 @@ int ws_management_fhss_timing_configure( cfg.fhss_bc_interval = fhss_broadcast_interval; } - if (fhss_bc_dwell_interval == 0xff) { + if (fhss_bc_dwell_interval == 0) { cfg.fhss_bc_dwell_interval = cfg_default.fhss_bc_dwell_interval; - } else if (fhss_bc_dwell_interval > 0) { + } else { cfg.fhss_bc_dwell_interval = fhss_bc_dwell_interval; } @@ -509,9 +509,9 @@ int ws_management_fhss_unicast_channel_function_configure( return -2; } - if (dwell_interval == 0xff) { + if (dwell_interval == 0) { cfg.fhss_uc_dwell_interval = cfg_default.fhss_uc_dwell_interval; - } else if (dwell_interval > 0) { + } else { cfg.fhss_uc_dwell_interval = dwell_interval; } if (channel_function < 0xff) { @@ -611,9 +611,9 @@ int ws_management_fhss_broadcast_channel_function_configure( return -2; } - if (dwell_interval == 0xff) { + if (dwell_interval == 0) { cfg.fhss_bc_dwell_interval = cfg_default.fhss_bc_dwell_interval; - } else if (dwell_interval > 0) { + } else { cfg.fhss_bc_dwell_interval = dwell_interval; }