From e4c82d39dd2860574dd46d3901ca1ba842e573d0 Mon Sep 17 00:00:00 2001 From: Karsten Sperling <113487422+ksperling-apple@users.noreply.github.com> Date: Thu, 17 Aug 2023 17:15:49 +1200 Subject: [PATCH] Remove dead code from ConfigurationManagerImpl (#28715) * Remove dead code from ConfigurationManagerImpl GetWiFiStationSecurityType and UpdateWiFiStationSecurityType are unused. * Remove unused kConfigKey_WiFiStationSecType ... from platforms where it is just a constant. --- src/platform/Ameba/AmebaConfig.cpp | 1 - src/platform/Ameba/AmebaConfig.h | 1 - src/platform/Beken/BekenConfig.cpp | 1 - src/platform/Beken/BekenConfig.h | 1 - src/platform/ESP32/ESP32Config.cpp | 1 - src/platform/ESP32/ESP32Config.h | 1 - .../Linux/ConfigurationManagerImpl.cpp | 40 ------------------- src/platform/Linux/ConfigurationManagerImpl.h | 5 --- src/platform/Linux/PosixConfig.cpp | 1 - src/platform/Linux/PosixConfig.h | 1 - src/platform/Tizen/PosixConfig.cpp | 1 - src/platform/Tizen/PosixConfig.h | 1 - src/platform/android/AndroidConfig.cpp | 1 - src/platform/android/AndroidConfig.h | 1 - .../android/ConfigurationManagerImpl.cpp | 12 ------ .../android/ConfigurationManagerImpl.h | 5 --- src/platform/bouffalolab/common/BLConfig.h | 1 - src/platform/cc32xx/CC32XXConfig.cpp | 1 - src/platform/cc32xx/CC32XXConfig.h | 1 - src/platform/mbed/MbedConfig.cpp | 1 - src/platform/mbed/MbedConfig.h | 1 - .../webos/ConfigurationManagerImpl.cpp | 40 ------------------- src/platform/webos/ConfigurationManagerImpl.h | 5 --- src/platform/webos/PosixConfig.cpp | 1 - src/platform/webos/PosixConfig.h | 1 - 25 files changed, 126 deletions(-) diff --git a/src/platform/Ameba/AmebaConfig.cpp b/src/platform/Ameba/AmebaConfig.cpp index e91905ef17fd10..6ac7948da07794 100644 --- a/src/platform/Ameba/AmebaConfig.cpp +++ b/src/platform/Ameba/AmebaConfig.cpp @@ -71,7 +71,6 @@ const AmebaConfig::Key AmebaConfig::kConfigKey_PairedAccountId = { k const AmebaConfig::Key AmebaConfig::kConfigKey_ServiceId = { kConfigNamespace_ChipConfig, "service-id" }; const AmebaConfig::Key AmebaConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const AmebaConfig::Key AmebaConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const AmebaConfig::Key AmebaConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const AmebaConfig::Key AmebaConfig::kConfigKey_OperationalDeviceId = { kConfigNamespace_ChipConfig, "op-device-id" }; const AmebaConfig::Key AmebaConfig::kConfigKey_OperationalDeviceCert = { kConfigNamespace_ChipConfig, "op-device-cert" }; const AmebaConfig::Key AmebaConfig::kConfigKey_OperationalDeviceICACerts = { kConfigNamespace_ChipConfig, "op-device-ca-certs" }; diff --git a/src/platform/Ameba/AmebaConfig.h b/src/platform/Ameba/AmebaConfig.h index 21bf9596aa09d6..0c78e0e3a742bd 100755 --- a/src/platform/Ameba/AmebaConfig.h +++ b/src/platform/Ameba/AmebaConfig.h @@ -55,7 +55,6 @@ class AmebaConfig static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_OperationalDeviceId; static const Key kConfigKey_OperationalDeviceCert; static const Key kConfigKey_OperationalDeviceICACerts; diff --git a/src/platform/Beken/BekenConfig.cpp b/src/platform/Beken/BekenConfig.cpp index 8fd6fd604edb68..60e2cdb09645f7 100644 --- a/src/platform/Beken/BekenConfig.cpp +++ b/src/platform/Beken/BekenConfig.cpp @@ -71,7 +71,6 @@ const BekenConfig::Key BekenConfig::kConfigKey_ServiceId = { k const BekenConfig::Key BekenConfig::kConfigKey_GroupKeyIndex = { kConfigNamespace_ChipConfig, "group-key-index" }; const BekenConfig::Key BekenConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const BekenConfig::Key BekenConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const BekenConfig::Key BekenConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const BekenConfig::Key BekenConfig::kConfigKey_OperationalDeviceId = { kConfigNamespace_ChipConfig, "op-device-id" }; const BekenConfig::Key BekenConfig::kConfigKey_OperationalDeviceCert = { kConfigNamespace_ChipConfig, "op-device-cert" }; const BekenConfig::Key BekenConfig::kConfigKey_OperationalDeviceICACerts = { kConfigNamespace_ChipConfig, "op-device-ca-certs" }; diff --git a/src/platform/Beken/BekenConfig.h b/src/platform/Beken/BekenConfig.h index 7913e3922f4381..94362c092296f8 100755 --- a/src/platform/Beken/BekenConfig.h +++ b/src/platform/Beken/BekenConfig.h @@ -55,7 +55,6 @@ class BekenConfig static const Key kConfigKey_GroupKeyIndex; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_OperationalDeviceId; static const Key kConfigKey_OperationalDeviceCert; static const Key kConfigKey_OperationalDeviceICACerts; diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index a536d46ef722c3..37bfe68d7e0d56 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -85,7 +85,6 @@ const ESP32Config::Key ESP32Config::kConfigKey_PairedAccountId = { kConfigNam const ESP32Config::Key ESP32Config::kConfigKey_ServiceId = { kConfigNamespace_ChipConfig, "service-id" }; const ESP32Config::Key ESP32Config::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const ESP32Config::Key ESP32Config::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const ESP32Config::Key ESP32Config::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const ESP32Config::Key ESP32Config::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "reg-location" }; const ESP32Config::Key ESP32Config::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const ESP32Config::Key ESP32Config::kConfigKey_UniqueId = { kConfigNamespace_ChipConfig, "unique-id" }; diff --git a/src/platform/ESP32/ESP32Config.h b/src/platform/ESP32/ESP32Config.h index e07d98eba27594..5804f53105c20c 100644 --- a/src/platform/ESP32/ESP32Config.h +++ b/src/platform/ESP32/ESP32Config.h @@ -87,7 +87,6 @@ class ESP32Config static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; static const Key kConfigKey_UniqueId; diff --git a/src/platform/Linux/ConfigurationManagerImpl.cpp b/src/platform/Linux/ConfigurationManagerImpl.cpp index f5d163487f12f9..92e2c1e290b7bc 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.cpp +++ b/src/platform/Linux/ConfigurationManagerImpl.cpp @@ -200,46 +200,6 @@ CHIP_ERROR ConfigurationManagerImpl::WritePersistedStorageValue(::chip::Platform return WriteConfigValue(configKey, value); } -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION -CHIP_ERROR ConfigurationManagerImpl::GetWiFiStationSecurityType(WiFiAuthSecurityType & secType) -{ - CHIP_ERROR err; - uint32_t secTypeInt; - - err = ReadConfigValue(PosixConfig::kConfigKey_WiFiStationSecType, secTypeInt); - if (err == CHIP_NO_ERROR) - { - secType = static_cast(secTypeInt); - } - return err; -} - -CHIP_ERROR ConfigurationManagerImpl::UpdateWiFiStationSecurityType(WiFiAuthSecurityType secType) -{ - CHIP_ERROR err; - WiFiAuthSecurityType curSecType; - - if (secType != kWiFiSecurityType_NotSpecified) - { - err = GetWiFiStationSecurityType(curSecType); - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND || (err == CHIP_NO_ERROR && secType != curSecType)) - { - uint32_t secTypeInt = static_cast(secType); - err = WriteConfigValue(PosixConfig::kConfigKey_WiFiStationSecType, secTypeInt); - } - SuccessOrExit(err); - } - else - { - err = PosixConfig::ClearConfigValue(PosixConfig::kConfigKey_WiFiStationSecType); - SuccessOrExit(err); - } - -exit: - return err; -} -#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - CHIP_ERROR ConfigurationManagerImpl::ReadConfigValue(Key key, bool & val) { return PosixConfig::ReadConfigValue(key, val); diff --git a/src/platform/Linux/ConfigurationManagerImpl.h b/src/platform/Linux/ConfigurationManagerImpl.h index ecf5aea77830b3..760b3d07cc3a26 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.h +++ b/src/platform/Linux/ConfigurationManagerImpl.h @@ -60,11 +60,6 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override; CHIP_ERROR WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t value) override; -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - CHIP_ERROR GetWiFiStationSecurityType(Internal::WiFiAuthSecurityType & secType); - CHIP_ERROR UpdateWiFiStationSecurityType(Internal::WiFiAuthSecurityType secType); -#endif - // NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>. CHIP_ERROR WriteConfigValue(Key key, uint16_t val); CHIP_ERROR ReadConfigValue(Key key, uint16_t & val); diff --git a/src/platform/Linux/PosixConfig.cpp b/src/platform/Linux/PosixConfig.cpp index 6daa22e4f78525..61a1fbd4dda6ed 100644 --- a/src/platform/Linux/PosixConfig.cpp +++ b/src/platform/Linux/PosixConfig.cpp @@ -69,7 +69,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_PairedAccountId = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_ServiceId = { kConfigNamespace_ChipConfig, "service-id" }; const PosixConfig::Key PosixConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const PosixConfig::Key PosixConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_LocationCapability = { kConfigNamespace_ChipConfig, "location-capability" }; diff --git a/src/platform/Linux/PosixConfig.h b/src/platform/Linux/PosixConfig.h index e8370a3e1c0a72..c04d4a9be1093f 100644 --- a/src/platform/Linux/PosixConfig.h +++ b/src/platform/Linux/PosixConfig.h @@ -68,7 +68,6 @@ class PosixConfig static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; diff --git a/src/platform/Tizen/PosixConfig.cpp b/src/platform/Tizen/PosixConfig.cpp index c8b2d36d8271bf..e6f18834ef6396 100644 --- a/src/platform/Tizen/PosixConfig.cpp +++ b/src/platform/Tizen/PosixConfig.cpp @@ -62,7 +62,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_PairedAccountId = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_ServiceId = { kConfigNamespace_ChipConfig, "service-id" }; const PosixConfig::Key PosixConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const PosixConfig::Key PosixConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_UniqueId = { kConfigNamespace_ChipConfig, "unique-id" }; diff --git a/src/platform/Tizen/PosixConfig.h b/src/platform/Tizen/PosixConfig.h index 9c5402cadaaf34..a5d8d6a6a8d45d 100644 --- a/src/platform/Tizen/PosixConfig.h +++ b/src/platform/Tizen/PosixConfig.h @@ -66,7 +66,6 @@ class PosixConfig static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; diff --git a/src/platform/android/AndroidConfig.cpp b/src/platform/android/AndroidConfig.cpp index b2e33571598e64..1afc796cf97dce 100644 --- a/src/platform/android/AndroidConfig.cpp +++ b/src/platform/android/AndroidConfig.cpp @@ -87,7 +87,6 @@ const AndroidConfig::Key AndroidConfig::kConfigKey_PairedAccountId = { kConfi const AndroidConfig::Key AndroidConfig::kConfigKey_ServiceId = { kConfigNamespace_ChipConfig, "service-id" }; const AndroidConfig::Key AndroidConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const AndroidConfig::Key AndroidConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const AndroidConfig::Key AndroidConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const AndroidConfig::Key AndroidConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const AndroidConfig::Key AndroidConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; diff --git a/src/platform/android/AndroidConfig.h b/src/platform/android/AndroidConfig.h index d6f446d0fc4ee6..899dc0f5b6f9ae 100644 --- a/src/platform/android/AndroidConfig.h +++ b/src/platform/android/AndroidConfig.h @@ -67,7 +67,6 @@ class AndroidConfig static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; diff --git a/src/platform/android/ConfigurationManagerImpl.cpp b/src/platform/android/ConfigurationManagerImpl.cpp index 68a102007d156c..535698a312f3a0 100644 --- a/src/platform/android/ConfigurationManagerImpl.cpp +++ b/src/platform/android/ConfigurationManagerImpl.cpp @@ -141,18 +141,6 @@ void ConfigurationManagerImpl::RunConfigUnitTest(void) AndroidConfig::RunConfigUnitTest(); } -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION -CHIP_ERROR ConfigurationManagerImpl::GetWiFiStationSecurityType(WiFiAuthSecurityType & secType) -{ - return CHIP_ERROR_NOT_IMPLEMENTED; -} - -CHIP_ERROR ConfigurationManagerImpl::UpdateWiFiStationSecurityType(WiFiAuthSecurityType secType) -{ - return CHIP_ERROR_NOT_IMPLEMENTED; -} -#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - void ConfigurationManagerImpl::DoFactoryReset(intptr_t arg) { return; diff --git a/src/platform/android/ConfigurationManagerImpl.h b/src/platform/android/ConfigurationManagerImpl.h index 213a6e32d6ff95..51b04eb3e8812a 100644 --- a/src/platform/android/ConfigurationManagerImpl.h +++ b/src/platform/android/ConfigurationManagerImpl.h @@ -52,11 +52,6 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override; CHIP_ERROR WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t value) override; -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - CHIP_ERROR GetWiFiStationSecurityType(Internal::WiFiAuthSecurityType & secType); - CHIP_ERROR UpdateWiFiStationSecurityType(Internal::WiFiAuthSecurityType secType); -#endif - // NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>. // ===== Members that implement the GenericConfigurationManagerImpl protected interface. diff --git a/src/platform/bouffalolab/common/BLConfig.h b/src/platform/bouffalolab/common/BLConfig.h index 1bd80117119a46..5c11160b3b0dd6 100644 --- a/src/platform/bouffalolab/common/BLConfig.h +++ b/src/platform/bouffalolab/common/BLConfig.h @@ -56,7 +56,6 @@ class BLConfig static constexpr const char * kConfigKey_HardwareVersion = ("hardware-ver"); static constexpr const char * kConfigKey_LastUsedEpochKeyId = ("last-ek-id"); static constexpr const char * kConfigKey_FailSafeArmed = ("fail-safe-armed"); - static constexpr const char * kConfigKey_WiFiStationSecType = ("sta-sec-type"); static constexpr const char * kConfigKey_OperationalDeviceId = ("op-device-id"); static constexpr const char * kConfigKey_OperationalDeviceCert = ("op-device-cert"); static constexpr const char * kConfigKey_OperationalDeviceICACerts = ("op-device-ca-certs"); diff --git a/src/platform/cc32xx/CC32XXConfig.cpp b/src/platform/cc32xx/CC32XXConfig.cpp index b6ed391b25fea0..599403b6868d70 100644 --- a/src/platform/cc32xx/CC32XXConfig.cpp +++ b/src/platform/cc32xx/CC32XXConfig.cpp @@ -309,7 +309,6 @@ const CC32XXConfig::Key CC32XXConfig::kConfigKey_FabricSecret = { "TI_kCon const CC32XXConfig::Key CC32XXConfig::kConfigKey_GroupKeyIndex = { "TI_kConfigKey_GroupKeyIndex" }; const CC32XXConfig::Key CC32XXConfig::kConfigKey_LastUsedEpochKeyId = { "TI_kConfigKey_LastUsedEpochKeyId" }; const CC32XXConfig::Key CC32XXConfig::kConfigKey_FailSafeArmed = { "TI_kConfigKey_FailSafeArmed" }; -const CC32XXConfig::Key CC32XXConfig::kConfigKey_WiFiStationSecType = { "TI_kConfigKey_WiFiStationSecType" }; const CC32XXConfig::Key CC32XXConfig::kConfigKey_RegulatoryLocation = { "TI_kConfigKey_RegulatoryLocation" }; const CC32XXConfig::Key CC32XXConfig::kConfigKey_CountryCode = { "TI_kConfigKey_CountryCode" }; const CC32XXConfig::Key CC32XXConfig::kConfigKey_Breadcrumb = { "TI_kConfigKey_Breadcrumb" }; diff --git a/src/platform/cc32xx/CC32XXConfig.h b/src/platform/cc32xx/CC32XXConfig.h index 5824afa3d50042..8179d9877a4489 100644 --- a/src/platform/cc32xx/CC32XXConfig.h +++ b/src/platform/cc32xx/CC32XXConfig.h @@ -52,7 +52,6 @@ class CC32XXConfig static const Key kConfigKey_GroupKeyIndex; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; static const Key kConfigKey_Breadcrumb; diff --git a/src/platform/mbed/MbedConfig.cpp b/src/platform/mbed/MbedConfig.cpp index 81f8f98da1a57d..63d5f87295c145 100644 --- a/src/platform/mbed/MbedConfig.cpp +++ b/src/platform/mbed/MbedConfig.cpp @@ -81,7 +81,6 @@ const MbedConfig::Key MbedConfig::kConfigKey_PairedAccountId = { CONFIG_KEY(" const MbedConfig::Key MbedConfig::kConfigKey_ServiceId = { CONFIG_KEY("service-id") }; const MbedConfig::Key MbedConfig::kConfigKey_LastUsedEpochKeyId = { CONFIG_KEY("last-ek-id") }; const MbedConfig::Key MbedConfig::kConfigKey_FailSafeArmed = { CONFIG_KEY("fail-safe-armed") }; -const MbedConfig::Key MbedConfig::kConfigKey_WiFiStationSecType = { CONFIG_KEY("sta-sec-type") }; const MbedConfig::Key MbedConfig::kConfigKey_RegulatoryLocation = { CONFIG_KEY("regulatory-location") }; const MbedConfig::Key MbedConfig::kConfigKey_CountryCode = { CONFIG_KEY("country-code") }; const MbedConfig::Key MbedConfig::kConfigKey_UniqueId = { CONFIG_KEY("unique-id") }; diff --git a/src/platform/mbed/MbedConfig.h b/src/platform/mbed/MbedConfig.h index f9f82bc06c779f..70b1dfa6890a24 100644 --- a/src/platform/mbed/MbedConfig.h +++ b/src/platform/mbed/MbedConfig.h @@ -65,7 +65,6 @@ class MbedConfig static const Key kConfigKey_ServiceId; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode; diff --git a/src/platform/webos/ConfigurationManagerImpl.cpp b/src/platform/webos/ConfigurationManagerImpl.cpp index 6958e4adeff9dd..710840fe5aca29 100644 --- a/src/platform/webos/ConfigurationManagerImpl.cpp +++ b/src/platform/webos/ConfigurationManagerImpl.cpp @@ -180,46 +180,6 @@ CHIP_ERROR ConfigurationManagerImpl::WritePersistedStorageValue(::chip::Platform return WriteConfigValue(configKey, value); } -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION -CHIP_ERROR ConfigurationManagerImpl::GetWiFiStationSecurityType(WiFiAuthSecurityType & secType) -{ - CHIP_ERROR err; - uint32_t secTypeInt; - - err = ReadConfigValue(PosixConfig::kConfigKey_WiFiStationSecType, secTypeInt); - if (err == CHIP_NO_ERROR) - { - secType = static_cast(secTypeInt); - } - return err; -} - -CHIP_ERROR ConfigurationManagerImpl::UpdateWiFiStationSecurityType(WiFiAuthSecurityType secType) -{ - CHIP_ERROR err; - WiFiAuthSecurityType curSecType; - - if (secType != kWiFiSecurityType_NotSpecified) - { - err = GetWiFiStationSecurityType(curSecType); - if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND || (err == CHIP_NO_ERROR && secType != curSecType)) - { - uint32_t secTypeInt = static_cast(secType); - err = WriteConfigValue(PosixConfig::kConfigKey_WiFiStationSecType, secTypeInt); - } - SuccessOrExit(err); - } - else - { - err = PosixConfig::ClearConfigValue(PosixConfig::kConfigKey_WiFiStationSecType); - SuccessOrExit(err); - } - -exit: - return err; -} -#endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - CHIP_ERROR ConfigurationManagerImpl::ReadConfigValue(Key key, bool & val) { return PosixConfig::ReadConfigValue(key, val); diff --git a/src/platform/webos/ConfigurationManagerImpl.h b/src/platform/webos/ConfigurationManagerImpl.h index 6fc9961d6e50c0..53746fe964c76a 100644 --- a/src/platform/webos/ConfigurationManagerImpl.h +++ b/src/platform/webos/ConfigurationManagerImpl.h @@ -60,11 +60,6 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp CHIP_ERROR ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value) override; CHIP_ERROR WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t value) override; -#if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION - CHIP_ERROR GetWiFiStationSecurityType(Internal::WiFiAuthSecurityType & secType); - CHIP_ERROR UpdateWiFiStationSecurityType(Internal::WiFiAuthSecurityType secType); -#endif - // NOTE: Other public interface methods are implemented by GenericConfigurationManagerImpl<>. CHIP_ERROR WriteConfigValue(Key key, uint16_t val); CHIP_ERROR ReadConfigValue(Key key, uint16_t & val); diff --git a/src/platform/webos/PosixConfig.cpp b/src/platform/webos/PosixConfig.cpp index b35ab54cf8c029..79cbd2e0eaa49b 100644 --- a/src/platform/webos/PosixConfig.cpp +++ b/src/platform/webos/PosixConfig.cpp @@ -72,7 +72,6 @@ const PosixConfig::Key PosixConfig::kConfigKey_FabricSecret = { kConfigNam const PosixConfig::Key PosixConfig::kConfigKey_GroupKeyIndex = { kConfigNamespace_ChipConfig, "group-key-index" }; const PosixConfig::Key PosixConfig::kConfigKey_LastUsedEpochKeyId = { kConfigNamespace_ChipConfig, "last-ek-id" }; const PosixConfig::Key PosixConfig::kConfigKey_FailSafeArmed = { kConfigNamespace_ChipConfig, "fail-safe-armed" }; -const PosixConfig::Key PosixConfig::kConfigKey_WiFiStationSecType = { kConfigNamespace_ChipConfig, "sta-sec-type" }; const PosixConfig::Key PosixConfig::kConfigKey_RegulatoryLocation = { kConfigNamespace_ChipConfig, "regulatory-location" }; const PosixConfig::Key PosixConfig::kConfigKey_CountryCode = { kConfigNamespace_ChipConfig, "country-code" }; const PosixConfig::Key PosixConfig::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; diff --git a/src/platform/webos/PosixConfig.h b/src/platform/webos/PosixConfig.h index a7cd7028608421..8835bd04c60310 100644 --- a/src/platform/webos/PosixConfig.h +++ b/src/platform/webos/PosixConfig.h @@ -71,7 +71,6 @@ class PosixConfig static const Key kConfigKey_GroupKeyIndex; static const Key kConfigKey_LastUsedEpochKeyId; static const Key kConfigKey_FailSafeArmed; - static const Key kConfigKey_WiFiStationSecType; static const Key kConfigKey_SetupDiscriminator; static const Key kConfigKey_RegulatoryLocation; static const Key kConfigKey_CountryCode;