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:

committed by
John W. Linville

parent
d6400c29ab
commit
1e02382979
@@ -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) */
|
||||
|
Reference in New Issue
Block a user