Преглед на файлове

qcacld-3.0: Fix errors of multi driver compilation

Qcacld supports multiple driver modules instance generation with
different file names and Kbuild options. Fix driver load time and
compilation errors on this feature.

Change-Id: Ib405e6c475bace31933a28dc64082f2b6c046da9
CRs-fixed: 2197749
Manikandan Mohan преди 7 години
родител
ревизия
04459b9cf8
променени са 3 файла, в които са добавени 19 реда и са изтрити 4 реда
  1. 3 0
      Kbuild
  2. 9 3
      core/pld/src/pld_pcie.c
  3. 7 1
      core/pld/src/pld_snoc.c

+ 3 - 0
Kbuild

@@ -1807,6 +1807,9 @@ CDEFINES :=	-DANI_LITTLE_BYTE_ENDIAN \
 		-DWLAN_SPECTRAL_ENABLE \
 		-DWLAN_SPECTRAL_ENABLE \
 		-DWMI_CMD_STRINGS
 		-DWMI_CMD_STRINGS
 
 
+ifeq ($(CONFIG_WLAN_DISABLE_EXPORT_SYMBOL), y)
+CDEFINES += -DWLAN_DISABLE_EXPORT_SYMBOL
+endif
 
 
 ############ WIFI POS ##############
 ############ WIFI POS ##############
 ifeq ($(CONFIG_WIFI_POS_CONVERGED), y)
 ifeq ($(CONFIG_WIFI_POS_CONVERGED), y)

+ 9 - 3
core/pld/src/pld_pcie.c

@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2018 The Linux Foundation. All rights reserved.
  *
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
  *
@@ -447,6 +447,12 @@ static struct pci_device_id pld_pcie_id_table[] = {
 	{ 0 }
 	{ 0 }
 };
 };
 
 
+#ifdef MULTI_IF_NAME
+#define PLD_PCIE_OPS_NAME "pld_pcie_" MULTI_IF_NAME
+#else
+#define PLD_PCIE_OPS_NAME "pld_pcie"
+#endif
+
 #ifdef CONFIG_PLD_PCIE_CNSS
 #ifdef CONFIG_PLD_PCIE_CNSS
 #ifdef FEATURE_RUNTIME_PM
 #ifdef FEATURE_RUNTIME_PM
 struct cnss_wlan_runtime_ops runtime_pm_ops = {
 struct cnss_wlan_runtime_ops runtime_pm_ops = {
@@ -456,7 +462,7 @@ struct cnss_wlan_runtime_ops runtime_pm_ops = {
 #endif
 #endif
 
 
 struct cnss_wlan_driver pld_pcie_ops = {
 struct cnss_wlan_driver pld_pcie_ops = {
-	.name       = "pld_pcie",
+	.name       = PLD_PCIE_OPS_NAME,
 	.id_table   = pld_pcie_id_table,
 	.id_table   = pld_pcie_id_table,
 	.probe      = pld_pcie_probe,
 	.probe      = pld_pcie_probe,
 	.remove     = pld_pcie_remove,
 	.remove     = pld_pcie_remove,
@@ -505,7 +511,7 @@ static const struct dev_pm_ops pld_pm_ops = {
 #endif
 #endif
 
 
 struct pci_driver pld_pcie_ops = {
 struct pci_driver pld_pcie_ops = {
-	.name       = "pld_pcie",
+	.name       = PLD_PCIE_OPS_NAME,
 	.id_table   = pld_pcie_id_table,
 	.id_table   = pld_pcie_id_table,
 	.probe      = pld_pcie_probe,
 	.probe      = pld_pcie_probe,
 	.remove     = pld_pcie_remove,
 	.remove     = pld_pcie_remove,

+ 7 - 1
core/pld/src/pld_snoc.c

@@ -272,8 +272,14 @@ out:
 	return 0;
 	return 0;
 }
 }
 
 
+#ifdef MULTI_IF_NAME
+#define PLD_SNOC_OPS_NAME "pld_snoc_" MULTI_IF_NAME
+#else
+#define PLD_SNOC_OPS_NAME "pld_snoc"
+#endif
+
 struct icnss_driver_ops pld_snoc_ops = {
 struct icnss_driver_ops pld_snoc_ops = {
-	.name       = "pld_snoc",
+	.name       = PLD_SNOC_OPS_NAME,
 	.probe      = pld_snoc_probe,
 	.probe      = pld_snoc_probe,
 	.remove     = pld_snoc_remove,
 	.remove     = pld_snoc_remove,
 	.shutdown   = pld_snoc_shutdown,
 	.shutdown   = pld_snoc_shutdown,