Skip to content

Commit

Permalink
[EFR32] Setting the network interface type to WIFI for wifi devices (p…
Browse files Browse the repository at this point in the history
…roject-chip#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
  • Loading branch information
chirag-silabs authored and isiu-apple committed Sep 16, 2022
1 parent e988cef commit 6b5f5c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/platform/EFR32/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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
Expand Down

0 comments on commit 6b5f5c5

Please sign in to comment.