diff --git a/src/platform/Linux/CHIPDevicePlatformConfig.h b/src/platform/Linux/CHIPDevicePlatformConfig.h index a2c98a393d2c92..f5b16017464405 100644 --- a/src/platform/Linux/CHIPDevicePlatformConfig.h +++ b/src/platform/Linux/CHIPDevicePlatformConfig.h @@ -25,8 +25,8 @@ // ==================== Platform Adaptations ==================== -#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 0 -#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0 +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 1 #ifndef CHIP_DEVICE_CONFIG_ENABLE_THREAD #define CHIP_DEVICE_CONFIG_ENABLE_THREAD CHIP_ENABLE_OPENTHREAD diff --git a/src/platform/Linux/ConfigurationManagerImpl.cpp b/src/platform/Linux/ConfigurationManagerImpl.cpp index 57090c6da33a1b..edd040353308bf 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.cpp +++ b/src/platform/Linux/ConfigurationManagerImpl.cpp @@ -131,7 +131,7 @@ CHIP_ERROR ConfigurationManagerImpl::_WritePersistedStorageValue(::chip::Platfor } #if CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION -CHIP_ERROR ConfigurationManagerImpl::GetWiFiStationSecurityType(Profiles::NetworkProvisioning::WiFiSecurityType & secType) +CHIP_ERROR ConfigurationManagerImpl::GetWiFiStationSecurityType(WiFiAuthSecurityType & secType) { CHIP_ERROR err; uint32_t secTypeInt; @@ -139,22 +139,22 @@ CHIP_ERROR ConfigurationManagerImpl::GetWiFiStationSecurityType(Profiles::Networ err = ReadConfigValue(kConfigKey_WiFiStationSecType, secTypeInt); if (err == CHIP_NO_ERROR) { - secType = (Profiles::NetworkProvisioning::WiFiSecurityType) secTypeInt; + secType = static_cast(secTypeInt); } return err; } -CHIP_ERROR ConfigurationManagerImpl::UpdateWiFiStationSecurityType(Profiles::NetworkProvisioning::WiFiSecurityType secType) +CHIP_ERROR ConfigurationManagerImpl::UpdateWiFiStationSecurityType(WiFiAuthSecurityType secType) { CHIP_ERROR err; - Profiles::NetworkProvisioning::WiFiSecurityType curSecType; + WiFiAuthSecurityType curSecType; - if (secType != Profiles::NetworkProvisioning::kWiFiSecurityType_NotSpecified) + if (secType != kWiFiSecurityType_NotSpecified) { err = GetWiFiStationSecurityType(curSecType); if (err == CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND || (err == CHIP_NO_ERROR && secType != curSecType)) { - uint32_t secTypeInt = secType; + uint32_t secTypeInt = static_cast(secType); err = WriteConfigValue(kConfigKey_WiFiStationSecType, secTypeInt); } SuccessOrExit(err); diff --git a/src/platform/Linux/ConfigurationManagerImpl.h b/src/platform/Linux/ConfigurationManagerImpl.h index 7a717ea2f0429c..6b73a0857bfac6 100644 --- a/src/platform/Linux/ConfigurationManagerImpl.h +++ b/src/platform/Linux/ConfigurationManagerImpl.h @@ -23,6 +23,7 @@ #pragma once +#include "platform/internal/DeviceNetworkInfo.h" #include #include @@ -57,6 +58,11 @@ class ConfigurationManagerImpl final : public ConfigurationManager, CHIP_ERROR _ReadPersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t & value); CHIP_ERROR _WritePersistedStorageValue(::chip::Platform::PersistedStorage::Key key, uint32_t value); +#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 for internal use by the following friends. diff --git a/src/protocols/Protocols.h b/src/protocols/Protocols.h index 9f47fcd86767dd..deeec5b4e6aae4 100644 --- a/src/protocols/Protocols.h +++ b/src/protocols/Protocols.h @@ -71,14 +71,13 @@ class Id static constexpr Protocols::Id Id(VendorId::Common, id); \ } // namespace name. -CHIP_STANDARD_PROTOCOL(SecureChannel, 0x0000) // Secure Channel Protocol -CHIP_STANDARD_PROTOCOL(Echo, 0x0002) // Echo Protocol -CHIP_STANDARD_PROTOCOL(BDX, 0x0003) // Bulk Data Exchange Protocol -CHIP_STANDARD_PROTOCOL(NetworkProvisioning, 0x0004) // Network Provisioning Protocol -CHIP_STANDARD_PROTOCOL(InteractionModel, 0x0005) // Interaction Model Protocol -CHIP_STANDARD_PROTOCOL(FabricProvisioning, 0x0006) // Fabric Provisioning Protocol -CHIP_STANDARD_PROTOCOL(ServiceProvisioning, 0x0007) // Service Provisioning Protocol -CHIP_STANDARD_PROTOCOL(OpCredentials, 0x0008) // Operational Credentials +CHIP_STANDARD_PROTOCOL(SecureChannel, 0x0000) // Secure Channel Protocol +CHIP_STANDARD_PROTOCOL(Echo, 0x0001) // Echo Protocol +CHIP_STANDARD_PROTOCOL(BDX, 0x0002) // Bulk Data Exchange Protocol +CHIP_STANDARD_PROTOCOL(UserDirectedCommissioning, 0x0003) // User Directed Commissioning Protocol +CHIP_STANDARD_PROTOCOL(InteractionModel, 0x0005) // Interaction Model Protocol +CHIP_STANDARD_PROTOCOL(ServiceProvisioning, 0x0007) // Service Provisioning Protocol +CHIP_STANDARD_PROTOCOL(OpCredentials, 0x0008) // Operational Credentials CHIP_STANDARD_PROTOCOL(TempZCL, 0x0009) // For carrying ZCL-compatible messages, to be removed when we no longer use them #undef CHIP_STANDARD_PROTOCOL