From e092a1785a93109875b276eafa064008947f1bac Mon Sep 17 00:00:00 2001 From: Lorenzo Rai Date: Mon, 12 Feb 2024 18:25:34 +0100 Subject: [PATCH] [csl] reset data poll timer after successful csl transmission (#9840) Currently the the data poll timer is used to maintain synchronization with the parent. It sends a data poll once per csl timeout. However often this is not necessary as other packets that are sent cause synchronization to be maintained. This commit resets the data poll timer each time a frame containing the csl ie is successfully transmitted. --- src/core/mac/mac.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index 04e235cc5..243db1d8a 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -1310,6 +1310,12 @@ void Mac::HandleTransmitDone(TxFrame &aFrame, RxFrame *aAckFrame, Error aError) #endif #if OPENTHREAD_FTD && OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE ProcessCsl(*aAckFrame, dstAddr); +#endif +#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE + if (!GetRxOnWhenIdle() && aFrame.GetHeaderIe(CslIe::kHeaderIeId) != nullptr) + { + Get().ResetKeepAliveTimer(); + } #endif } }