[mac] support frames without sequence number (#10544)

This commit adds the capability to support frames without sequence
number.
This commit is contained in:
Yakun Xu
2024-08-02 09:50:45 -07:00
committed by GitHub
parent 03113e8502
commit e219fe92f1
7 changed files with 155 additions and 41 deletions
+5 -1
View File
@@ -606,7 +606,11 @@ static void radioReceive(otInstance *aInstance)
{
if (otMacFrameIsAckRequested(&sTransmitFrame))
{
isTxDone = isAck && otMacFrameGetSequence(&sReceiveFrame) == otMacFrameGetSequence(&sTransmitFrame);
uint8_t rxSeq;
uint8_t txSeq;
isTxDone = isAck && otMacFrameGetSequence(&sReceiveFrame, &rxSeq) == OT_ERROR_NONE &&
otMacFrameGetSequence(&sTransmitFrame, &txSeq) == OT_ERROR_NONE && rxSeq == txSeq;
}
#if OPENTHREAD_SIMULATION_VIRTUAL_TIME
// Simulate tx done when receiving the echo frame.