diff --git a/src/core/mac/data_poll_handler.cpp b/src/core/mac/data_poll_handler.cpp index 55d4c4316..dc9d9885b 100644 --- a/src/core/mac/data_poll_handler.cpp +++ b/src/core/mac/data_poll_handler.cpp @@ -236,6 +236,9 @@ void DataPollHandler::HandleSentFrame(const Mac::TxFrame &aFrame, otError aError case OT_ERROR_NO_ACK: aChild.IncrementIndirectTxAttempts(); + otLogInfoMac("Indirect tx to child %04x failed, attempt %d/%d", aChild.GetRloc16(), + aChild.GetIndirectTxAttempts(), kMaxPollTriggeredTxAttempts); + // Fall through case OT_ERROR_CHANNEL_ACCESS_FAILURE: @@ -249,9 +252,6 @@ void DataPollHandler::HandleSentFrame(const Mac::TxFrame &aFrame, otError aError ExitNow(); } - otLogInfoMac("Indirect tx to child %04x failed, attempt %d/%d, error:%s", aChild.GetRloc16(), - aChild.GetIndirectTxAttempts(), kMaxPollTriggeredTxAttempts, otThreadErrorToString(aError)); - if (aChild.GetIndirectTxAttempts() < kMaxPollTriggeredTxAttempts) { // We save the frame counter, key id, and data sequence number of