From 11f526acba141e43d85c4e2c713390c1a6d74d04 Mon Sep 17 00:00:00 2001 From: Yuanyuan Liu Date: Wed, 18 May 2016 10:22:07 -0700 Subject: [PATCH] qcacld-3.0: Use PLD internal flags Use PLD internal flags in PLD layer instead of using CNSS/ICNSS kernel flags. CRs-Fixed: 1018099 Change-Id: Id32c62ccd1749ef5a38fd11aba6ce6e4fbe84a6e --- Kbuild | 12 ++++++++++++ core/pld/src/pld_common.c | 4 ++-- core/pld/src/pld_pcie.c | 8 ++++---- core/pld/src/pld_pcie.h | 9 ++++----- core/pld/src/pld_snoc.c | 4 ++-- core/pld/src/pld_snoc.h | 2 +- 6 files changed, 25 insertions(+), 14 deletions(-) diff --git a/Kbuild b/Kbuild index d904e99627..6986040cf7 100755 --- a/Kbuild +++ b/Kbuild @@ -989,6 +989,18 @@ CDEFINES := -DANI_LITTLE_BYTE_ENDIAN \ -DCONFIG_160MHZ_SUPPORT \ -DCONFIG_MCL +ifeq ($(CONFIG_CNSS), y) +ifeq ($(CONFIG_CNSS_SDIO), y) +CDEFINES += -DCONFIG_PLD_SDIO_CNSS +else +CDEFINES += -DCONFIG_PLD_PCIE_CNSS +endif +endif + +ifeq ($(CONFIG_ICNSS), y) +CDEFINES += -DCONFIG_PLD_SNOC_ICNSS +endif + ifeq (y,$(filter y,$(CONFIG_CNSS_EOS) $(CONFIG_ICNSS))) CDEFINES += -DQCA_WIFI_3_0 CDEFINES += -DQCA_WIFI_3_0_EMU diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index e3c5bc60fc..cc9cdb322f 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -34,10 +34,10 @@ #include #include -#ifdef CONFIG_CNSS +#if defined(CONFIG_PLD_PCIE_CNSS) || defined(CONFIG_PLD_SDIO_CNSS) #include #endif -#ifdef CONFIG_ICNSS +#ifdef CONFIG_PLD_SNOC_ICNSS #include #endif diff --git a/core/pld/src/pld_pcie.c b/core/pld/src/pld_pcie.c index d9dc95b8a3..e5585e6a87 100644 --- a/core/pld/src/pld_pcie.c +++ b/core/pld/src/pld_pcie.c @@ -31,7 +31,7 @@ #include #include -#ifdef CONFIG_CNSS +#ifdef CONFIG_PLD_PCIE_CNSS #include #endif @@ -121,7 +121,7 @@ static void pld_pcie_remove(struct pci_dev *pdev) spin_unlock_irqrestore(&pld_context->pld_lock, flags); } -#ifdef CONFIG_CNSS +#ifdef CONFIG_PLD_PCIE_CNSS /** * pld_pcie_reinit() - SSR re-initialize function for PCIE device * @pdev: PCIE device @@ -289,7 +289,7 @@ static struct pci_device_id pld_pcie_id_table[] = { { 0 } }; -#ifdef CONFIG_CNSS +#ifdef CONFIG_PLD_PCIE_CNSS #ifdef FEATURE_RUNTIME_PM struct cnss_wlan_runtime_ops runtime_pm_ops = { .runtime_suspend = pld_pcie_runtime_suspend, @@ -372,7 +372,7 @@ int pld_pcie_get_ce_id(int irq) return -EINVAL; } -#ifdef CONFIG_CNSS +#ifdef CONFIG_PLD_PCIE_CNSS #ifdef QCA_WIFI_3_0_ADRASTEA /** * pld_pcie_wlan_enable() - Enable WLAN diff --git a/core/pld/src/pld_pcie.h b/core/pld/src/pld_pcie.h index 63d0742244..d8371541e0 100644 --- a/core/pld/src/pld_pcie.h +++ b/core/pld/src/pld_pcie.h @@ -51,7 +51,7 @@ void pld_pcie_unregister_driver(void); int pld_pcie_get_ce_id(int irq); #endif -#if (!defined(CONFIG_CNSS)) || (!defined(QCA_WIFI_3_0_ADRASTEA)) +#if (!defined(CONFIG_PLD_PCIE_CNSS)) || (!defined(QCA_WIFI_3_0_ADRASTEA)) static inline int pld_pcie_wlan_enable(struct pld_wlan_enable_cfg *config, enum pld_driver_mode mode, const char *host_version) { @@ -76,7 +76,7 @@ int pld_pcie_wlan_disable(enum pld_driver_mode mode); int pld_pcie_set_fw_debug_mode(bool enablefwlog); #endif -#if (!defined(CONFIG_CNSS)) || (!defined(CONFIG_CNSS_SECURE_FW)) +#if (!defined(CONFIG_PLD_PCIE_CNSS)) || (!defined(CONFIG_CNSS_SECURE_FW)) static inline int cnss_get_sha_hash(const u8 *data, u32 data_len, u8 *hash_idx, u8 *out) { @@ -88,15 +88,14 @@ static inline void *cnss_get_fw_ptr(void) } #endif -#if (!defined(CONFIG_CNSS)) || (!defined(CONFIG_PCI_MSM)) +#if (!defined(CONFIG_PLD_PCIE_CNSS)) || (!defined(CONFIG_PCI_MSM)) static inline int cnss_wlan_pm_control(bool vote) { return 0; } #endif -#ifndef CONFIG_CNSS - +#ifndef CONFIG_PLD_PCIE_CNSS static inline int pld_pcie_get_fw_files_for_target(struct pld_fw_files *pfw_files, u32 target_type, u32 target_version) diff --git a/core/pld/src/pld_snoc.c b/core/pld/src/pld_snoc.c index b2d0446a27..9786d21919 100644 --- a/core/pld/src/pld_snoc.c +++ b/core/pld/src/pld_snoc.c @@ -30,14 +30,14 @@ #include #include -#ifdef CONFIG_ICNSS +#ifdef CONFIG_PLD_SNOC_ICNSS #include #endif #include "pld_common.h" #include "pld_internal.h" -#ifdef CONFIG_ICNSS +#ifdef CONFIG_PLD_SNOC_ICNSS /** * pld_snoc_probe() - Probe function for platform driver * @dev: device diff --git a/core/pld/src/pld_snoc.h b/core/pld/src/pld_snoc.h index 321710680c..b866abf196 100644 --- a/core/pld/src/pld_snoc.h +++ b/core/pld/src/pld_snoc.h @@ -30,7 +30,7 @@ #include "pld_common.h" -#ifndef CONFIG_ICNSS +#ifndef CONFIG_PLD_SNOC_ICNSS static inline int pld_snoc_register_driver(void) { return 0;