From e6a7a32b00bb16f70d628014a4a74a12d1e37842 Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Wed, 31 Aug 2016 11:09:23 -0700 Subject: [PATCH] qcacld-3.0: Enable to use CNSS2 platform driver Enable the flags to use CNSS2 platform driver for host driver. Change-Id: I18996443ab8e7c24fb65b6003cfc368b664b5837 --- Kbuild | 8 ++++++-- core/pld/src/pld_common.c | 17 ++++++++++++++++- core/pld/src/pld_pcie.c | 12 ++++++++++++ core/pld/src/pld_pcie.h | 12 ++++++++++++ 4 files changed, 46 insertions(+), 3 deletions(-) diff --git a/Kbuild b/Kbuild index 6c934325ef..69644d6f21 100644 --- a/Kbuild +++ b/Kbuild @@ -18,7 +18,7 @@ ifdef CONFIG_ICNSS CONFIG_ROME_IF = snoc endif -ifeq ($(CONFIG_CNSS), y) +ifeq (y,$(findstring y,$(CONFIG_CNSS) $(CONFIG_CNSS2))) ifndef CONFIG_ROME_IF #use pci as default interface CONFIG_ROME_IF = pci @@ -107,7 +107,7 @@ ifeq ($(KERNEL_BUILD), 0) CONFIG_QCOM_VOWIFI_11R := y ifneq ($(CONFIG_QCA_CLD_WLAN),) - ifeq (y,$(findstring y,$(CONFIG_CNSS) $(CONFIG_ICNSS))) + ifeq (y,$(findstring y,$(CONFIG_CNSS) $(CONFIG_CNSS2) $(CONFIG_ICNSS))) #Flag to enable Protected Managment Frames (11w) feature CONFIG_WLAN_FEATURE_11W := y #Flag to enable LTE CoEx feature @@ -1107,6 +1107,10 @@ CDEFINES += -DCONFIG_PLD_PCIE_CNSS endif endif +ifeq ($(CONFIG_CNSS2), y) +CDEFINES += -DCONFIG_PLD_PCIE_CNSS +endif + ifeq ($(CONFIG_ICNSS), y) CDEFINES += -DCONFIG_PLD_SNOC_ICNSS endif diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index 649b006806..60e669faa2 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -34,9 +34,24 @@ #include #include -#if defined(CONFIG_PLD_PCIE_CNSS) || defined(CONFIG_PLD_SDIO_CNSS) +#ifdef CONFIG_PLD_SDIO_CNSS #include #endif +#ifdef CONFIG_PLD_PCIE_CNSS +/* + * This is a hack to make sure this change can be merged before the + * kernel defconfig change (switching to CNSS2 platform driver) merged, + * otherwise the kernel change has to depend on this change to be merged. + * Once the kernel change is merged, these CNSS flags can be removed + * so that only cnss2.h is needed. + */ +#ifdef CONFIG_CNSS +#include +#endif +#ifdef CONFIG_CNSS2 +#include +#endif +#endif #ifdef CONFIG_PLD_SNOC_ICNSS #include #endif diff --git a/core/pld/src/pld_pcie.c b/core/pld/src/pld_pcie.c index f481f3ca99..66dada94dc 100644 --- a/core/pld/src/pld_pcie.c +++ b/core/pld/src/pld_pcie.c @@ -32,8 +32,20 @@ #include #ifdef CONFIG_PLD_PCIE_CNSS +/* + * This is a hack to make sure this change can be merged before the + * kernel defconfig change (switching to CNSS2 platform driver) merged, + * otherwise the kernel change has to depend on this change to be merged. + * Once the kernel change is merged, these CNSS flags can be removed + * so that only cnss2.h is needed. + */ +#ifdef CONFIG_CNSS #include #endif +#ifdef CONFIG_CNSS2 +#include +#endif +#endif #include "pld_internal.h" #include "pld_pcie.h" diff --git a/core/pld/src/pld_pcie.h b/core/pld/src/pld_pcie.h index 4831120c9e..ec0bde748a 100644 --- a/core/pld/src/pld_pcie.h +++ b/core/pld/src/pld_pcie.h @@ -29,8 +29,20 @@ #define __PLD_PCIE_H__ #ifdef CONFIG_PLD_PCIE_CNSS +/* + * This is a hack to make sure this change can be merged before the + * kernel defconfig change (switching to CNSS2 platform driver) merged, + * otherwise the kernel change has to depend on this change to be merged. + * Once the kernel change is merged, these CNSS flags can be removed + * so that only cnss2.h is needed. + */ +#ifdef CONFIG_CNSS #include #endif +#ifdef CONFIG_CNSS2 +#include +#endif +#endif #include "pld_internal.h" #ifndef CONFIG_PCI