Skip to content

Commit

Permalink
TBD remove enhanced CSL capabilities bit and define eCSL devices are …
Browse files Browse the repository at this point in the history
…sleepy-device-capable by default.
  • Loading branch information
suveshpratapa committed Oct 16, 2024
1 parent 3590125 commit 6c81478
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 24 deletions.
2 changes: 0 additions & 2 deletions examples/platform/silabs/MatterConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ CHIP_ERROR SilabsMatterConfig::InitOpenThread(void)
#if CHIP_CONFIG_ENABLE_ICD_SERVER
#if CHIP_DEVICE_CONFIG_THREAD_SSED
ReturnErrorOnFailure(ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_SynchronizedSleepyEndDevice));
#elif CHIP_DEVICE_CONFIG_THREAD_ECSL_SED
ReturnErrorOnFailure(ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_EnhancedCslSleepyEndDevice));
#else
ReturnErrorOnFailure(ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_SleepyEndDevice));
#endif
Expand Down
1 change: 0 additions & 1 deletion src/include/platform/ConnectivityManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ class ConnectivityManager
kThreadDeviceType_MinimalEndDevice = 3,
kThreadDeviceType_SleepyEndDevice = 4,
kThreadDeviceType_SynchronizedSleepyEndDevice = 5,
kThreadDeviceType_EnhancedCslSleepyEndDevice = 6,
};

enum BLEAdvertisingMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,6 @@ ThreadCapabilities GenericThreadDriver::GetSupportedThreadFeatures()
capabilites.SetField(ThreadCapabilities::kIsFullThreadDevice, CHIP_DEVICE_CONFIG_THREAD_FTD);
capabilites.SetField(ThreadCapabilities::kIsSynchronizedSleepyEndDeviceCapable,
(!CHIP_DEVICE_CONFIG_THREAD_FTD && CHIP_DEVICE_CONFIG_THREAD_SSED));
capabilites.SetField(ThreadCapabilities::kIsEnhancedCslSleepyEndDeviceCapable,
(!CHIP_DEVICE_CONFIG_THREAD_FTD && CHIP_DEVICE_CONFIG_THREAD_ECSL_SED));
return capabilites;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,6 @@ ConnectivityManager::ThreadDeviceType GenericThreadStackManagerImpl_OpenThread<I
ExitNow(deviceType = ConnectivityManager::kThreadDeviceType_SynchronizedSleepyEndDevice);
#endif // CHIP_DEVICE_CONFIG_THREAD_SSED

#if CHIP_DEVICE_CONFIG_THREAD_ECSL_SED
ExitNow(deviceType = ConnectivityManager::kThreadDeviceType_EnhancedCslSleepyEndDevice);
#endif // CHIP_DEVICE_CONFIG_THREAD_ECSL_SED

ExitNow(deviceType = ConnectivityManager::kThreadDeviceType_SleepyEndDevice);

exit:
Expand All @@ -579,9 +575,6 @@ GenericThreadStackManagerImpl_OpenThread<ImplClass>::_SetThreadDeviceType(Connec
case ConnectivityManager::kThreadDeviceType_SleepyEndDevice:
#if CHIP_DEVICE_CONFIG_THREAD_SSED
case ConnectivityManager::kThreadDeviceType_SynchronizedSleepyEndDevice:
#endif
#if CHIP_DEVICE_CONFIG_THREAD_ECSL_SED
case ConnectivityManager::kThreadDeviceType_EnhancedCslSleepyEndDevice:
#endif
break;
default:
Expand All @@ -603,17 +596,16 @@ GenericThreadStackManagerImpl_OpenThread<ImplClass>::_SetThreadDeviceType(Connec
deviceTypeStr = "MINIMAL END DEVICE";
break;
case ConnectivityManager::kThreadDeviceType_SleepyEndDevice:
#if CHIP_DEVICE_CONFIG_THREAD_ECSL_SED
deviceTypeStr = "ENHANCED CSL SLEEPY END DEVICE";
#else
deviceTypeStr = "SLEEPY END DEVICE";
#endif
break;
#if CHIP_DEVICE_CONFIG_THREAD_SSED
case ConnectivityManager::kThreadDeviceType_SynchronizedSleepyEndDevice:
deviceTypeStr = "SYNCHRONIZED SLEEPY END DEVICE";
break;
#endif
#if CHIP_DEVICE_CONFIG_THREAD_ECSL_SED
case ConnectivityManager::kThreadDeviceType_EnhancedCslSleepyEndDevice:
deviceTypeStr = "ENHANCED CSL SLEEPY END DEVICE";
break;
#endif
default:
deviceTypeStr = "(unknown)";
Expand Down Expand Up @@ -644,7 +636,6 @@ GenericThreadStackManagerImpl_OpenThread<ImplClass>::_SetThreadDeviceType(Connec
break;
case ConnectivityManager::kThreadDeviceType_SleepyEndDevice:
case ConnectivityManager::kThreadDeviceType_SynchronizedSleepyEndDevice:
case ConnectivityManager::kThreadDeviceType_EnhancedCslSleepyEndDevice:
linkMode.mDeviceType = false;
linkMode.mRxOnWhenIdle = false;
break;
Expand Down Expand Up @@ -1213,13 +1204,11 @@ CHIP_ERROR GenericThreadStackManagerImpl_OpenThread<ImplClass>::_SetPollingInter
otErr = otLinkCslSetPeriod(mOTInst, pollingInterval.count() * 1000 / OT_US_PER_TEN_SYMBOLS);
curIntervalMS = otLinkCslGetPeriod(mOTInst) * OT_US_PER_TEN_SYMBOLS / 1000;
#endif // OPENTHREAD_API_VERSION
#elif CHIP_DEVICE_CONFIG_THREAD_ECSL_SED
#else
#if CHIP_DEVICE_CONFIG_THREAD_ECSL_SED
// Set initial CSL period to 0 for eCSL SEDs. The value is later negotiated with its WC parent.
otErr = otLinkSetCslPeriod(mOTInst, 0);
curIntervalMS = 0;
otErr = otLinkSetPollPeriod(mOTInst, pollingInterval.count());
curIntervalMS = otLinkGetPollPeriod(mOTInst);
#else
#endif // CHIP_DEVICE_CONFIG_THREAD_ECSL_SED
otErr = otLinkSetPollPeriod(mOTInst, pollingInterval.count());
curIntervalMS = otLinkGetPollPeriod(mOTInst);
#endif
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6c81478

Please sign in to comment.