diff options
author | Yuanyuan Liu <yuanliu@codeaurora.org> | 2017-01-26 15:32:30 -0800 |
---|---|---|
committer | Yuanyuan Liu <yuanliu@codeaurora.org> | 2017-01-31 10:44:59 -0800 |
commit | 28616cc435e4c5a185c482f7af28b4fd9440331d (patch) | |
tree | b80ba66b462f9efd5ee5136d7e6d9c0d86188885 /drivers/soc | |
parent | bdea8a5178865d4c40af7c56b9027fbb1da162db (diff) |
icnss: rename and change the type of enable_fw_log
enable_fw_log is renamed to fw_log_mode and changed
from boolean type to uint8_t, so that it can support
multiple log mode.
CRs-Fixed: 1116983
Change-Id: I9d4af7cd2c857b62f434d968f51af76121006907
Signed-off-by: Yuanyuan Liu <yuanliu@codeaurora.org>
Diffstat (limited to 'drivers/soc')
-rw-r--r-- | drivers/soc/qcom/icnss.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/drivers/soc/qcom/icnss.c b/drivers/soc/qcom/icnss.c index 4192424df275..0f2849b26472 100644 --- a/drivers/soc/qcom/icnss.c +++ b/drivers/soc/qcom/icnss.c @@ -1234,7 +1234,7 @@ out: return ret; } -static int wlfw_ini_send_sync_msg(bool enable_fw_log) +static int wlfw_ini_send_sync_msg(uint8_t fw_log_mode) { int ret; struct wlfw_ini_req_msg_v01 req; @@ -1244,14 +1244,14 @@ static int wlfw_ini_send_sync_msg(bool enable_fw_log) if (!penv || !penv->wlfw_clnt) return -ENODEV; - icnss_pr_dbg("Sending ini sync request, state: 0x%lx, fw_log: %d\n", - penv->state, enable_fw_log); + icnss_pr_dbg("Sending ini sync request, state: 0x%lx, fw_log_mode: %d\n", + penv->state, fw_log_mode); memset(&req, 0, sizeof(req)); memset(&resp, 0, sizeof(resp)); req.enablefwlog_valid = 1; - req.enablefwlog = enable_fw_log; + req.enablefwlog = fw_log_mode; req_desc.max_msg_len = WLFW_INI_REQ_MSG_V01_MAX_MSG_LEN; req_desc.msg_id = QMI_WLFW_INI_REQ_V01; @@ -1266,14 +1266,14 @@ static int wlfw_ini_send_sync_msg(bool enable_fw_log) ret = qmi_send_req_wait(penv->wlfw_clnt, &req_desc, &req, sizeof(req), &resp_desc, &resp, sizeof(resp), WLFW_TIMEOUT_MS); if (ret < 0) { - icnss_pr_err("Send INI req failed fw_log: %d, ret: %d\n", - enable_fw_log, ret); + icnss_pr_err("Send INI req failed fw_log_mode: %d, ret: %d\n", + fw_log_mode, ret); goto out; } if (resp.resp.result != QMI_RESULT_SUCCESS_V01) { - icnss_pr_err("QMI INI request rejected, fw_log:%d result:%d error:%d\n", - enable_fw_log, resp.resp.result, resp.resp.error); + icnss_pr_err("QMI INI request rejected, fw_log_mode:%d result:%d error:%d\n", + fw_log_mode, resp.resp.result, resp.resp.error); ret = resp.resp.result; goto out; } @@ -2517,21 +2517,19 @@ int icnss_get_soc_info(struct icnss_soc_info *info) } EXPORT_SYMBOL(icnss_get_soc_info); -int icnss_set_fw_debug_mode(bool enable_fw_log) +int icnss_set_fw_log_mode(uint8_t fw_log_mode) { int ret; - icnss_pr_dbg("%s FW debug mode", - enable_fw_log ? "Enalbing" : "Disabling"); + icnss_pr_dbg("FW log mode: %u\n", fw_log_mode); - ret = wlfw_ini_send_sync_msg(enable_fw_log); + ret = wlfw_ini_send_sync_msg(fw_log_mode); if (ret) - icnss_pr_err("Fail to send ini, ret = %d, fw_log: %d\n", ret, - enable_fw_log); - + icnss_pr_err("Fail to send ini, ret = %d, fw_log_mode: %u\n", + ret, fw_log_mode); return ret; } -EXPORT_SYMBOL(icnss_set_fw_debug_mode); +EXPORT_SYMBOL(icnss_set_fw_log_mode); int icnss_athdiag_read(struct device *dev, uint32_t offset, uint32_t mem_type, uint32_t data_len, |