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