Skip to content

Commit

Permalink
add interface IPv6 addresses and up fabrics for SVE#2 (#22644)
Browse files Browse the repository at this point in the history
* add interface IPv6 addresses and up fabrics for SVE#2

* reduce all-clusters-app stack to match lock-app
  • Loading branch information
srickardti authored and pull[bot] committed Feb 13, 2024
1 parent 81e7449 commit 0453d1d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
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

0 comments on commit 0453d1d

Please sign in to comment.