Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add interface IPv6 addresses and up fabrics for SVE#2 #22644

Merged
merged 2 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/all-clusters-app/cc13x2x7_26x2x7/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <ti/drivers/SHA2.h>

#include <bget.h>
#define TOTAL_ICALL_HEAP_SIZE (58000)
#define TOTAL_ICALL_HEAP_SIZE (0xc800)

using namespace ::chip;
using namespace ::chip::Inet;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <ti/drivers/SHA2.h>

#include <bget.h>
#define TOTAL_ICALL_HEAP_SIZE (58000)
#define TOTAL_ICALL_HEAP_SIZE (0xc800)

using namespace ::chip;
using namespace ::chip::Inet;
Expand Down
4 changes: 2 additions & 2 deletions src/platform/cc13x2_26x2/CHIPPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@

// Limit the number of device admins to ensure enough ressources for handling them
#ifndef CHIP_CONFIG_MAX_FABRICS
#define CHIP_CONFIG_MAX_FABRICS 3 // Don't reserve one for rotation slack due to limited resources
#endif // CHIP_CONFIG_MAX_FABRICS
#define CHIP_CONFIG_MAX_FABRICS 5
#endif
14 changes: 14 additions & 0 deletions src/platform/cc13x2_26x2/DiagnosticDataProviderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,20 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface **
ThreadStackMgrImpl().GetExtAddress(extAddr);
ifp->hardwareAddress = ByteSpan(extAddr.m8, OT_EXT_ADDRESS_SIZE);

/* Thread only support IPv6 */
uint8_t ipv6AddressesCount = 0;
for (Inet::InterfaceAddressIterator iterator; iterator.Next() && ipv6AddressesCount < kMaxIPv6AddrCount;)
{
chip::Inet::IPAddress ipv6Address;
if (iterator.GetAddress(ipv6Address) == CHIP_NO_ERROR)
{
memcpy(ifp->Ipv6AddressesBuffer[ipv6AddressesCount], ipv6Address.Addr, kMaxIPv6AddrSize);
ifp->Ipv6AddressSpans[ipv6AddressesCount] = ByteSpan(ifp->Ipv6AddressesBuffer[ipv6AddressesCount]);
ipv6AddressesCount++;
}
}
ifp->IPv6Addresses = app::DataModel::List<const ByteSpan>(ifp->Ipv6AddressSpans, ipv6AddressesCount);

*netifpp = ifp;
return CHIP_NO_ERROR;
}
Expand Down