mirror of
https://github.com/espressif/openthread.git
synced 2026-08-05 02:17:47 +00:00
[csl] update CSL on role change to router or leader (#7874)
This commit adds a call to `Get<Mac::Mac>().UpdateCsl()` when there is role change from `SetStateLeader()` or `SetStateRouter()`. This ensures to disable CSL at `SubMac` and radio platform.
This commit is contained in:
@@ -399,6 +399,10 @@ void MleRouter::SetStateRouter(uint16_t aRloc16)
|
||||
RemoveNeighbor(child);
|
||||
}
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
||||
Get<Mac::Mac>().UpdateCsl();
|
||||
#endif
|
||||
}
|
||||
|
||||
void MleRouter::SetStateLeader(uint16_t aRloc16, LeaderStartMode aStartMode)
|
||||
@@ -440,6 +444,10 @@ void MleRouter::SetStateLeader(uint16_t aRloc16, LeaderStartMode aStartMode)
|
||||
}
|
||||
}
|
||||
|
||||
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
|
||||
Get<Mac::Mac>().UpdateCsl();
|
||||
#endif
|
||||
|
||||
LogNote("Leader partition id 0x%x", mLeaderData.GetPartitionId());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user