File tree 3 files changed +15
-10
lines changed
3 files changed +15
-10
lines changed Original file line number Diff line number Diff line change 51
51
#if CHIP_ENABLE_OPENTHREAD
52
52
#include < platform/OpenThread/OpenThreadUtils.h>
53
53
#include < platform/ThreadStackManager.h>
54
+ #include < platform/silabs/ConfigurationManagerImpl.h>
54
55
#include < platform/silabs/ThreadStackManagerImpl.h>
55
56
#endif // CHIP_ENABLE_OPENTHREAD
56
57
@@ -801,11 +802,7 @@ void BaseApplication::DoProvisioningReset()
801
802
{
802
803
PlatformMgr ().ScheduleWork ([](intptr_t ) {
803
804
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD
804
- #if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
805
- ThreadStackMgr ().ClearAllSrpHostAndServices ();
806
- #endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
807
- ChipLogProgress (DeviceLayer, " Clearing Thread provision" );
808
- chip::DeviceLayer::ConnectivityMgr ().ErasePersistentInfo ();
805
+ ConfigurationManagerImpl::GetDefaultInstance ().ClearThreadStack ();
809
806
ThreadStackMgrImpl ().FactoryResetThreadStack ();
810
807
ThreadStackMgr ().InitThreadStack ();
811
808
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD
Original file line number Diff line number Diff line change @@ -260,6 +260,16 @@ void ConfigurationManagerImpl::RunConfigUnitTest(void)
260
260
#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST
261
261
}
262
262
263
+ // / @brief Helper to erase Thread info from device
264
+ void ConfigurationManagerImpl::ClearThreadStack ()
265
+ {
266
+ #if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
267
+ ThreadStackMgr ().ClearAllSrpHostAndServices ();
268
+ #endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
269
+ ChipLogProgress (DeviceLayer, " Clearing Thread provision" );
270
+ ThreadStackMgr ().ErasePersistentInfo ();
271
+ }
272
+
263
273
void ConfigurationManagerImpl::DoFactoryReset (intptr_t arg)
264
274
{
265
275
CHIP_ERROR err;
@@ -273,11 +283,7 @@ void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg)
273
283
}
274
284
275
285
#if CHIP_DEVICE_CONFIG_ENABLE_THREAD
276
- #if CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
277
- ThreadStackMgr ().ClearAllSrpHostAndServices ();
278
- #endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
279
- ChipLogProgress (DeviceLayer, " Clearing Thread provision" );
280
- ThreadStackMgr ().ErasePersistentInfo ();
286
+ GetDefaultInstance ().ClearThreadStack ();
281
287
#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD
282
288
283
289
PersistedStorage::KeyValueStoreMgrImpl ().ErasePartition ();
Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp
46
46
CHIP_ERROR GetTotalOperationalHours (uint32_t & totalOperationalHours);
47
47
CHIP_ERROR StoreTotalOperationalHours (uint32_t totalOperationalHours);
48
48
49
+ void ClearThreadStack ();
50
+
49
51
private:
50
52
// ===== Members that implement the ConfigurationManager public interface.
51
53
You can’t perform that action at this time.
0 commit comments