Parcourir la source

qcacld-3.0: Enable to use CNSS2 platform driver

Enable the flags to use CNSS2 platform driver for host driver.

Change-Id: I18996443ab8e7c24fb65b6003cfc368b664b5837
Yue Ma il y a 8 ans
Parent
commit
e6a7a32b00
4 fichiers modifiés avec 46 ajouts et 3 suppressions
  1. 6 2
      Kbuild
  2. 16 1
      core/pld/src/pld_common.c
  3. 12 0
      core/pld/src/pld_pcie.c
  4. 12 0
      core/pld/src/pld_pcie.h

+ 6 - 2
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

+ 16 - 1
core/pld/src/pld_common.c

@@ -34,9 +34,24 @@
 #include <linux/slab.h>
 #include <linux/pm.h>
 
-#if defined(CONFIG_PLD_PCIE_CNSS) || defined(CONFIG_PLD_SDIO_CNSS)
+#ifdef CONFIG_PLD_SDIO_CNSS
 #include <net/cnss.h>
 #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 <net/cnss.h>
+#endif
+#ifdef CONFIG_CNSS2
+#include <net/cnss2.h>
+#endif
+#endif
 #ifdef CONFIG_PLD_SNOC_ICNSS
 #include <soc/qcom/icnss.h>
 #endif

+ 12 - 0
core/pld/src/pld_pcie.c

@@ -32,8 +32,20 @@
 #include <linux/slab.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 <net/cnss.h>
 #endif
+#ifdef CONFIG_CNSS2
+#include <net/cnss2.h>
+#endif
+#endif
 
 #include "pld_internal.h"
 #include "pld_pcie.h"

+ 12 - 0
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 <net/cnss.h>
 #endif
+#ifdef CONFIG_CNSS2
+#include <net/cnss2.h>
+#endif
+#endif
 #include "pld_internal.h"
 
 #ifndef CONFIG_PCI