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
diff --git a/Kbuild b/Kbuild
index 9c6a78e..a48a9e4 100644
--- a/Kbuild
+++ b/Kbuild
@@ -1807,6 +1807,9 @@
 		-DWLAN_SPECTRAL_ENABLE \
 		-DWMI_CMD_STRINGS
 
+ifeq ($(CONFIG_WLAN_DISABLE_EXPORT_SYMBOL), y)
+CDEFINES += -DWLAN_DISABLE_EXPORT_SYMBOL
+endif
 
 ############ WIFI POS ##############
 ifeq ($(CONFIG_WIFI_POS_CONVERGED), y)
diff --git a/core/pld/src/pld_pcie.c b/core/pld/src/pld_pcie.c
index f02d789..7e108f7 100644
--- a/core/pld/src/pld_pcie.c
+++ b/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.
  *
@@ -447,6 +447,12 @@
 	{ 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 FEATURE_RUNTIME_PM
 struct cnss_wlan_runtime_ops runtime_pm_ops = {
@@ -456,7 +462,7 @@
 #endif
 
 struct cnss_wlan_driver pld_pcie_ops = {
-	.name       = "pld_pcie",
+	.name       = PLD_PCIE_OPS_NAME,
 	.id_table   = pld_pcie_id_table,
 	.probe      = pld_pcie_probe,
 	.remove     = pld_pcie_remove,
@@ -505,7 +511,7 @@
 #endif
 
 struct pci_driver pld_pcie_ops = {
-	.name       = "pld_pcie",
+	.name       = PLD_PCIE_OPS_NAME,
 	.id_table   = pld_pcie_id_table,
 	.probe      = pld_pcie_probe,
 	.remove     = pld_pcie_remove,
diff --git a/core/pld/src/pld_snoc.c b/core/pld/src/pld_snoc.c
index ffdd951..871c55e 100644
--- a/core/pld/src/pld_snoc.c
+++ b/core/pld/src/pld_snoc.c
@@ -272,8 +272,14 @@
 	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 = {
-	.name       = "pld_snoc",
+	.name       = PLD_SNOC_OPS_NAME,
 	.probe      = pld_snoc_probe,
 	.remove     = pld_snoc_remove,
 	.shutdown   = pld_snoc_shutdown,