From 3a92602fc569a35a0aeeb5554323531afa160f2d Mon Sep 17 00:00:00 2001 From: LeelakumarPS Date: Tue, 9 May 2023 18:14:20 +0530 Subject: [PATCH 1/2] Adds fix for LastConnectErrorValue have null after device reset --- src/platform/silabs/NetworkCommissioningWiFiDriver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp b/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp index 5778263466ceeb..9f365585448f82 100644 --- a/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp @@ -180,11 +180,11 @@ void SlWiFiDriver::UpdateNetworkingStatus() if (!wfx_is_sta_connected()) { mpStatusChangeCallback->OnNetworkingStatusChange(Status::kUnknownError, MakeOptional(networkId), - MakeOptional((int32_t) SL_STATUS_FAIL)); + NullOptional); return; } mpStatusChangeCallback->OnNetworkingStatusChange(Status::kSuccess, MakeOptional(networkId), - MakeOptional((int32_t) SL_STATUS_OK)); + NullOptional); } void SlWiFiDriver::OnConnectWiFiNetwork() From 2c671f6fc6355b9412e005e9d9bb6a3b4563a06a Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Tue, 9 May 2023 12:57:08 +0000 Subject: [PATCH 2/2] Restyled by clang-format --- src/platform/silabs/NetworkCommissioningWiFiDriver.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp b/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp index 9f365585448f82..515c2695191e6a 100644 --- a/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/silabs/NetworkCommissioningWiFiDriver.cpp @@ -179,12 +179,10 @@ void SlWiFiDriver::UpdateNetworkingStatus() ByteSpan networkId = ByteSpan((const unsigned char *) mStagingNetwork.ssid, mStagingNetwork.ssidLen); if (!wfx_is_sta_connected()) { - mpStatusChangeCallback->OnNetworkingStatusChange(Status::kUnknownError, MakeOptional(networkId), - NullOptional); + mpStatusChangeCallback->OnNetworkingStatusChange(Status::kUnknownError, MakeOptional(networkId), NullOptional); return; } - mpStatusChangeCallback->OnNetworkingStatusChange(Status::kSuccess, MakeOptional(networkId), - NullOptional); + mpStatusChangeCallback->OnNetworkingStatusChange(Status::kSuccess, MakeOptional(networkId), NullOptional); } void SlWiFiDriver::OnConnectWiFiNetwork()