Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and shchen-Lab committed Sep 7, 2023
1 parent aea5246 commit 21a2b7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/platform/bouffalolab/BL602/NetworkCommissioningDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
7 changes: 3 additions & 4 deletions src/platform/bouffalolab/BL702/NetworkCommissioningDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 21a2b7b

Please sign in to comment.