mirror of
https://github.com/espressif/openthread.git
synced 2026-09-01 06:49:54 +00:00
[low-power] remove extra csl tx after buffered message sent by indirect tx (#5497)
Consider such a case: - The CSL transmitter has a buffered message for a CSL receiver and has scheduled that tx. - Before the CSL transmitter actually sends it, the receiver sends a data request. - The CSL transmitter immediately sends the buffered message to the receiver. - The scheduled time comes. In current CSL implementation, though the buffered message has been sent through indirect tx, when the origin CSL tx time comes, it would send another 'empty frame' due to the missing of check and the implementation of IndirectSender::PrepareFrameForChild. This commit adds the check for this case and avoid to send the meaningless empty frame.
This commit is contained in:
@@ -167,6 +167,7 @@ otError CslTxScheduler::HandleFrameRequest(Mac::TxFrame &aFrame)
|
||||
|
||||
SuccessOrExit(error = mCallbacks.PrepareFrameForChild(aFrame, mFrameContext, *mCslTxChild));
|
||||
mCslTxMessage = mCslTxChild->GetIndirectMessage();
|
||||
VerifyOrExit(mCslTxMessage != nullptr, error = OT_ERROR_ABORT);
|
||||
|
||||
if (mCslTxChild->GetIndirectTxAttempts() > 0 || mCslTxChild->GetCslTxAttempts() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user