From 9c94fe62a2a4ecca2ba9d5db2d175ef213add5c2 Mon Sep 17 00:00:00 2001 From: shgutte <102281713+shgutte@users.noreply.github.com> Date: Thu, 18 Jan 2024 23:02:30 +0530 Subject: [PATCH] [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 --- src/platform/silabs/rs911x/BLEManagerImpl.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/platform/silabs/rs911x/BLEManagerImpl.cpp b/src/platform/silabs/rs911x/BLEManagerImpl.cpp index bc79b1429ff94a..a32d46b30f2715 100644 --- a/src/platform/silabs/rs911x/BLEManagerImpl.cpp +++ b/src/platform/silabs/rs911x/BLEManagerImpl.cpp @@ -656,7 +656,7 @@ CHIP_ERROR BLEManagerImpl::ConfigureAdvertisingData(void) 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 @@ CHIP_ERROR BLEManagerImpl::StartAdvertising(void) ChipLogDetail(DeviceLayer, "Start BLE advertissement"); } - err = ConfigureAdvertisingData(); - SuccessOrExit(err); + if (!(mFlags.Has(Flags::kAdvertising))) + { + err = ConfigureAdvertisingData(); + SuccessOrExit(err); + } mFlags.Clear(Flags::kRestartAdvertising);