mirror of
https://github.com/espressif/openthread.git
synced 2026-08-22 18:39:50 +00:00
[mac] use Mac::ResetCounters() (#4315)
This commit is contained in:
committed by
Jonathan Hui
parent
8297dd6634
commit
b5846532fe
@@ -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();
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user