Skip to content

Commit 97e9b56

Browse files
[SL-ONLY] Update WifiSleepManager to fix mergle conflicts
1 parent 6ac6309 commit 97e9b56

File tree

2 files changed

+8
-65
lines changed

2 files changed

+8
-65
lines changed

src/platform/silabs/wifi/icd/WifiSleepManager.cpp

-65
Original file line numberDiff line numberDiff line change
@@ -21,71 +21,6 @@
2121

2222
using namespace chip::DeviceLayer::Silabs;
2323

24-
namespace {
25-
26-
// TODO: Once the platform sleep calls are unified, we can removed this ifdef
27-
#if SLI_SI917 // 917 SoC & NCP
28-
29-
/**
30-
* @brief Configures the Wi-Fi Chip to go to LI based sleep.
31-
* Function sets the listen interval the ICD Transort Slow Poll configuration and enables the broadcast filter.
32-
*
33-
* @return CHIP_ERROR CHIP_NO_ERROR if the configuration of the Wi-Fi chip was successful; otherwise CHIP_ERROR_INTERNAL
34-
*/
35-
CHIP_ERROR ConfigureLIBasedSleep()
36-
{
37-
ReturnLogErrorOnFailure(WifiInterface::GetInstance().ConfigureBroadcastFilter(true));
38-
39-
// Allowing the device to go to sleep must be the last actions to avoid configuration failures.
40-
ReturnLogErrorOnFailure(WifiInterface::GetInstance().ConfigurePowerSave(
41-
RSI_SLEEP_MODE_2, ASSOCIATED_POWER_SAVE, chip::ICDConfigurationData::GetInstance().GetSlowPollingInterval().count()));
42-
43-
return CHIP_NO_ERROR;
44-
}
45-
46-
/**
47-
* @brief Configures the Wi-Fi Chip to go to DTIM based sleep.
48-
* Function sets the listen interval to be synced with the DTIM beacon and disables the broadcast filter.
49-
*
50-
* @return CHIP_ERROR CHIP_NO_ERROR if the configuration of the Wi-Fi chip was successful; otherwise CHIP_ERROR_INTERNAL
51-
*/
52-
CHIP_ERROR ConfigureDTIMBasedSleep()
53-
{
54-
ReturnLogErrorOnFailure(WifiInterface::GetInstance().ConfigureBroadcastFilter(false));
55-
56-
// Allowing the device to go to sleep must be the last actions to avoid configuration failures.
57-
ReturnLogErrorOnFailure(WifiInterface::GetInstance().ConfigurePowerSave(RSI_SLEEP_MODE_2, ASSOCIATED_POWER_SAVE, 0));
58-
59-
return CHIP_NO_ERROR;
60-
}
61-
62-
/**
63-
* @brief Configures the Wi-Fi chip to go Deep Sleep.
64-
* Function doesn't change the state of the broadcast filter.
65-
*
66-
* @return CHIP_ERROR CHIP_NO_ERROR if the configuration of the Wi-Fi chip was successful; otherwise CHIP_ERROR_INTERNAL
67-
*/
68-
CHIP_ERROR ConfigureDeepSleep()
69-
{
70-
ReturnLogErrorOnFailure(WifiInterface::GetInstance().ConfigurePowerSave(RSI_SLEEP_MODE_8, DEEP_SLEEP_WITH_RAM_RETENTION, 0));
71-
return CHIP_NO_ERROR;
72-
}
73-
74-
/**
75-
* @brief Configures the Wi-Fi chip to go to High Performance.
76-
* Function doesn't change the broad cast filter configuration.
77-
*
78-
* @return CHIP_ERROR CHIP_NO_ERROR if the configuration of the Wi-Fi chip was successful; otherwise CHIP_ERROR_INTERNAL
79-
*/
80-
CHIP_ERROR ConfigureHighPerformance()
81-
{
82-
ReturnLogErrorOnFailure(WifiInterface::GetInstance().ConfigurePowerSave(RSI_ACTIVE, HIGH_PERFORMANCE, 0));
83-
return CHIP_NO_ERROR;
84-
}
85-
#endif // SLI_SI917
86-
87-
} // namespace
88-
8924
namespace chip {
9025
namespace DeviceLayer {
9126
namespace Silabs {

src/platform/silabs/wifi/icd/WifiSleepManager.h

+8
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,14 @@ class WifiSleepManager
223223
*/
224224
CHIP_ERROR ConfigureDTIMBasedSleep();
225225

226+
/**
227+
* @brief Configures the Wi-Fi Chip to go to LI based sleep.
228+
* Function sets the listen interval the ICD Transort Slow Poll configuration and enables the broadcast filter.
229+
*
230+
* @return CHIP_ERROR CHIP_NO_ERROR if the configuration of the Wi-Fi chip was successful; otherwise CHIP_ERROR_INTERNAL
231+
*/
232+
CHIP_ERROR ConfigureLIBasedSleep();
233+
226234
/**
227235
* @brief Increments the HighPerformance request counter and triggers the transition to High Performance if requested.
228236
*

0 commit comments

Comments
 (0)