Skip to content

Commit 4e01cee

Browse files
selissiakowsisoundhar12carol-applebzbarsky-appleDamian-Nordic
authored
Use a separate execution thread to disable the OpenThread interface (#22315)
* Test added march 8 (#15957) * Added new manual scripts * Added Auto generated File * [OTA] Fix OTARequestorDriverImpl inclusion (#15981) * Regen to fix CI failures (#15990) * [ota] Store Default OTA Providers in flash (#15970) * [ota] Store Default OTA Providers in flash Store Default OTA Providers in flash each time the attribute is modified and load it back on the application startup. * Restyled by clang-format * Fix build and reduce flash usage Co-authored-by: Restyled.io <commits@restyled.io> * Disable OpenThread interface in a separate execution thread * Remove merge artifacts * Restyled by clang-format Co-authored-by: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Co-authored-by: Carol Yang <clyang@apple.com> Co-authored-by: Boris Zbarsky <bzbarsky@apple.com> Co-authored-by: Damian Królik <66667989+Damian-Nordic@users.noreply.github.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent 46443b0 commit 4e01cee

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,11 @@ void GenericThreadStackManagerImpl_OpenThread<ImplClass>::_OnNetworkScanFinished
453453
// If Thread scanning was done before commissioning, turn off the IPv6 interface.
454454
if (otThreadGetDeviceRole(mOTInst) == OT_DEVICE_ROLE_DISABLED && !otDatasetIsCommissioned(mOTInst))
455455
{
456-
otIp6SetEnabled(mOTInst, false);
456+
DeviceLayer::SystemLayer().ScheduleLambda([this]() {
457+
Impl()->LockThreadStack();
458+
otIp6SetEnabled(mOTInst, false);
459+
Impl()->UnlockThreadStack();
460+
});
457461
}
458462

459463
if (mpScanCallback != nullptr)

0 commit comments

Comments
 (0)