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()