[mac] use Mac::ResetCounters() (#4315)

This commit is contained in:
Abtin Keshavarzian
2019-12-04 12:42:33 -08:00
committed by Jonathan Hui
parent 8297dd6634
commit b5846532fe
2 changed files with 2 additions and 7 deletions
+1 -6
View File
@@ -121,7 +121,7 @@ Mac::Mac(Instance &aInstance)
randomExtAddress.GenerateRandom();
mCcaSuccessRateTracker.Reset();
memset(&mCounters, 0, sizeof(otMacCounters));
ResetCounters();
mExtendedPanId.Clear();
mSubMac.Enable();
@@ -1814,11 +1814,6 @@ void Mac::SetPromiscuous(bool aPromiscuous)
UpdateIdleMode();
}
void Mac::ResetCounters(void)
{
memset(&mCounters, 0, sizeof(mCounters));
}
int8_t Mac::GetNoiseFloor(void)
{
return Get<Radio>().GetReceiveSensitivity();
+1 -1
View File
@@ -567,7 +567,7 @@ public:
* This method resets mac counters
*
*/
void ResetCounters(void);
void ResetCounters(void) { memset(&mCounters, 0, sizeof(mCounters)); }
/**
* This method returns the MAC counter.