diff --git a/examples/platform/efr32/FreeRTOSConfig.h b/examples/platform/efr32/FreeRTOSConfig.h index 2039b30ffbdfe0..3408b5667aa9bc 100644 --- a/examples/platform/efr32/FreeRTOSConfig.h +++ b/examples/platform/efr32/FreeRTOSConfig.h @@ -198,7 +198,7 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #ifndef configTOTAL_HEAP_SIZE #ifdef SL_WIFI -#define configTOTAL_HEAP_SIZE ((size_t)(28 * 1024)) +#define configTOTAL_HEAP_SIZE ((size_t)(30 * 1024)) #else #define configTOTAL_HEAP_SIZE ((size_t)(20 * 1024)) #endif diff --git a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp index 780e86d9014275..146ca68777b4de 100644 --- a/src/platform/EFR32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/EFR32/DiagnosticDataProviderImpl.cpp @@ -254,7 +254,74 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** ifp->offPremiseServicesReachableIPv6.SetNull(); ifp->type = InterfaceType::EMBER_ZCL_INTERFACE_TYPE_THREAD; #else - /* TODO */ + NetworkInterface * head = NULL; + for (Inet::InterfaceIterator interfaceIterator; interfaceIterator.HasCurrent(); interfaceIterator.Next()) + { + interfaceIterator.GetInterfaceName(ifp->Name, Inet::InterfaceId::kMaxIfNameLength); + ifp->name = CharSpan::fromCharString(ifp->Name); + ifp->isOperational = true; + Inet::InterfaceType interfaceType; + if (interfaceIterator.GetInterfaceType(interfaceType) == CHIP_NO_ERROR) + { + switch (interfaceType) + { + case Inet::InterfaceType::Unknown: + ifp->type = EMBER_ZCL_INTERFACE_TYPE_UNSPECIFIED; + break; + case Inet::InterfaceType::WiFi: + ifp->type = EMBER_ZCL_INTERFACE_TYPE_WI_FI; + break; + case Inet::InterfaceType::Ethernet: + ifp->type = EMBER_ZCL_INTERFACE_TYPE_ETHERNET; + break; + case Inet::InterfaceType::Thread: + ifp->type = EMBER_ZCL_INTERFACE_TYPE_THREAD; + break; + case Inet::InterfaceType::Cellular: + ifp->type = EMBER_ZCL_INTERFACE_TYPE_CELLULAR; + break; + } + } + else + { + ChipLogError(DeviceLayer, "Failed to get interface type"); + } + + ifp->offPremiseServicesReachableIPv4.SetNull(); + ifp->offPremiseServicesReachableIPv6.SetNull(); + + uint8_t addressSize; + if (interfaceIterator.GetHardwareAddress(ifp->MacAddress, addressSize, sizeof(ifp->MacAddress)) != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to get network hardware address"); + } + else + { + ifp->hardwareAddress = ByteSpan(ifp->MacAddress, addressSize); + } + + // Assuming IPv6-only support + Inet::InterfaceAddressIterator interfaceAddressIterator; + uint8_t ipv6AddressesCount = 0; + while (interfaceAddressIterator.HasCurrent() && ipv6AddressesCount < kMaxIPv6AddrCount) + { + if (interfaceAddressIterator.GetInterfaceId() == interfaceIterator.GetInterfaceId()) + { + chip::Inet::IPAddress ipv6Address; + if (interfaceAddressIterator.GetAddress(ipv6Address) == CHIP_NO_ERROR) + { + memcpy(ifp->Ipv6AddressesBuffer[ipv6AddressesCount], ipv6Address.Addr, kMaxIPv6AddrSize); + ifp->Ipv6AddressSpans[ipv6AddressesCount] = ByteSpan(ifp->Ipv6AddressesBuffer[ipv6AddressesCount]); + ipv6AddressesCount++; + } + } + interfaceAddressIterator.Next(); + } + + ifp->IPv6Addresses = chip::app::DataModel::List(ifp->Ipv6AddressSpans, ipv6AddressesCount); + head = ifp; + } + *netifpp = head; #endif uint8_t macBuffer[ConfigurationManager::kPrimaryMACAddressLength]; ConfigurationMgr().GetPrimary802154MACAddress(macBuffer); diff --git a/third_party/silabs/matter_support b/third_party/silabs/matter_support index 9696ca85ea8fde..ff9000cd65c5eb 160000 --- a/third_party/silabs/matter_support +++ b/third_party/silabs/matter_support @@ -1 +1 @@ -Subproject commit 9696ca85ea8fde011b7045a97da6d84785014588 +Subproject commit ff9000cd65c5ebc04818e513cb3f803d3536a718