Skip to content

Commit b840187

Browse files
committed
Addressed review comments
1 parent 82670db commit b840187

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

src/platform/silabs/NetworkCommissioningWiFiDriver.cpp

+3-10
Original file line numberDiff line numberDiff line change
@@ -263,17 +263,10 @@ chip::BitFlags<WiFiSecurity> SlWiFiDriver::ConvertSecuritytype(wfx_sec_t securit
263263
return securityType;
264264
}
265265

266-
bool SlWiFiDriver::StartScanWiFiNetworks(ByteSpan ssid)
266+
CHIP_ERROR SlWiFiDriver::StartScanWiFiNetworks(ByteSpan ssid)
267267
{
268268
ChipLogProgress(DeviceLayer, "Start Scan WiFi Networks");
269-
270-
CHIP_ERROR err = wfx_start_scan(ssid, OnScanWiFiNetworkDone);
271-
if (err != CHIP_NO_ERROR)
272-
{
273-
ChipLogError(DeviceLayer, "wfx_start_scan failed : %s", chip::ErrorStr(err));
274-
return false;
275-
}
276-
return true;
269+
return wfx_start_scan(ssid, OnScanWiFiNetworkDone);
277270
}
278271

279272
void SlWiFiDriver::OnScanWiFiNetworkDone(wfx_wifi_scan_result_t * aScanResult)
@@ -318,7 +311,7 @@ void SlWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * callba
318311
if (callback != nullptr)
319312
{
320313
mpScanCallback = callback;
321-
if (!StartScanWiFiNetworks(ssid))
314+
if (StartScanWiFiNetworks(ssid) != CHIP_NO_ERROR)
322315
{
323316
ChipLogError(DeviceLayer, "ScanWiFiNetworks failed to start");
324317
mpScanCallback = nullptr;

src/platform/silabs/NetworkCommissioningWiFiDriver.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class SlWiFiDriver final : public WiFiDriver
134134

135135
private:
136136
bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId);
137-
bool StartScanWiFiNetworks(ByteSpan ssid);
137+
CHIP_ERROR StartScanWiFiNetworks(ByteSpan ssid);
138138
static void OnScanWiFiNetworkDone(wfx_wifi_scan_result_t * aScanResult);
139139

140140
WiFiNetwork mSavedNetwork = {};

0 commit comments

Comments
 (0)