From c16abe00e637713370040102118944a84bdf0636 Mon Sep 17 00:00:00 2001 From: Eduardo Montoya Date: Thu, 10 Mar 2022 23:00:33 +0100 Subject: [PATCH] [csl] adjust polling closer to the CSL Timeout end (#7463) Thread Certification Harness makes use of CSL Timeout configurations as low as 10 seconds, with the expectation that the SSED will try to autosync very near to the end of the CSL Timeout. However, the default configuration is to send a Data Request 4 secs before, which makes several certification tests to fail due to unexpected polling. This commit sets the default `pollAhead` to 1 second, aligning better with the certification testing expectations. For the on field deployments it shouldn't be an issue that the Data Request does not reach the parent exactly before the CSL Timeout expiration since it will resynchronize anyway once one of the retransmissions reaches the parent. --- src/core/mac/data_poll_sender.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/mac/data_poll_sender.cpp b/src/core/mac/data_poll_sender.cpp index 6af166d12..ab1ad0db6 100644 --- a/src/core/mac/data_poll_sender.cpp +++ b/src/core/mac/data_poll_sender.cpp @@ -550,7 +550,8 @@ uint32_t DataPollSender::GetDefaultPollPeriod(void) const #if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE && OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE if (Get().IsCslEnabled()) { - period = OT_MIN(period, Time::SecToMsec(Get().GetCslTimeout())); + period = OT_MIN(period, Time::SecToMsec(Get().GetCslTimeout())); + pollAhead = static_cast(kRetxPollPeriod); } #endif