[Silabs] [Wi-Fi] [SiWx917] Added fix for slow advertisement on 917 NCP (#31501)
* Added fix for slow advertisement
* Added changes for the BLE error issue for SOC
* Restyled by clang-format
---------
Co-authored-by: Restyled.io <commits@restyled.io>
diff --git a/src/platform/silabs/rs911x/BLEManagerImpl.cpp b/src/platform/silabs/rs911x/BLEManagerImpl.cpp
index bc79b14..a32d46b 100644
--- a/src/platform/silabs/rs911x/BLEManagerImpl.cpp
+++ b/src/platform/silabs/rs911x/BLEManagerImpl.cpp
@@ -656,7 +656,7 @@
CHIP_ERROR BLEManagerImpl::StartAdvertising(void)
{
- CHIP_ERROR err;
+ CHIP_ERROR err = CHIP_NO_ERROR;
int32_t status = 0;
ChipLogProgress(DeviceLayer, "StartAdvertising start");
@@ -675,8 +675,11 @@
ChipLogDetail(DeviceLayer, "Start BLE advertissement");
}
- err = ConfigureAdvertisingData();
- SuccessOrExit(err);
+ if (!(mFlags.Has(Flags::kAdvertising)))
+ {
+ err = ConfigureAdvertisingData();
+ SuccessOrExit(err);
+ }
mFlags.Clear(Flags::kRestartAdvertising);