mirror of
https://github.com/espressif/openthread.git
synced 2026-08-10 12:47:47 +00:00
[mac] simplify the check for frame pending in data request ack (#3438)
This commit is contained in:
committed by
Jonathan Hui
parent
b6065c0fc1
commit
a2a9d6502e
@@ -1170,14 +1170,8 @@ void Mac::HandleTransmitDone(Frame &aFrame, Frame *aAckFrame, otError aError)
|
||||
case kOperationTransmitData:
|
||||
if (aFrame.IsDataRequestCommand())
|
||||
{
|
||||
bool framePending = false;
|
||||
|
||||
if ((aError == OT_ERROR_NONE) && aFrame.GetAckRequest() && (aAckFrame != NULL))
|
||||
{
|
||||
framePending = aAckFrame->GetFramePending();
|
||||
}
|
||||
|
||||
if (mEnabled && framePending)
|
||||
if (mEnabled && (aError == OT_ERROR_NONE) && aFrame.GetAckRequest() && (aAckFrame != NULL) &&
|
||||
aAckFrame->GetFramePending())
|
||||
{
|
||||
mTimer.Start(kDataPollTimeout);
|
||||
StartOperation(kOperationWaitingForData);
|
||||
|
||||
Reference in New Issue
Block a user