mirror of
https://github.com/espressif/openthread.git
synced 2026-10-21 06:58:21 +00:00
Moved the cca error counter so that it will count even when using radio csma rather then OT csma (#1566)
This commit is contained in:
@@ -858,6 +858,11 @@ void Mac::TransmitDoneTask(RadioPacket *aPacket, bool aRxPending, ThreadError aE
|
||||
mCounters.mTxErrAbort++;
|
||||
}
|
||||
|
||||
if (aError == kThreadError_ChannelAccessFailure)
|
||||
{
|
||||
mCounters.mTxErrCca++;
|
||||
}
|
||||
|
||||
if (!RadioSupportsCsmaBackoff() &&
|
||||
aError == kThreadError_ChannelAccessFailure &&
|
||||
mCsmaAttempts < kMaxCSMABackoffs)
|
||||
@@ -865,8 +870,6 @@ void Mac::TransmitDoneTask(RadioPacket *aPacket, bool aRxPending, ThreadError aE
|
||||
mCsmaAttempts++;
|
||||
StartCsmaBackoff();
|
||||
|
||||
mCounters.mTxErrCca++;
|
||||
|
||||
ExitNow();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user