From 04459b9cf894a65adf196dcc694f57060e0be3ca Mon Sep 17 00:00:00 2001 From: Manikandan Mohan Date: Fri, 23 Feb 2018 16:32:48 -0800 Subject: [PATCH] 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 --- Kbuild | 3 +++ core/pld/src/pld_pcie.c | 12 +++++++++--- core/pld/src/pld_snoc.c | 8 +++++++- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Kbuild b/Kbuild index 9c6a78e54cf5..a48a9e42d50d 100644 --- a/Kbuild +++ b/Kbuild @@ -1807,6 +1807,9 @@ CDEFINES := -DANI_LITTLE_BYTE_ENDIAN \ -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 f02d789142e5..7e108f777143 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 @@ static struct pci_device_id pld_pcie_id_table[] = { { 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 @@ struct cnss_wlan_runtime_ops runtime_pm_ops = { #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 @@ static const struct dev_pm_ops pld_pm_ops = { #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 ffdd95190c25..871c55ecafa2 100644 --- a/core/pld/src/pld_snoc.c +++ b/core/pld/src/pld_snoc.c @@ -272,8 +272,14 @@ out: 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,