22 #ifndef __HISAX_DEBUG_H__
23 #define __HISAX_DEBUG_H__
26 #ifdef CONFIG_HISAX_DEBUG
28 #define DBG(level, format, arg...) do { \
29 if (level & __debug_variable) \
30 printk(KERN_DEBUG "%s: " format "\n" , __func__ , ## arg); \
33 #define DBG_PACKET(level, data, count) \
34 if (level & __debug_variable) dump_packet(__func__, data, count)
36 #define DBG_SKB(level, skb) \
37 if ((level & __debug_variable) && skb) dump_packet(__func__, skb->data, skb->len)
43 #define DUMP_HDR_SIZE 20
44 #define DUMP_TLR_SIZE 8
50 if (pkt_len > DUMP_HDR_SIZE + DUMP_TLR_SIZE) {
54 len1 = pkt_len > DUMP_HDR_SIZE ? DUMP_HDR_SIZE :
pkt_len;
57 for (i = 0; i < len1; ++
i) {
62 for (i = pkt_len-DUMP_TLR_SIZE; i <
pkt_len; ++
i) {
74 #define DBG(level, format, arg...) do {} while (0)
75 #define DBG_PACKET(level, data, count) do {} while (0)
76 #define DBG_SKB(level, skb) do {} while (0)