summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/bmi/inc/bmi.h4
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h10
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c2
-rw-r--r--core/hdd/src/wlan_hdd_main.c4
-rw-r--r--core/pld/inc/pld_common.h2
-rw-r--r--core/pld/src/pld_common.c11
-rw-r--r--core/pld/src/pld_pcie.h8
-rw-r--r--core/pld/src/pld_snoc.h8
8 files changed, 30 insertions, 19 deletions
diff --git a/core/bmi/inc/bmi.h b/core/bmi/inc/bmi.h
index 1ebcdedb4f4d..2adae5d9d77a 100644
--- a/core/bmi/inc/bmi.h
+++ b/core/bmi/inc/bmi.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -55,7 +55,7 @@ void ol_cds_free(void);
struct ol_config_info {
bool enable_uart_print;
bool enable_self_recovery;
- bool enable_fw_log;
+ uint8_t enable_fw_log;
bool enable_lpass_support;
bool enable_ramdump_collection;
};
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 5a9ba07ab9d4..0927c54c2cac 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -5191,11 +5191,13 @@ typedef enum {
*/
#define CFG_ENABLE_FW_LOG_NAME "gEnablefwlog"
#define CFG_ENABLE_FW_LOG_DISABLE (0)
-#define CFG_ENABLE_FW_LOG_ENABLE (1)
+#define CFG_ENABLE_FW_LOG_WMI (1)
+#define CFG_ENABLE_FW_LOG_DIAG (2)
+#define CFG_ENABLE_FW_LOG_MAX (CFG_ENABLE_FW_LOG_DIAG)
#ifdef QCA_WIFI_3_0_ADRASTEA
-#define CFG_ENABLE_FW_LOG_DEFAULT (CFG_ENABLE_FW_LOG_DISABLE)
+#define CFG_ENABLE_FW_LOG_DEFAULT (CFG_ENABLE_FW_LOG_DIAG)
#else
-#define CFG_ENABLE_FW_LOG_DEFAULT (CFG_ENABLE_FW_LOG_ENABLE)
+#define CFG_ENABLE_FW_LOG_DEFAULT (CFG_ENABLE_FW_LOG_WMI)
#endif
/*
@@ -8762,7 +8764,7 @@ struct hdd_config {
bool enable_ip_tcp_udp_checksum_offload;
bool enablePowersaveOffload;
bool enablefwprint;
- bool enable_fw_log;
+ uint8_t enable_fw_log;
uint8_t fVhtAmpduLenExponent;
uint32_t vhtMpduLen;
uint32_t IpaConfig;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index c6e3d2d02d13..004df1788eb9 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -2651,7 +2651,7 @@ REG_TABLE_ENTRY g_registry_table[] = {
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
CFG_ENABLE_FW_LOG_DEFAULT,
CFG_ENABLE_FW_LOG_DISABLE,
- CFG_ENABLE_FW_LOG_ENABLE),
+ CFG_ENABLE_FW_LOG_MAX),
#ifdef IPA_OFFLOAD
REG_VARIABLE(CFG_IPA_OFFLOAD_CONFIG_NAME, WLAN_PARAM_HexInteger,
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index 3fb7f4e754cc..2a8ae3ad5ece 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -6686,8 +6686,8 @@ static hdd_context_t *hdd_context_create(struct device *dev)
goto err_free_config;
- pld_set_fw_debug_mode(hdd_ctx->parent_dev,
- hdd_ctx->config->enable_fw_log);
+ pld_set_fw_log_mode(hdd_ctx->parent_dev,
+ hdd_ctx->config->enable_fw_log);
/* Uses to enabled logging after SSR */
diff --git a/core/pld/inc/pld_common.h b/core/pld/inc/pld_common.h
index 7d453530abf3..4f83a1218f02 100644
--- a/core/pld/inc/pld_common.h
+++ b/core/pld/inc/pld_common.h
@@ -306,7 +306,7 @@ void pld_unregister_driver(void);
int pld_wlan_enable(struct device *dev, struct pld_wlan_enable_cfg *config,
enum pld_driver_mode mode, const char *host_version);
int pld_wlan_disable(struct device *dev, enum pld_driver_mode mode);
-int pld_set_fw_debug_mode(struct device *dev, bool enablefwlog);
+int pld_set_fw_log_mode(struct device *dev, u8 fw_log_mode);
void pld_get_default_fw_files(struct pld_fw_files *pfw_files);
int pld_get_fw_files_for_target(struct device *dev,
struct pld_fw_files *pfw_files,
diff --git a/core/pld/src/pld_common.c b/core/pld/src/pld_common.c
index 950cc625b3a2..2ab192158748 100644
--- a/core/pld/src/pld_common.c
+++ b/core/pld/src/pld_common.c
@@ -388,24 +388,25 @@ int pld_wlan_disable(struct device *dev, enum pld_driver_mode mode)
}
/**
- * pld_set_fw_debug_mode() - Set FW debug mode
+ * pld_set_fw_log_mode() - Set FW debug log mode
* @dev: device
- * @enablefwlog: 0 for QXDM, 1 for WMI
+ * @fw_log_mode: 0 for No log, 1 for WMI, 2 for DIAG
*
- * Switch Fw debug mode between DIAG logging and WMI logging.
+ * Switch Fw debug log mode between DIAG logging and WMI logging.
*
* Return: 0 for success
* Non zero failure code for errors
*/
-int pld_set_fw_debug_mode(struct device *dev, bool enablefwlog)
+int pld_set_fw_log_mode(struct device *dev, u8 fw_log_mode)
{
int ret = 0;
switch (pld_get_bus_type(dev)) {
case PLD_BUS_TYPE_PCIE:
- ret = pld_pcie_set_fw_debug_mode(enablefwlog);
+ ret = pld_pcie_set_fw_log_mode(fw_log_mode);
break;
case PLD_BUS_TYPE_SNOC:
+ ret = pld_snoc_set_fw_log_mode(fw_log_mode);
break;
case PLD_BUS_TYPE_SDIO:
break;
diff --git a/core/pld/src/pld_pcie.h b/core/pld/src/pld_pcie.h
index fd48e69842cb..1503c4ce80a2 100644
--- a/core/pld/src/pld_pcie.h
+++ b/core/pld/src/pld_pcie.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -64,7 +64,7 @@ static inline int pld_pcie_wlan_disable(enum pld_driver_mode mode)
{
return 0;
}
-static inline int pld_pcie_set_fw_debug_mode(bool enablefwlog)
+static inline int pld_pcie_set_fw_log_mode(u8 fw_log_mode)
{
return 0;
}
@@ -76,9 +76,9 @@ static inline void pld_pcie_intr_notify_q6(void)
int pld_pcie_wlan_enable(struct pld_wlan_enable_cfg *config,
enum pld_driver_mode mode, const char *host_version);
int pld_pcie_wlan_disable(enum pld_driver_mode mode);
-static inline int pld_pcie_set_fw_debug_mode(bool enablefwlog)
+static inline int pld_pcie_set_fw_log_mode(u8 fw_log_mode)
{
- return cnss_set_fw_debug_mode(enablefwlog);
+ return cnss_set_fw_debug_mode(fw_log_mode);
}
static inline void pld_pcie_intr_notify_q6(void)
{
diff --git a/core/pld/src/pld_snoc.h b/core/pld/src/pld_snoc.h
index aa6aaaa1f1dc..cac7f0bbd3d2 100644
--- a/core/pld/src/pld_snoc.h
+++ b/core/pld/src/pld_snoc.h
@@ -149,6 +149,10 @@ static inline int pld_snoc_force_assert_target(struct device *dev)
{
return 0;
}
+static inline int pld_snoc_set_fw_log_mode(u8 fw_log_mode)
+{
+ return 0;
+}
#else
int pld_snoc_register_driver(void);
void pld_snoc_unregister_driver(void);
@@ -251,5 +255,9 @@ static inline int pld_snoc_force_assert_target(struct device *dev)
{
return icnss_trigger_recovery(dev);
}
+static inline int pld_snoc_set_fw_log_mode(u8 fw_log_mode)
+{
+ return icnss_set_fw_log_mode(fw_log_mode);
+}
#endif
#endif