summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshok Vuyyuru <avuyyuru@codeaurora.org>2021-03-10 18:46:05 +0530
committerAshok Vuyyuru <avuyyuru@codeaurora.org>2021-04-16 17:23:46 +0530
commit50f23c6f764895581a96dd7362ed883951752c72 (patch)
treeb0e780abde775bdda35dd4711e377db219e33e89
parent65b72aca50c99d5ca55524249b9a5206a26dfca2 (diff)
downloadipacfg-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
-rw-r--r--ipacm/inc/IPACM_Config.h7
-rw-r--r--ipacm/src/IPACM_Config.cpp28
2 files changed, 35 insertions, 0 deletions
diff --git a/ipacm/inc/IPACM_Config.h b/ipacm/inc/IPACM_Config.h
index 1915fbc..a0a8bb8 100644
--- a/ipacm/inc/IPACM_Config.h
+++ b/ipacm/inc/IPACM_Config.h
@@ -261,6 +261,10 @@ public:
enum ipa_hw_type GetIPAVer(bool get = false);
+#ifdef IPA_IOCTL_GET_HW_FEATURE_SUPPORT
+ int GetIPAFeatureSupport(bool get = false);
+#endif
+
bool isEthBridgingSupported();
bool isIPAv3Supported();
@@ -361,6 +365,9 @@ public:
private:
enum ipa_hw_type ver;
+#ifdef IPA_IOCTL_GET_HW_FEATURE_SUPPORT
+ uint32_t hw_feature;
+#endif
static IPACM_Config *pInstance;
static const char *DEVICE_NAME;
IPACM_Config(void);
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) &&