From 1187635a4061fe01a88ddee58de0a2f9a5d05c65 Mon Sep 17 00:00:00 2001 From: Shubham Patil Date: Tue, 16 Jan 2024 16:01:12 +0530 Subject: [PATCH] [ESP32] Implement GetSupportedWiFiBandsMask() API (#31437) --- src/platform/ESP32/NetworkCommissioningDriver.cpp | 6 ++++++ src/platform/ESP32/NetworkCommissioningDriver.h | 1 + 2 files changed, 7 insertions(+) diff --git a/src/platform/ESP32/NetworkCommissioningDriver.cpp b/src/platform/ESP32/NetworkCommissioningDriver.cpp index 80e54d74803e7e..2871c4c3f2031d 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.cpp +++ b/src/platform/ESP32/NetworkCommissioningDriver.cpp @@ -433,6 +433,12 @@ void ESPWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * callb } } +uint32_t ESPWiFiDriver::GetSupportedWiFiBandsMask() const +{ + uint32_t bands = static_cast(1UL << chip::to_underlying(WiFiBandEnum::k2g4)); + return bands; +} + CHIP_ERROR ESPWiFiDriver::SetLastDisconnectReason(const ChipDeviceEvent * event) { VerifyOrReturnError(event->Type == DeviceEventType::kESPSystemEvent && event->Platform.ESPSystemEvent.Base == WIFI_EVENT && diff --git a/src/platform/ESP32/NetworkCommissioningDriver.h b/src/platform/ESP32/NetworkCommissioningDriver.h index 5a2ca8f44d61c1..447d6346dcbd1c 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.h +++ b/src/platform/ESP32/NetworkCommissioningDriver.h @@ -112,6 +112,7 @@ class ESPWiFiDriver final : public WiFiDriver Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) override; void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override; + uint32_t GetSupportedWiFiBandsMask() const override; CHIP_ERROR ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen); void OnConnectWiFiNetwork();