Skip to content

Commit 4711187

Browse files
shubhamdppull[bot]
authored andcommitted
[ESP32] Updating country in phy layer is only supported on wifi SoCs (#27520)
1 parent 414f789 commit 4711187

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/platform/ESP32/ConfigurationManagerImpl.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,13 @@ CHIP_ERROR ConfigurationManagerImpl::StoreCountryCode(const char * code, size_t
241241
{
242242
// As per spec, codeLen has to be 2
243243
VerifyOrReturnError((code != nullptr) && (codeLen == 2), CHIP_ERROR_INVALID_ARGUMENT);
244+
245+
// Setting country is only possible on WiFi supported SoCs
246+
#if CONFIG_ESP32_WIFI_ENABLED
244247
// Write CountryCode to esp_phy layer
245248
ReturnErrorOnFailure(MapConfigError(esp_phy_update_country_info(code)));
249+
#endif
250+
246251
// As we do not have API to read country code from esp_phy layer, we are writing to NVS and when client reads the
247252
// CountryCode then we read from NVS
248253
return GenericConfigurationManagerImpl<ESP32Config>::StoreCountryCode(code, codeLen);

0 commit comments

Comments
 (0)