qcacld-3.0: Add support for setting fw log mode for msm8998
Add support for setting fw log mode for msm8998. Change the log mode from bool type to tristate to support multiple log modes. CRs-Fixed: 1115611 Change-Id: I6aef023d1e3cb1b68f1520f800af094f6f6decdb
这个提交包含在:
@@ -335,7 +335,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,
|
||||
|
@@ -391,24 +391,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;
|
||||
|
@@ -74,7 +74,7 @@ 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_debug_mode(bool enablefwlog)
|
||||
static inline int pld_pcie_set_fw_log_mode(u8 fw_log_mode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -83,9 +83,9 @@ static inline void pld_pcie_intr_notify_q6(void)
|
||||
return;
|
||||
}
|
||||
#else
|
||||
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)
|
||||
{
|
||||
|
@@ -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.
|
||||
*
|
||||
@@ -145,6 +145,10 @@ static inline uint8_t *pld_snoc_get_wlan_mac_address(struct device *dev,
|
||||
*num = 0;
|
||||
return NULL;
|
||||
}
|
||||
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);
|
||||
@@ -242,5 +246,9 @@ static inline uint8_t *pld_snoc_get_wlan_mac_address(struct device *dev,
|
||||
{
|
||||
return icnss_get_wlan_mac_address(dev, num);
|
||||
}
|
||||
static inline int pld_snoc_set_fw_log_mode(u8 fw_log_mode)
|
||||
{
|
||||
return icnss_set_fw_log_mode(fw_log_mode);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
在新工单中引用
屏蔽一个用户