Skip to content

Commit

Permalink
Revert "[nrf fromtree] [icd] Removed ICD related methods (former SED)…
Browse files Browse the repository at this point in the history
… from NoThreadImpl (project-chip#24444)"

This reverts commit 0fb84bd.
  • Loading branch information
kkasperczyk-no committed Mar 15, 2023
1 parent c6e2b97 commit 4d25dc3
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 49 deletions.
7 changes: 0 additions & 7 deletions examples/light-switch-app/nrfconnect/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ config CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT

endif # NET_L2_OPENTHREAD

if CHIP_WIFI

config NRF_WIFI_LOW_POWER
default y

endif # CHIP_WIFI

rsource "../../../config/nrfconnect/chip-module/Kconfig.features"
rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults"
source "Kconfig.zephyr"
7 changes: 0 additions & 7 deletions examples/lock-app/nrfconnect/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,6 @@ config CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT

endif # NET_L2_OPENTHREAD

if CHIP_WIFI

config NRF_WIFI_LOW_POWER
default y

endif # CHIP_WIFI

rsource "../../../config/nrfconnect/chip-module/Kconfig.features"
rsource "../../../config/nrfconnect/chip-module/Kconfig.defaults"
source "Kconfig.zephyr"
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class GenericConnectivityManagerImpl_NoThread
bool _IsThreadApplicationControlled(void);
ConnectivityManager::ThreadDeviceType _GetThreadDeviceType(void);
CHIP_ERROR _SetThreadDeviceType(ConnectivityManager::ThreadDeviceType deviceType);
CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig);
CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig);
CHIP_ERROR _RequestSEDActiveMode(bool onOff);
bool _IsThreadAttached(void);
bool _IsThreadProvisioned(void);
void _ErasePersistentInfo(void);
Expand Down Expand Up @@ -112,6 +115,26 @@ GenericConnectivityManagerImpl_NoThread<ImplClass>::_SetThreadDeviceType(Connect
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

template <class ImplClass>
inline CHIP_ERROR GenericConnectivityManagerImpl_NoThread<ImplClass>::_GetSEDIntervalsConfig(
ConnectivityManager::SEDIntervalsConfig & intervalsConfig)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

template <class ImplClass>
inline CHIP_ERROR GenericConnectivityManagerImpl_NoThread<ImplClass>::_SetSEDIntervalsConfig(
const ConnectivityManager::SEDIntervalsConfig & intervalsConfig)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

template <class ImplClass>
inline CHIP_ERROR GenericConnectivityManagerImpl_NoThread<ImplClass>::_RequestSEDActiveMode(bool onOff)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}

template <class ImplClass>
inline void GenericConnectivityManagerImpl_NoThread<ImplClass>::_ResetThreadNetworkDiagnosticsCounts()
{}
Expand Down
4 changes: 0 additions & 4 deletions src/platform/nrfconnect/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,6 @@
#define CHIP_DEVICE_CONFIG_THREAD_SSED CONFIG_CHIP_THREAD_SSED
#endif // CONFIG_CHIP_ENABLE_SLEEPY_END_DEVICE_SUPPORT

#ifdef CONFIG_NRF_WIFI_LOW_POWER
#define CHIP_DEVICE_CONFIG_ENABLE_SED 1
#endif // CONFIG_NRF_WIFI_LOW_POWER

#ifndef CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL
#ifdef CONFIG_CHIP_SED_IDLE_INTERVAL
#define CHIP_DEVICE_CONFIG_SED_IDLE_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_CHIP_SED_IDLE_INTERVAL)
Expand Down
20 changes: 0 additions & 20 deletions src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,26 +123,6 @@ CHIP_ERROR ConnectivityManagerImplWiFi::_GetAndLogWiFiStatsCounters(void)
return CHIP_NO_ERROR;
}

#if CHIP_DEVICE_CONFIG_ENABLE_SED
CHIP_ERROR ConnectivityManagerImplWiFi::_GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & SEDIntervalsConfig)
{
// For now Wi-Fi uses legacy power save mode that has fixed inactivity interval
SEDIntervalsConfig.ActiveIntervalMS =
chip::System::Clock::Milliseconds32(WiFiManager::kDefaultDTIMInterval * WiFiManager::kBeaconIntervalMs);
SEDIntervalsConfig.IdleIntervalMS =
chip::System::Clock::Milliseconds32(WiFiManager::kDefaultDTIMInterval * WiFiManager::kBeaconIntervalMs);
return CHIP_NO_ERROR;
}
CHIP_ERROR ConnectivityManagerImplWiFi::_SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}
CHIP_ERROR ConnectivityManagerImplWiFi::_RequestSEDActiveMode(bool onOff, bool delayIdle)
{
return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE;
}
#endif

ConnectivityManager::WiFiAPMode ConnectivityManagerImplWiFi::_GetWiFiAPMode(void)
{
/* AP mode is unsupported */
Expand Down
6 changes: 0 additions & 6 deletions src/platform/nrfconnect/wifi/ConnectivityManagerImplWiFi.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ class ConnectivityManagerImplWiFi
void _OnWiFiScanDone();
void _OnWiFiStationProvisionChange();

#if CHIP_DEVICE_CONFIG_ENABLE_SED
CHIP_ERROR _GetSEDIntervalsConfig(ConnectivityManager::SEDIntervalsConfig & intervalsConfig);
CHIP_ERROR _SetSEDIntervalsConfig(const ConnectivityManager::SEDIntervalsConfig & intervalsConfig);
CHIP_ERROR _RequestSEDActiveMode(bool onOff, bool delayIdle = false);
#endif

// Wi-Fi access point - not supported
ConnectivityManager::WiFiAPMode _GetWiFiAPMode(void);
CHIP_ERROR _SetWiFiAPMode(ConnectivityManager::WiFiAPMode val);
Expand Down
5 changes: 0 additions & 5 deletions src/platform/nrfconnect/wifi/WiFiManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,6 @@ class WiFiManager
static constexpr uint16_t kMaxInitialRouterSolicitationDelayMs = 1000;
static constexpr uint8_t kRouterSolicitationMaxCount = 3;

#if CHIP_DEVICE_CONFIG_ENABLE_SED
static constexpr uint8_t kDefaultDTIMInterval = 3;
static constexpr uint8_t kBeaconIntervalMs = 100;
#endif

CHIP_ERROR Init();
CHIP_ERROR Scan(const ByteSpan & ssid, ScanResultCallback resultCallback, ScanDoneCallback doneCallback,
bool internalScan = false);
Expand Down

0 comments on commit 4d25dc3

Please sign in to comment.