[dua] avoid unnecessary time ticker processing (#8872)

If there is no DUA request sent/scheduled, then there is no need to
trigger the periodic one second ticker timer.

This helps SEDs to be more power efficient and to avoid unnecessary
wakeups.

Signed-off-by: Doru Gucea <[email protected]>
This commit is contained in:
doru91
2023-03-21 17:28:42 -07:00
committed by GitHub
parent da66f629c0
commit c7925dd1df
+6 -1
View File
@@ -345,7 +345,12 @@ void DuaManager::HandleBackboneRouterPrimaryUpdate(BackboneRouter::Leader::State
if (aState == BackboneRouter::Leader::kStateAdded || aState == BackboneRouter::Leader::kStateToTriggerRereg)
{
UpdateReregistrationDelay();
#if OPENTHREAD_CONFIG_DUA_ENABLE
if (Get<Mle::Mle>().IsFullThreadDevice() || Get<Mle::Mle>().GetParent().IsThreadVersion1p1())
#endif
{
UpdateReregistrationDelay();
}
}
}