Skip to content

Commit a461207

Browse files
authored
[ESP32] Implement GetSupportedWiFiBandsMask() API (#31437)
1 parent 7ef397e commit a461207

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/platform/ESP32/NetworkCommissioningDriver.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,12 @@ void ESPWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * callb
433433
}
434434
}
435435

436+
uint32_t ESPWiFiDriver::GetSupportedWiFiBandsMask() const
437+
{
438+
uint32_t bands = static_cast<uint32_t>(1UL << chip::to_underlying(WiFiBandEnum::k2g4));
439+
return bands;
440+
}
441+
436442
CHIP_ERROR ESPWiFiDriver::SetLastDisconnectReason(const ChipDeviceEvent * event)
437443
{
438444
VerifyOrReturnError(event->Type == DeviceEventType::kESPSystemEvent && event->Platform.ESPSystemEvent.Base == WIFI_EVENT &&

src/platform/ESP32/NetworkCommissioningDriver.h

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ class ESPWiFiDriver final : public WiFiDriver
112112
Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText,
113113
uint8_t & outNetworkIndex) override;
114114
void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override;
115+
uint32_t GetSupportedWiFiBandsMask() const override;
115116

116117
CHIP_ERROR ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen);
117118
void OnConnectWiFiNetwork();

0 commit comments

Comments
 (0)