mirror of
https://github.com/espressif/openthread.git
synced 2026-08-15 23:27:47 +00:00
[mle] configure poll/rx-on modes after child role change (#7101)
If we configure CSL parameters before a command to attach, then the child has configured valid CSL state, but when trying to configure the auto-sync CSL poll timeout, the check to IsCslEnabled->IsCslCapable fails because IsChild() fails. When handling the child ID response success, we now trigger poll-sender's recalculation, and rx-on-idle states, after role change to child.
This commit is contained in:
+10
-10
@@ -3681,16 +3681,6 @@ void Mle::HandleChildIdResponse(const Message & aMessage,
|
||||
|
||||
SetLeaderData(leaderData.GetPartitionId(), leaderData.GetWeighting(), leaderData.GetLeaderRouterId());
|
||||
|
||||
if (!IsRxOnWhenIdle())
|
||||
{
|
||||
Get<DataPollSender>().SetAttachMode(false);
|
||||
Get<MeshForwarder>().SetRxOnWhenIdle(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Get<MeshForwarder>().SetRxOnWhenIdle(true);
|
||||
}
|
||||
|
||||
#if OPENTHREAD_FTD
|
||||
if (IsFullThreadDevice())
|
||||
{
|
||||
@@ -3719,6 +3709,16 @@ void Mle::HandleChildIdResponse(const Message & aMessage,
|
||||
|
||||
SetStateChild(shortAddress);
|
||||
|
||||
if (!IsRxOnWhenIdle())
|
||||
{
|
||||
Get<DataPollSender>().SetAttachMode(false);
|
||||
Get<MeshForwarder>().SetRxOnWhenIdle(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Get<MeshForwarder>().SetRxOnWhenIdle(true);
|
||||
}
|
||||
|
||||
exit:
|
||||
LogProcessError(kTypeChildIdResponse, error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user