[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.
This commit is contained in:
sarveshkumarv3
2023-02-16 09:49:14 -08:00
committed by GitHub
parent a0ff14c475
commit 2060039bbf
+4
View File
@@ -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