diff --git a/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp b/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp index 47b64d3db73755..b051a44a44a0d5 100644 --- a/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp +++ b/src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp @@ -170,12 +170,11 @@ CHIP_ERROR BLWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, // - 64 bytes: WPA/WPA2/WPA3 raw hex PSK // Note 10 hex WEP64 and 13 bytes / 26 hex WEP128 passphrase are covered by 8~63 bytes WPA passphrase, so we don't check WEP64 // hex and WEP128 passphrase. - if (keyLen ==BLWiFiDriver::WiFiCredentialLength::kOpen || keyLen == BLWiFiDriver::WiFiCredentialLength::kWEP64 || - (keyLen >= BLWiFiDriver::WiFiCredentialLength::kMinWPAPSK && - keyLen <= BLWiFiDriver::WiFiCredentialLength::kMaxWPAPSK)) + if (keyLen == BLWiFiDriver::WiFiCredentialLength::kOpen || keyLen == BLWiFiDriver::WiFiCredentialLength::kWEP64 || + (keyLen >= BLWiFiDriver::WiFiCredentialLength::kMinWPAPSK && keyLen <= BLWiFiDriver::WiFiCredentialLength::kMaxWPAPSK)) { - if (keyLen==BLWiFiDriver::WiFiCredentialLength::kOpen) + if (keyLen == BLWiFiDriver::WiFiCredentialLength::kOpen) { wifi_mgmr_sta_connect(&wifi_interface, wifi_ssid, NULL, NULL, NULL, 0, 0); } diff --git a/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.cpp b/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.cpp index 2764220505ce87..252a1eba7f2475 100644 --- a/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.cpp +++ b/src/platform/bouffalolab/BL702/NetworkCommissioningDriver.cpp @@ -142,12 +142,11 @@ CHIP_ERROR BLWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, // - 64 bytes: WPA/WPA2/WPA3 raw hex PSK // Note 10 hex WEP64 and 13 bytes / 26 hex WEP128 passphrase are covered by 8~63 bytes WPA passphrase, so we don't check WEP64 // hex and WEP128 passphrase. - if (keyLen ==BLWiFiDriver::WiFiCredentialLength::kOpen || keyLen == BLWiFiDriver::WiFiCredentialLength::kWEP64 || - (keyLen >= BLWiFiDriver::WiFiCredentialLength::kMinWPAPSK && - keyLen <= BLWiFiDriver::WiFiCredentialLength::kMaxWPAPSK)) + if (keyLen == BLWiFiDriver::WiFiCredentialLength::kOpen || keyLen == BLWiFiDriver::WiFiCredentialLength::kWEP64 || + (keyLen >= BLWiFiDriver::WiFiCredentialLength::kMinWPAPSK && keyLen <= BLWiFiDriver::WiFiCredentialLength::kMaxWPAPSK)) { - if (keyLen==BLWiFiDriver::WiFiCredentialLength::kOpen) + if (keyLen == BLWiFiDriver::WiFiCredentialLength::kOpen) { wifiInterface_connect((char *) ssid, NULL); }