From 2060039bbfec52ac00f22a7cc3213c2ab1df138e Mon Sep 17 00:00:00 2001 From: sarveshkumarv3 <86755931+sarveshkumarv3@users.noreply.github.com> Date: Thu, 16 Feb 2023 09:49:14 -0800 Subject: [PATCH] [csl] fix indirect retransmission of frame previously transmitted via CSL (#8770) Bug fix for an issue where any frame which fails CSL transmission gets treated as a new frame (instead of a retransmission) for a subsequent indirect retransmission (in the data poll handler). This fix checks for the previous CSL transmit attempts and if it is greater than 0, retransmits with the same frame counter, sequence number and key id as previous attempt. --- src/core/mac/data_poll_handler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/mac/data_poll_handler.cpp b/src/core/mac/data_poll_handler.cpp index d918d4076..b50331803 100644 --- a/src/core/mac/data_poll_handler.cpp +++ b/src/core/mac/data_poll_handler.cpp @@ -188,7 +188,11 @@ Mac::TxFrame *DataPollHandler::HandleFrameRequest(Mac::TxFrames &aTxFrames) VerifyOrExit(mCallbacks.PrepareFrameForChild(*frame, mFrameContext, *mIndirectTxChild) == kErrorNone, frame = nullptr); +#if OPENTHREAD_CONFIG_MAC_CSL_TRANSMITTER_ENABLE + if ((mIndirectTxChild->GetIndirectTxAttempts() > 0) || (mIndirectTxChild->GetCslTxAttempts() > 0)) +#else if (mIndirectTxChild->GetIndirectTxAttempts() > 0) +#endif { // For a re-transmission of an indirect frame to a sleepy // child, we ensure to use the same frame counter, key id, and