[low-power] frame pending bit handling for enh-ack in simulation (#5853)

MAC command frame has its command ID encrypted in frame version
802.15.4-2015. Radio driver cannot decrypt this frame payload without
extended address. So the frame pending bit is not correctly set in the
ACK in response to data request command with version 2015. This commit
adds a special handling for frame version 2015 and only checks the
frame type when deciding if it needs to set the frame pending bit.
This commit is contained in:
Jintao Lin
2020-11-24 17:37:21 -08:00
committed by GitHub
parent 6918698345
commit b6e2c2c970
4 changed files with 23 additions and 3 deletions
+5
View File
@@ -76,6 +76,11 @@ bool otMacFrameIsData(const otRadioFrame *aFrame)
return static_cast<const Mac::Frame *>(aFrame)->GetType() == Mac::Frame::kFcfFrameData;
}
bool otMacFrameIsCommand(const otRadioFrame *aFrame)
{
return static_cast<const Mac::Frame *>(aFrame)->GetType() == Mac::Frame::kFcfFrameMacCmd;
}
bool otMacFrameIsDataRequest(const otRadioFrame *aFrame)
{
return static_cast<const Mac::Frame *>(aFrame)->IsDataRequestCommand();