[csl] disable CSL when detaching (#6936)

When child becomes detached the CSL wasn't disabled in the radio
driver, which caused problems with sending ParentRequest.
This commit is contained in:
canisLupus1313
2021-08-20 11:10:50 -07:00
committed by GitHub
parent 5e22e38393
commit deb2a4c97a
+6
View File
@@ -619,6 +619,12 @@ bool Mle::IsRouterOrLeader(void) const
void Mle::SetStateDetached(void)
{
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
if (Get<Mac::Mac>().IsCslEnabled())
{
IgnoreError(Get<Radio>().EnableCsl(0, GetParent().GetRloc16(), &GetParent().GetExtAddress()));
}
#endif
#if OPENTHREAD_FTD && OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE
Get<BackboneRouter::Local>().Reset();
#endif