mirror of
https://github.com/espressif/openthread.git
synced 2026-10-06 07:47:41 +00:00
[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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user