[mesh-local-prefix] remove coupling to Extended PAN ID (#7686)

Deriving the Mesh Local Prefix from the Extended PAN ID was carried
forward from legacy implementations. Removing this coupling to conform
to the existing Thread Specification.
This commit is contained in:
Jonathan Hui
2022-05-11 18:21:09 -07:00
committed by GitHub
parent fcf40d7087
commit c2dd7eb66d
12 changed files with 37 additions and 66 deletions
-4
View File
@@ -63,15 +63,11 @@ otError otThreadSetExtendedPanId(otInstance *aInstance, const otExtendedPanId *a
Error error = kErrorNone;
Instance & instance = AsCoreType(aInstance);
const MeshCoP::ExtendedPanId &extPanId = AsCoreType(aExtendedPanId);
Mle::MeshLocalPrefix prefix;
VerifyOrExit(instance.Get<Mle::MleRouter>().IsDisabled(), error = kErrorInvalidState);
instance.Get<MeshCoP::ExtendedPanIdManager>().SetExtPanId(extPanId);
prefix.SetFromExtendedPanId(extPanId);
instance.Get<Mle::MleRouter>().SetMeshLocalPrefix(prefix);
instance.Get<MeshCoP::ActiveDatasetManager>().Clear();
instance.Get<MeshCoP::PendingDatasetManager>().Clear();