2 * Minimal debug/trace/assert driver definitions for
3 * Broadcom Home Networking Division 10/100 Mbit/s Ethernet
6 * Copyright (C) 2012, Broadcom Corporation. All Rights Reserved.
8 * Permission to use, copy, modify, and/or distribute this software for any
9 * purpose with or without fee is hereby granted, provided that the above
10 * copyright notice and this permission notice appear in all copies.
12 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
15 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
17 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
18 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19 * $Id: et_dbg.h 348614 2012-08-02 19:16:22Z $
27 extern void etc_prhdr(char *msg
, struct ether_header
*eh
, uint len
, int unit
);
28 extern void etc_prhex(char *msg
, uchar
*buf
, uint nbytes
, int unit
);
30 * et_msg_level is a bitvector:
32 * 1 function-level tracing
33 * 2 one-line frame tx/rx summary
34 * 3 complex frame tx/rx in hex
36 #define ET_ERROR(args) if (!(et_msg_level & 1)) ; else printf args
37 #define ET_TRACE(args) if (!(et_msg_level & 2)) ; else printf args
38 #define ET_PRHDR(msg, eh, len, unit) if (!(et_msg_level & 4)) ; else etc_prhdr(msg, eh, len, unit)
39 #define ET_PRPKT(msg, buf, len, unit) if (!(et_msg_level & 8)) ; else etc_prhex(msg, buf, len, unit)
41 #define ET_ERROR(args)
42 #define ET_TRACE(args)
43 #define ET_PRHDR(msg, eh, len, unit)
44 #define ET_PRPKT(msg, buf, len, unit)
47 extern uint32 et_msg_level
;
49 #define ET_LOG(fmt, a1, a2)
51 /* include port-specific tunables */
57 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
58 #include <linux/config.h>
59 #endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36) */
65 #elif defined(__NetBSD__)