mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 19:27:46 +00:00
[mac] stop timer on pending WaitingForData operation on rx-on-idle change (#3437)
This commit changes `SetRxOnWhenIdle()` to stop the timer (data poll timeout) if there is a pending `kOperationWaitingForData` when rx-on- when-idle is being enabled. This addresses an issue where the timer could remain active if the `SetRxOnwhenIdle(true)` is called before the operation `kOperationWaitingForData` actually starts. Note that the data poll timeout timer gets started while current operation is `kOperationTransmitData` (from `HandleTransmitDone()` on a successful data request frame transmission with a received ack indicating a pending frame).
This commit is contained in:
committed by
Jonathan Hui
parent
eb8c6d90bd
commit
bf48a647b3
@@ -323,7 +323,11 @@ void Mac::SetRxOnWhenIdle(bool aRxOnWhenIdle)
|
||||
|
||||
if (mRxOnWhenIdle)
|
||||
{
|
||||
mPendingWaitingForData = false;
|
||||
if (mPendingWaitingForData)
|
||||
{
|
||||
mTimer.Stop();
|
||||
mPendingWaitingForData = false;
|
||||
}
|
||||
|
||||
if (mOperation == kOperationWaitingForData)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user