From 47621150023369fd4fd43a7b51beddc2f695041e Mon Sep 17 00:00:00 2001 From: alvin hsiao Date: Wed, 18 Jan 2023 15:57:30 +0800 Subject: [PATCH] [Infineon] Not to increment RebootCount if wakes from sleep state --- .../Infineon/CYW30739/ConfigurationManagerImpl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/platform/Infineon/CYW30739/ConfigurationManagerImpl.cpp b/src/platform/Infineon/CYW30739/ConfigurationManagerImpl.cpp index 5489a58441c3ff..08efb665629e67 100644 --- a/src/platform/Infineon/CYW30739/ConfigurationManagerImpl.cpp +++ b/src/platform/Infineon/CYW30739/ConfigurationManagerImpl.cpp @@ -31,6 +31,7 @@ #include #include #include +#include namespace chip { namespace DeviceLayer { @@ -51,9 +52,11 @@ CHIP_ERROR ConfigurationManagerImpl::Init() { err = GetRebootCount(rebootCount); SuccessOrExit(err); - - err = StoreRebootCount(rebootCount + 1); - SuccessOrExit(err); + if (wiced_sleep_get_boot_mode() != WICED_SLEEP_FAST_BOOT) + { + err = StoreRebootCount(rebootCount + 1); + SuccessOrExit(err); + } } else {