summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/main.h
diff options
context:
space:
mode:
authorZhaoyang Liu <liuzy@marvell.com>2015-05-11 21:18:19 +0200
committerKalle Valo <kvalo@codeaurora.org>2015-05-26 12:50:35 +0200
commit868093a9df7580d6d50639d58f2c6e334dd73622 (patch)
tree773d7748ab93655596641460aa47c5297bbc891d /drivers/net/wireless/mwifiex/main.h
parentmwifiex: add prints debug ctrl support (diff)
downloadlinux-868093a9df7580d6d50639d58f2c6e334dd73622.tar.xz
linux-868093a9df7580d6d50639d58f2c6e334dd73622.zip
mwifiex: add dump data debug support
This patch is to add support for data hexdump debug feature. It is controlled by level debug_mask in adapter structure. Signed-off-by: Zhaoyang Liu <liuzy@marvell.com> Signed-off-by: Cathy Luo <cluo@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mwifiex/main.h')
-rw-r--r--drivers/net/wireless/mwifiex/main.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index 6cbbc50126ac..2f5516194e32 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -186,6 +186,15 @@ do { \
dev_info((adapter)->dev, fmt, ## args); \
} while (0)
+#define DEBUG_DUMP_DATA_MAX_LEN 128
+#define mwifiex_dbg_dump(adapter, dbg_mask, str, buf, len) \
+do { \
+ if ((adapter)->debug_mask & MWIFIEX_DBG_##dbg_mask) \
+ print_hex_dump(KERN_DEBUG, str, \
+ DUMP_PREFIX_OFFSET, 16, 1, \
+ buf, len, false); \
+} while (0)
+
struct mwifiex_dbg {
u32 num_cmd_host_to_card_failure;
u32 num_cmd_sleep_cfm_host_to_card_failure;