net: Allow filtering on debug traces in the net subsystem

Add several levels of DEBUG prints so that you can limit the noise to
the severety of your problem.

DEBUG_LL_STATE = Link local state machine changes
DEBUG_DEV_PKT = Packets or info directed to the device
DEBUG_NET_PKT = Packets on info on the network at large
DEBUG_INT_STATE = Internal network state changes

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 19e563e..14243b8 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -83,6 +83,8 @@
 	if (dest != nc_port || !len)
 		return 0; /* not for us */
 
+	debug_cond(DEBUG_DEV_PKT, "input: \"%*.*s\"\n", len, len, pkt);
+
 	if (input_size == sizeof(input_buffer))
 		return 1; /* no space */
 	if (len > sizeof(input_buffer) - input_size)
@@ -112,6 +114,8 @@
 	uchar *ether;
 	IPaddr_t ip;
 
+	debug_cond(DEBUG_DEV_PKT, "output: \"%*.*s\"\n", len, len, buf);
+
 	eth = eth_get_dev();
 	if (eth == NULL)
 		return;