From b49547ea09e318293686971e298ec85aa05a7d5f Mon Sep 17 00:00:00 2001 From: Thirupathi S <108743108+Thirsrin@users.noreply.github.com> Date: Fri, 12 Apr 2024 19:15:04 +0530 Subject: [PATCH] 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 --- src/platform/Linux/DiagnosticDataProviderImpl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/platform/Linux/DiagnosticDataProviderImpl.cpp b/src/platform/Linux/DiagnosticDataProviderImpl.cpp index 3802d968d72c94..74f7003676c051 100644 --- a/src/platform/Linux/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Linux/DiagnosticDataProviderImpl.cpp @@ -761,9 +761,12 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCou 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()