[spinel] add support for multiple spinel interfaces (#9360)

This feature allows the RCP to support multiple host stacks on different PANs
by making use of the spinel Interface ID.

Created unit tests for testing multipan feature with multiple ot-instance
support.

Based on Si-Labs PR #8914 by @parag-silabs, but a little different approach.
Instead of handling everything by a single sub-mac instance, multiple
OpenThread instances are created on RCP side that map to different IID.
Thanks to this there are separate data kept for each interface. Platform
is able to determine interface by ot instance pointer passed as an argument
to most of the API functions.
Tx/scan queue was removed as it is possible to request transmission in
parallel, it is up to the platform to decide if it should fail or queue
second tx or it has two radios available.

NOTE:
Platform needs to provide different otRadioFrame of each instance and
the processing needs to take into account the instance being used.

Signed-off-by: Marek Porwisz <[email protected]>
This commit is contained in:
Marek Porwisz
2023-11-28 16:16:37 -08:00
committed by GitHub
parent f859987ce6
commit 834c8cbc8e
40 changed files with 2324 additions and 171 deletions
+5
View File
@@ -38,6 +38,7 @@
#include <openthread/platform/entropy.h>
#include <openthread/platform/logging.h>
#include <openthread/platform/misc.h>
#include <openthread/platform/multipan.h>
#include <openthread/platform/radio.h>
#include <openthread/platform/settings.h>
@@ -230,6 +231,10 @@ OT_TOOL_WEAK void otPlatLog(otLogLevel aLogLevel, otLogRegion aLogRegion, const
void otPlatWakeHost(void) {}
otError otPlatMultipanGetActiveInstance(otInstance **) { return OT_ERROR_NOT_IMPLEMENTED; }
otError otPlatMultipanSetActiveInstance(otInstance *, bool) { return OT_ERROR_NOT_IMPLEMENTED; }
void otPlatRadioGetIeeeEui64(otInstance *aInstance, uint8_t *aIeeeEui64)
{
OT_UNUSED_VARIABLE(aInstance);