From 1379dc1d40936e27952c1c370abb5cca8c60df61 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Wed, 24 Aug 2022 11:37:13 -0700 Subject: [PATCH] [EFR32] Setting the network interface type to WIFI for wifi devices (#22041) (#22091) * 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 Co-authored-by: chirag-silabs <100861685+chirag-silabs@users.noreply.github.com> Co-authored-by: Andrei Litvin --- 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