Skip to content

Commit

Permalink
[Telink] Use _SetRouterPromotion only for FTD
Browse files Browse the repository at this point in the history
  • Loading branch information
s07641069 committed Mar 1, 2023
1 parent 3f77303 commit 01991d3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1697,12 +1697,14 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_GetPollPeriod(u
template <class ImplClass>
void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_SetRouterPromotion(bool val)
{
#if CHIP_DEVICE_CONFIG_THREAD_FTD
Impl()->LockThreadStack();
if (otThreadGetDeviceRole(DeviceLayer::ThreadStackMgrImpl().OTInstance()) != OT_DEVICE_ROLE_ROUTER)
{
otThreadSetRouterEligible(DeviceLayer::ThreadStackMgrImpl().OTInstance(), val);
}
Impl()->UnlockThreadStack();
#endif
}

template <class ImplClass>
Expand Down

0 comments on commit 01991d3

Please sign in to comment.