Skip to content

Commit afcced0

Browse files
[SL-UP] Moving the high-performance request command out of the timer handler (#215)
Co-authored-by: chirag-silabs <chirag.bansal@silabs.com>
1 parent 639bb9a commit afcced0

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

src/platform/silabs/wifi/SiWx/WifiInterface.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,10 @@ sl_status_t JoinWifiNetwork(void)
462462

463463
if (status == SL_STATUS_OK)
464464
{
465+
#if CHIP_CONFIG_ENABLE_ICD_SERVER
466+
// Remove High performance request that might have been added during the connect/retry process
467+
chip::DeviceLayer::Silabs::WifiSleepManager::GetInstance().RemoveHighPerformanceRequest();
468+
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
465469
WifiEvent event = WifiEvent::kStationConnect;
466470
sl_matter_wifi_post_event(event);
467471
return status;
@@ -815,6 +819,11 @@ void ProcessEvent(WifiEvent event)
815819
case WifiEvent::kStationStartJoin:
816820
ChipLogDetail(DeviceLayer, "WifiEvent::kStationStartJoin");
817821

822+
// To avoid IOP issues, it is recommended to enable high-performance mode before joining the network.
823+
// TODO: Remove this once the IOP issue related to power save mode switching is fixed in the Wi-Fi SDK.
824+
#if CHIP_CONFIG_ENABLE_ICD_SERVER
825+
chip::DeviceLayer::Silabs::WifiSleepManager::GetInstance().RequestHighPerformance();
826+
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
818827
InitiateScan();
819828
JoinWifiNetwork();
820829
break;

src/platform/silabs/wifi/WifiInterfaceAbstraction.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ osTimerId_t sRetryTimer;
5656
*/
5757
void RetryConnectionTimerHandler(void * arg)
5858
{
59-
#if CHIP_CONFIG_ENABLE_ICD_SERVER
60-
Silabs::WifiSleepManager::GetInstance().RequestHighPerformance();
61-
#endif // CHIP_CONFIG_ENABLE_ICD_SERVER
62-
6359
if (wfx_connect_to_ap() != SL_STATUS_OK)
6460
{
6561
ChipLogError(DeviceLayer, "wfx_connect_to_ap() failed.");

0 commit comments

Comments
 (0)