From 81982b96cb695cd57b9e60d829ef722f7830f868 Mon Sep 17 00:00:00 2001 From: Yuanyuan Liu Date: Thu, 13 Apr 2017 14:25:19 -0700 Subject: [PATCH] qcacld-3.0: Add support of sending fw_log_mode to WLAN FW Add support of sending fw_log_mode to WLAN FW for QCA6290. WLAN FW will decide whether to push its debug log through DIAG or not based on this value. CRs-Fixed: 2046631 Change-Id: I6c4ec8dbd65f8fc034381770bdef7e145b1d2b6a --- core/pld/src/pld_common.c | 2 +- core/pld/src/pld_pcie.h | 28 ++++++++++++++++++---------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c index 63f910845fed..ddc2f451d43d 100644 --- a/core/pld/src/pld_common.c +++ b/core/pld/src/pld_common.c @@ -406,7 +406,7 @@ int pld_set_fw_log_mode(struct device *dev, u8 fw_log_mode) switch (pld_get_bus_type(dev)) { case PLD_BUS_TYPE_PCIE: - ret = pld_pcie_set_fw_log_mode(fw_log_mode); + ret = pld_pcie_set_fw_log_mode(dev, fw_log_mode); break; case PLD_BUS_TYPE_SNOC: ret = pld_snoc_set_fw_log_mode(fw_log_mode); diff --git a/core/pld/src/pld_pcie.h b/core/pld/src/pld_pcie.h index 2e27f7948329..95481e98353d 100644 --- a/core/pld/src/pld_pcie.h +++ b/core/pld/src/pld_pcie.h @@ -72,16 +72,8 @@ int pld_pcie_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config, int pld_pcie_wlan_disable(struct device *dev, enum pld_driver_mode mode); #endif -#if (!defined(CONFIG_PLD_PCIE_CNSS)) || (!defined(QCA_WIFI_3_0_ADRASTEA)) -static inline int pld_pcie_set_fw_log_mode(u8 fw_log_mode) -{ - return 0; -} -static inline void pld_pcie_intr_notify_q6(void) -{ -} -#else -static inline int pld_pcie_set_fw_log_mode(u8 fw_log_mode) +#if defined(CONFIG_PLD_PCIE_CNSS) && defined(QCA_WIFI_3_0_ADRASTEA) +static inline int pld_pcie_set_fw_log_mode(struct device *dev, u8 fw_log_mode) { return cnss_set_fw_debug_mode(fw_log_mode); } @@ -89,6 +81,22 @@ static inline void pld_pcie_intr_notify_q6(void) { cnss_intr_notify_q6(); } +#elif defined(CONFIG_PLD_PCIE_CNSS) +static inline int pld_pcie_set_fw_log_mode(struct device *dev, u8 fw_log_mode) +{ + return cnss_set_fw_log_mode(dev, fw_log_mode); +} +static inline void pld_pcie_intr_notify_q6(void) +{ +} +#else +static inline int pld_pcie_set_fw_log_mode(struct device *dev, u8 fw_log_mode) +{ + return 0; +} +static inline void pld_pcie_intr_notify_q6(void) +{ +} #endif #if (!defined(CONFIG_PLD_PCIE_CNSS)) || (!defined(CONFIG_CNSS_SECURE_FW))