diff options
author | Ashok Vuyyuru <avuyyuru@codeaurora.org> | 2021-03-10 18:46:05 +0530 |
---|---|---|
committer | Ashok Vuyyuru <avuyyuru@codeaurora.org> | 2021-04-16 17:23:46 +0530 |
commit | 50f23c6f764895581a96dd7362ed883951752c72 (patch) | |
tree | b0e780abde775bdda35dd4711e377db219e33e89 /ipacm/src/IPACM_Config.cpp | |
parent | 65b72aca50c99d5ca55524249b9a5206a26dfca2 (diff) | |
download | ipacfg-mgr-50f23c6f764895581a96dd7362ed883951752c72.tar.gz |
ipacm: Adding changes to disable Eth Bridging Support
In Yupik target it won't support ETH Bridging commands
So disabling this feature.
Change-Id: I32fc56718b92927dc18eb2d35388a46a228507b0
Diffstat (limited to 'ipacm/src/IPACM_Config.cpp')
-rw-r--r-- | ipacm/src/IPACM_Config.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/ipacm/src/IPACM_Config.cpp b/ipacm/src/IPACM_Config.cpp index d0c33e9..05fd07d 100644 --- a/ipacm/src/IPACM_Config.cpp +++ b/ipacm/src/IPACM_Config.cpp @@ -197,6 +197,9 @@ int IPACM_Config::Init(void) IPACMERR("Failed opening %s.\n", DEVICE_NAME); } ver = GetIPAVer(true); +#ifdef IPA_IOCTL_GET_HW_FEATURE_SUPPORT + hw_feature = GetIPAFeatureSupport(true); +#endif #ifdef FEATURE_IPACM_HAL strlcpy(IPACM_config_file, "/vendor/etc/IPACM_cfg.xml", sizeof(IPACM_config_file)); #else @@ -911,11 +914,36 @@ enum ipa_hw_type IPACM_Config::GetIPAVer(bool get) return ver; } +#ifdef IPA_IOCTL_GET_HW_FEATURE_SUPPORT +int IPACM_Config::GetIPAFeatureSupport(bool get) +{ + int ret; + + if(!get) + return hw_feature; + + ret = ioctl(m_fd, IPA_IOC_GET_HW_FEATURE_SUPPORT, &hw_feature); + if(ret != 0) + { + IPACMERR("Failed to get IPA HW feature support %d.\n", ret); + hw_feature = 0; + return hw_feature; + } + IPACMDBG_H("IPA HW supported feature %d.\n", hw_feature); + return hw_feature; +} +#endif + bool IPACM_Config::isEthBridgingSupported() { enum ipa_hw_type hw_type; hw_type = GetIPAVer(); +#ifdef IPA_IOCTL_GET_HW_FEATURE_SUPPORT + if (hw_type >= IPA_HW_v4_11) { + return ((hw_feature & IPA_HW_ETH_BRIDGING_SUPPORT_BMSK) != 0); + } +#endif #ifdef IPA_HW_v4_7 return ((hw_type >= IPA_HW_v4_5) && |