diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index 2f335189c516d0..93cd0bd850002e 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -54,9 +54,6 @@ namespace { // For WiFi and Thread scan results, each item will cost ~60 bytes in TLV, thus 15 is a safe upper bound of scan results. constexpr size_t kMaxNetworksInScanResponse = 15; -// The maximum number of Wi-Fi bands a device can support. -constexpr size_t kMaxWiFiBands = 6; - #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC constexpr size_t kPossessionNonceSize = 32; #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC @@ -274,7 +271,8 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute); #else VerifyOrReturnError(mFeatureFlags.Has(Feature::kWiFiNetworkInterface), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute)); - + // The maximum number of Wi-Fi bands a device can support. + constexpr size_t kMaxWiFiBands = 6; return aEncoder.EncodeList([this](const auto & encoder) -> CHIP_ERROR { WiFiBand bandsBuffer[kMaxWiFiBands]; Span bands(bandsBuffer);