From d6a840f9c76684fc96b200568b05a1513199109a Mon Sep 17 00:00:00 2001 From: chirag-silabs <100861685+chirag-silabs@users.noreply.github.com> Date: Tue, 23 Aug 2022 09:14:02 +0530 Subject: [PATCH] [EFR32] Setting the network interface type to WIFI for wifi devices (#22041) * EFR32 wifi setting the network interface type to WIFI * Changes as per the suggestions * Changing the if condition * Correcting the code by adding ; for the build to be succeed --- src/platform/EFR32/DiagnosticDataProviderImpl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp index a6d4833b65fe4b..31858125a0665b 100644 --- a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp @@ -264,7 +264,8 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** ifp->name = CharSpan::fromCharString(ifp->Name); ifp->isOperational = true; Inet::InterfaceType interfaceType; - if (interfaceIterator.GetInterfaceType(interfaceType) == CHIP_NO_ERROR) + CHIP_ERROR err = interfaceIterator.GetInterfaceType(interfaceType); + if (err == CHIP_NO_ERROR || err == CHIP_ERROR_NOT_IMPLEMENTED) { switch (interfaceType) { @@ -283,6 +284,9 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** case Inet::InterfaceType::Cellular: ifp->type = EMBER_ZCL_INTERFACE_TYPE_CELLULAR; break; + default: + ifp->type = EMBER_ZCL_INTERFACE_TYPE_WI_FI; + break; } } else