summaryrefslogtreecommitdiff
path: root/mhi
diff options
context:
space:
mode:
authorHsiu-Chang Chen <hsiuchangchen@google.com>2022-10-13 11:18:54 +0800
committerHsiu-Chang Chen <hsiuchangchen@google.com>2022-10-13 11:18:54 +0800
commit7edd7e86883554a11d14d06ae7c20515b4af67c1 (patch)
tree0a652a7b958384289309d54daacf55d28af3f75e /mhi
parent28d3dc9e4bef4b4626e810d5cec81bd5c91904e7 (diff)
downloadcnss2-7edd7e86883554a11d14d06ae7c20515b4af67c1.tar.gz
mhi: print info level logs in dmesg
This CL has following changes - Correct the debug config name for mhi - Use correct function to print info level logs Bug: 253234234 Test: more mhi logs present in dmesg Change-Id: If1a888d141f02574ad76c76b1a8b61c63c9ea6d6
Diffstat (limited to 'mhi')
-rw-r--r--mhi/core/misc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/mhi/core/misc.h b/mhi/core/misc.h
index 78bf8fb..b76fd49 100644
--- a/mhi/core/misc.h
+++ b/mhi/core/misc.h
@@ -85,6 +85,16 @@
##__VA_ARGS__); \
} while (0)
+#if defined(CONFIG_WCN_GOOGLE)
+#define MHI_LOG(fmt, ...) do { \
+ struct mhi_private *mhi_priv = \
+ dev_get_drvdata(&mhi_cntrl->mhi_dev->dev); \
+ dev_info(dev, "[I][%s] " fmt, __func__, ##__VA_ARGS__); \
+ if (mhi_priv && mhi_priv->log_lvl <= MHI_MSG_LVL_INFO) \
+ ipc_log_string(mhi_priv->log_buf, "[I][%s] " fmt, __func__, \
+ ##__VA_ARGS__); \
+} while (0)
+#else
#define MHI_LOG(fmt, ...) do { \
struct mhi_private *mhi_priv = \
dev_get_drvdata(&mhi_cntrl->mhi_dev->dev); \
@@ -93,6 +103,7 @@
ipc_log_string(mhi_priv->log_buf, "[I][%s] " fmt, __func__, \
##__VA_ARGS__); \
} while (0)
+#endif
#define MHI_ERR(fmt, ...) do { \
struct mhi_private *mhi_priv = \