Skip to content

Commit

Permalink
openthread: fix frame counter when re-transmition
Browse files Browse the repository at this point in the history
  • Loading branch information
zwx1995esp committed May 19, 2023
1 parent 0501f87 commit 5792573
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/openthread/port/esp_openthread_radio.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
aFrame->mPsdu[-1] = aFrame->mLength; // lenth locates one byte before the psdu (esp_openthread_radio_tx_psdu);

if (otMacFrameIsSecurityEnabled(aFrame) && !aFrame->mInfo.mTxInfo.mIsSecurityProcessed) {
otMacFrameSetFrameCounter(aFrame, s_mac_frame_counter++);
if (!s_transmit_frame.mInfo.mTxInfo.mIsARetx) {
otMacFrameSetFrameCounter(aFrame, s_mac_frame_counter++);
}
if (otMacFrameIsKeyIdMode1(aFrame)) {
s_transmit_frame.mInfo.mTxInfo.mAesKey = &s_current_key;
if (!s_transmit_frame.mInfo.mTxInfo.mIsARetx) {
Expand Down

0 comments on commit 5792573

Please sign in to comment.