From 25d90c7f924d911601e2a267fa53b71a7da8d710 Mon Sep 17 00:00:00 2001 From: Jing Ma Date: Thu, 21 May 2020 10:37:05 +0800 Subject: [PATCH] [mac] count out-of-band Tx frames (#4936) --- include/openthread/link.h | 2 +- src/core/mac/mac.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/openthread/link.h b/include/openthread/link.h index ded1a1e21..f091126be 100644 --- a/include/openthread/link.h +++ b/include/openthread/link.h @@ -191,7 +191,7 @@ typedef struct otMacCounters /** * The total number of unique other MAC frame transmission requests. * - * This counter is currently unused. + * This counter is currently used for counting out-of-band frames. * */ uint32_t mTxOther; diff --git a/src/core/mac/mac.cpp b/src/core/mac/mac.cpp index b10cb564b..d65bc80f9 100644 --- a/src/core/mac/mac.cpp +++ b/src/core/mac/mac.cpp @@ -1369,6 +1369,8 @@ void Mac::HandleTransmitDone(TxFrame &aFrame, RxFrame *aAckFrame, otError aError #endif case kOperationTransmitOutOfBandFrame: + // count Oob frames + mCounters.mTxOther++; FinishOperation(); PerformNextOperation(); break;