mirror of
https://github.com/espressif/openthread.git
synced 2026-09-14 13:10:08 +00:00
[data-poll-sender] clamp poll period based on child timeout (#8927)
This commit is contained in:
@@ -542,8 +542,10 @@ uint32_t DataPollSender::CalculatePollPeriod(void) const
|
|||||||
|
|
||||||
uint32_t DataPollSender::GetDefaultPollPeriod(void) const
|
uint32_t DataPollSender::GetDefaultPollPeriod(void) const
|
||||||
{
|
{
|
||||||
uint32_t period = Time::SecToMsec(Get<Mle::MleRouter>().GetTimeout());
|
|
||||||
uint32_t pollAhead = static_cast<uint32_t>(kRetxPollPeriod) * kMaxPollRetxAttempts;
|
uint32_t pollAhead = static_cast<uint32_t>(kRetxPollPeriod) * kMaxPollRetxAttempts;
|
||||||
|
uint32_t period;
|
||||||
|
|
||||||
|
period = Time::SecToMsec(Min(Get<Mle::MleRouter>().GetTimeout(), Time::MsecToSec(TimerMilli::kMaxDelay)));
|
||||||
|
|
||||||
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE
|
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE
|
||||||
if (Get<Mac::Mac>().IsCslEnabled())
|
if (Get<Mac::Mac>().IsCslEnabled())
|
||||||
|
|||||||
Reference in New Issue
Block a user