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>
This commit is contained in:
Joe Perches
2012-01-15 00:38:40 -08:00
committed by John W. Linville
parent d6400c29ab
commit 1e02382979
4 changed files with 84 additions and 92 deletions

View File

@@ -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) */