[sub-mac] check `IsHeaderUpdated() before signaling counter (#7029)

This commit adds a check in `SignalFrameCounterUsedOnTxDone()` to
ensure that radio platform did indeed update the header (i.e.,
assigned a frame counter) before reading the counter value from the
frame and signaling its use.
This commit is contained in:
Abtin Keshavarzian
2021-09-26 21:51:20 -07:00
committed by Jonathan Hui
parent 645dec173a
commit 47efcc6745
+1 -1
View File
@@ -579,7 +579,7 @@ void SubMac::SignalFrameCounterUsedOnTxDone(const TxFrame &aFrame)
OT_UNUSED_VARIABLE(allowError);
VerifyOrExit(!ShouldHandleTransmitSecurity() && aFrame.GetSecurityEnabled());
VerifyOrExit(!ShouldHandleTransmitSecurity() && aFrame.GetSecurityEnabled() && aFrame.IsHeaderUpdated());
// In an FTD/MTD build, if/when link-raw is enabled, the `TxFrame`
// is prepared and given by user and may not necessarily follow 15.4