mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
cnss2: Avoid printing some verbose logs to kmsg
Create cnss_pr_buf() to print verbose log to IPC buffer only. Change-Id: I21556bbaced860d5b27967b9790b2e1396d7822d CRs-Fixed: 2820766 Signed-off-by: Paul Zhang <paulz@codeaurora.org> Signed-off-by: Liangwei Dong <liangwei@codeaurora.org> Signed-off-by: Yue Ma <yuem@codeaurora.org>
This commit is contained in:
parent
6a4a49544d
commit
9ea529cf46
3 changed files with 14 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright (c) 2016-2019, The Linux Foundation. All rights reserved. */
|
||||
/* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved. */
|
||||
|
||||
#ifndef _CNSS_DEBUG_H
|
||||
#define _CNSS_DEBUG_H
|
||||
|
|
@ -44,6 +44,9 @@ extern void *cnss_ipc_log_long_context;
|
|||
##__VA_ARGS__); \
|
||||
} while (0)
|
||||
|
||||
#define cnss_pr_buf(_fmt, ...) \
|
||||
cnss_ipc_log_long_string("%scnss: " _fmt, "", ##__VA_ARGS__) \
|
||||
|
||||
#ifdef CONFIG_CNSS2_DEBUG
|
||||
#define CNSS_ASSERT(_condition) do { \
|
||||
if (!(_condition)) { \
|
||||
|
|
|
|||
|
|
@ -3387,8 +3387,8 @@ int cnss_pci_qmi_send_get(struct cnss_pci_data *pci_priv)
|
|||
!pci_priv->qmi_send_usage_count)
|
||||
ret = cnss_pci_resume_bus(pci_priv);
|
||||
pci_priv->qmi_send_usage_count++;
|
||||
cnss_pr_vdbg("Increased QMI send usage count to %d\n",
|
||||
pci_priv->qmi_send_usage_count);
|
||||
cnss_pr_buf("Increased QMI send usage count to %d\n",
|
||||
pci_priv->qmi_send_usage_count);
|
||||
mutex_unlock(&pci_priv->bus_lock);
|
||||
|
||||
return ret;
|
||||
|
|
@ -3404,8 +3404,8 @@ int cnss_pci_qmi_send_put(struct cnss_pci_data *pci_priv)
|
|||
mutex_lock(&pci_priv->bus_lock);
|
||||
if (pci_priv->qmi_send_usage_count)
|
||||
pci_priv->qmi_send_usage_count--;
|
||||
cnss_pr_vdbg("Decreased QMI send usage count to %d\n",
|
||||
pci_priv->qmi_send_usage_count);
|
||||
cnss_pr_buf("Decreased QMI send usage count to %d\n",
|
||||
pci_priv->qmi_send_usage_count);
|
||||
if (cnss_pci_get_auto_suspended(pci_priv) &&
|
||||
!pci_priv->qmi_send_usage_count)
|
||||
ret = cnss_pci_suspend_bus(pci_priv);
|
||||
|
|
|
|||
|
|
@ -1660,8 +1660,8 @@ int cnss_wlfw_get_info_send_sync(struct cnss_plat_data *plat_priv, int type,
|
|||
struct qmi_txn txn;
|
||||
int ret = 0;
|
||||
|
||||
cnss_pr_vdbg("Sending get info message, type: %d, cmd length: %d, state: 0x%lx\n",
|
||||
type, cmd_len, plat_priv->driver_state);
|
||||
cnss_pr_buf("Sending get info message, type: %d, cmd length: %d, state: 0x%lx\n",
|
||||
type, cmd_len, plat_priv->driver_state);
|
||||
|
||||
if (cmd_len > QMI_WLFW_MAX_DATA_SIZE_V01)
|
||||
return -EINVAL;
|
||||
|
|
@ -2015,16 +2015,16 @@ static void cnss_wlfw_respond_get_info_ind_cb(struct qmi_handle *qmi_wlfw,
|
|||
container_of(qmi_wlfw, struct cnss_plat_data, qmi_wlfw);
|
||||
const struct wlfw_respond_get_info_ind_msg_v01 *ind_msg = data;
|
||||
|
||||
cnss_pr_vdbg("Received QMI WLFW respond get info indication\n");
|
||||
cnss_pr_buf("Received QMI WLFW respond get info indication\n");
|
||||
|
||||
if (!txn) {
|
||||
cnss_pr_err("Spurious indication\n");
|
||||
return;
|
||||
}
|
||||
|
||||
cnss_pr_vdbg("Extract message with event length: %d, type: %d, is last: %d, seq no: %d\n",
|
||||
ind_msg->data_len, ind_msg->type,
|
||||
ind_msg->is_last, ind_msg->seq_no);
|
||||
cnss_pr_buf("Extract message with event length: %d, type: %d, is last: %d, seq no: %d\n",
|
||||
ind_msg->data_len, ind_msg->type,
|
||||
ind_msg->is_last, ind_msg->seq_no);
|
||||
|
||||
if (plat_priv->get_info_cb_ctx && plat_priv->get_info_cb)
|
||||
plat_priv->get_info_cb(plat_priv->get_info_cb_ctx,
|
||||
|
|
|
|||
Loading…
Reference in a new issue