From b11e18a0a4eca863baf77b5abae36219f21cdedd Mon Sep 17 00:00:00 2001 From: Chaoli Zhou Date: Mon, 8 Jul 2019 15:14:20 +0800 Subject: [PATCH] qcacld-3.0: Export max IPA interface numbers As for Rome, currently it usually just only support two IPA interfaces offload, if use the default value 3, which will cause the IPA pipe setup failure issue. So export the max IPA interface numbers, and it's better to set the appropriate value from build file according to different requirement for different chipset and platform. Meanwhile, it support SMMU on the sa415 platform, so enable SMMU for it. Change-Id: I2de31bcb4d38f5e7964d2cbdc2fc6f143eef510d CRs-Fixed: 2480627 --- Kbuild | 10 ++++++++++ components/ipa/core/inc/wlan_ipa_priv.h | 3 ++- components/ipa/core/src/wlan_ipa_core.c | 2 +- configs/qca6174_defconfig | 13 +++++++++++++ core/dp/txrx/ol_txrx_ipa.h | 2 +- 5 files changed, 27 insertions(+), 3 deletions(-) diff --git a/Kbuild b/Kbuild index 46119eb8658c..964a514d5eab 100644 --- a/Kbuild +++ b/Kbuild @@ -2437,6 +2437,16 @@ cppflags-y += -DFEATURE_METERING endif endif +#Define Max IPA interface +ifeq ($(CONFIG_IPA_OFFLOAD), y) +ifdef CONFIG_NUM_IPA_IFACE +cppflags-y += -DMAX_IPA_IFACE=$(CONFIG_NUM_IPA_IFACE) +else +NUM_IPA_IFACE ?= 3 +cppflags-y += -DMAX_IPA_IFACE=$(NUM_IPA_IFACE) +endif +endif + cppflags-$(CONFIG_TUFELLO_DUAL_FW_SUPPORT) += -DCONFIG_TUFELLO_DUAL_FW_SUPPORT cppflags-$(CONFIG_CHANNEL_HOPPING_ALL_BANDS) += -DCHANNEL_HOPPING_ALL_BANDS diff --git a/components/ipa/core/inc/wlan_ipa_priv.h b/components/ipa/core/inc/wlan_ipa_priv.h index 1790a8851ceb..a62645a278ae 100644 --- a/components/ipa/core/inc/wlan_ipa_priv.h +++ b/components/ipa/core/inc/wlan_ipa_priv.h @@ -52,7 +52,8 @@ #define WLAN_IPA_UC_RT_DEBUG_FILL_INTERVAL 10000 #define WLAN_IPA_WLAN_HDR_DES_MAC_OFFSET 0 -#define WLAN_IPA_MAX_IFACE 3 +#define WLAN_IPA_MAX_IFACE MAX_IPA_IFACE +#define WLAN_IPA_CLIENT_MAX_IFACE 3 #define WLAN_IPA_MAX_SYSBAM_PIPE 4 #define WLAN_IPA_MAX_SESSION 5 #define WLAN_IPA_MAX_STA_COUNT 41 diff --git a/components/ipa/core/src/wlan_ipa_core.c b/components/ipa/core/src/wlan_ipa_core.c index e754198cee9a..7e2b385054a5 100644 --- a/components/ipa/core/src/wlan_ipa_core.c +++ b/components/ipa/core/src/wlan_ipa_core.c @@ -31,7 +31,7 @@ static struct wlan_ipa_priv *gp_ipa; static struct wlan_ipa_iface_2_client { qdf_ipa_client_type_t cons_client; qdf_ipa_client_type_t prod_client; -} wlan_ipa_iface_2_client[WLAN_IPA_MAX_IFACE] = { +} wlan_ipa_iface_2_client[WLAN_IPA_CLIENT_MAX_IFACE] = { { QDF_IPA_CLIENT_WLAN2_CONS, QDF_IPA_CLIENT_WLAN1_PROD }, { diff --git a/configs/qca6174_defconfig b/configs/qca6174_defconfig index 1be319196296..49c01e673bea 100644 --- a/configs/qca6174_defconfig +++ b/configs/qca6174_defconfig @@ -468,6 +468,13 @@ ifeq ($(CONFIG_IPA3), y) CONFIG_IPA_OFFLOAD := y endif +#Set MAX IPA Offload Interface +ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y) +ifeq ($(CONFIG_IPA_OFFLOAD), y) +CONFIG_NUM_IPA_IFACE := 2 +endif +endif + #Flag to enable SMMU S1 support ifeq ($(CONFIG_ARCH_SDM845), y) ifeq ($(CONFIG_IPA_OFFLOAD), y) @@ -481,6 +488,12 @@ CONFIG_ENABLE_SMMU_S1_TRANSLATION := y endif endif +ifeq ($(CONFIG_ARCH_SDXPOORWILLS), y) +ifeq ($(CONFIG_IPA_OFFLOAD), y) +CONFIG_ENABLE_SMMU_S1_TRANSLATION := y +endif +endif + ifeq ($(CONFIG_ARCH_SDX20), y) ifeq ($(CONFIG_QCA_WIFI_SDIO), y) ifeq ($(CONFIG_WCNSS_SKB_PRE_ALLOC), y) diff --git a/core/dp/txrx/ol_txrx_ipa.h b/core/dp/txrx/ol_txrx_ipa.h index 2070c3e018e0..c2ce70da68de 100644 --- a/core/dp/txrx/ol_txrx_ipa.h +++ b/core/dp/txrx/ol_txrx_ipa.h @@ -83,7 +83,7 @@ struct ol_txrx_ipa_uc_rx_hdr { #define OL_TXRX_IPA_IPV4_NAME_EXT "_ipv4" #define OL_TXRX_IPA_IPV6_NAME_EXT "_ipv6" -#define OL_TXRX_IPA_MAX_IFACE 3 +#define OL_TXRX_IPA_MAX_IFACE MAX_IPA_IFACE #define OL_TXRX_IPA_WLAN_FRAG_HEADER sizeof(struct frag_header) #define OL_TXRX_IPA_WLAN_IPA_HEADER sizeof(struct ipa_header)