DGWIFI_2_1 Beacon Rx count for linux platform (#32963)
* added condition for beacon Rx count in DiagnosticDataProviderImpl
* Restyled by clang-format
---------
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/src/platform/Linux/DiagnosticDataProviderImpl.cpp b/src/platform/Linux/DiagnosticDataProviderImpl.cpp
index 3802d96..74f7003 100644
--- a/src/platform/Linux/DiagnosticDataProviderImpl.cpp
+++ b/src/platform/Linux/DiagnosticDataProviderImpl.cpp
@@ -761,9 +761,12 @@
CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconRxCount(uint32_t & beaconRxCount)
{
- beaconRxCount = mBeaconRxCount;
-
- return CHIP_NO_ERROR;
+ if (DeviceLayer::ConnectivityMgrImpl().IsWiFiManagementStarted())
+ {
+ beaconRxCount = mBeaconRxCount;
+ return CHIP_NO_ERROR;
+ }
+ return CHIP_ERROR_NOT_IMPLEMENTED;
}
CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts()