aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/brcm80211/brcmutil
diff options
context:
space:
mode:
authorJoe Perches2012-01-15 00:38:40 -0800
committerJohn W. Linville2012-01-24 14:21:13 -0500
commit1e02382979dd422e3b1bdb45545a0699497e3692 (patch)
treebd640f0c9c3c42d8773630185df6b828a65de066 /drivers/net/wireless/brcm80211/brcmutil
parentd6400c29abcd218bcc9be5d09f76e0770e25face (diff)
brcm80211: Add and use brcmX_dbg_dump_hex
Reduce the number of #ifdef DEBUG uses by adding a dbg_hex_dump routine which has the appropriate #ifdef DEBUG test. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmutil')
-rw-r--r--drivers/net/wireless/brcm80211/brcmutil/utils.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmutil/utils.c b/drivers/net/wireless/brcm80211/brcmutil/utils.c
index e25fb2da8e66..2207eaa34f8e 100644
--- a/drivers/net/wireless/brcm80211/brcmutil/utils.c
+++ b/drivers/net/wireless/brcm80211/brcmutil/utils.c
@@ -253,4 +253,22 @@ void brcmu_prpkt(const char *msg, struct sk_buff *p0)
print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, p->data, p->len);
}
EXPORT_SYMBOL(brcmu_prpkt);
+
+void brcmu_dbg_hex_dump(const void *data, size_t size, const char *fmt, ...)
+{
+ struct va_format vaf;
+ va_list args;
+
+ va_start(args, fmt);
+
+ vaf.fmt = fmt;
+ vaf.va = &args;
+
+ pr_debug("%pV", &vaf);
+
+ va_end(args);
+
+ print_hex_dump_bytes("", DUMP_PREFIX_OFFSET, data, size);
+}
+EXPORT_SYMBOL(brcmu_dbg_hex_dump);
#endif /* defined(DEBUG) */