[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
+14 -2
View File
@@ -139,9 +139,21 @@ exit:
return error;
}
uint8_t otMacFrameGetSequence(const otRadioFrame *aFrame)
otError otMacFrameGetSequence(const otRadioFrame *aFrame, uint8_t *aSequence)
{
return static_cast<const Mac::Frame *>(aFrame)->GetSequence();
otError error;
if (static_cast<const Mac::Frame *>(aFrame)->IsSequencePresent())
{
*aSequence = static_cast<const Mac::Frame *>(aFrame)->GetSequence();
error = kErrorNone;
}
else
{
error = kErrorParse;
}
return error;
}
void otMacFrameProcessTransmitAesCcm(otRadioFrame *aFrame, const otExtAddress *aExtAddress)