Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nrf fromtree] net: Added configuring child timeouts on openthread start #2448

Merged
merged 1 commit into from
Jan 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions subsys/net/l2/openthread/openthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ LOG_MODULE_REGISTER(net_l2_openthread, CONFIG_OPENTHREAD_L2_LOG_LEVEL);
#include <zephyr/sys/__assert.h>
#include <zephyr/version.h>

#include <openthread/child_supervision.h>
#include <openthread/cli.h>
#include <openthread/ip6.h>
#include <openthread/link.h>
Expand Down Expand Up @@ -442,6 +443,13 @@ int openthread_start(struct openthread_context *ot_context)
otLinkSetPollPeriod(ot_context->instance, OT_POLL_PERIOD);
}

/* Configure Child Supervision and MLE Child timeouts. */
otChildSupervisionSetInterval(ot_context->instance,
CONFIG_OPENTHREAD_CHILD_SUPERVISION_INTERVAL);
otChildSupervisionSetCheckTimeout(ot_context->instance,
CONFIG_OPENTHREAD_CHILD_SUPERVISION_CHECK_TIMEOUT);
otThreadSetChildTimeout(ot_context->instance, CONFIG_OPENTHREAD_MLE_CHILD_TIMEOUT);

if (otDatasetIsCommissioned(ot_instance)) {
/* OpenThread already has dataset stored - skip the
* configuration.
Expand Down
Loading