]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/net/netconsole.c
net: Allow filtering on debug traces in the net subsystem
[karo-tx-uboot.git] / drivers / net / netconsole.c
index 19e563ea820a25eb1193c91b8f5a3b95bf581619..14243b8a92c05f22efc26504b80fc0bd338671b5 100644 (file)
@@ -83,6 +83,8 @@ int nc_input_packet(uchar *pkt, unsigned dest, unsigned src, unsigned len)
        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 @@ static void nc_send_packet(const char *buf, int len)
        uchar *ether;
        IPaddr_t ip;
 
+       debug_cond(DEBUG_DEV_PKT, "output: \"%*.*s\"\n", len, len, buf);
+
        eth = eth_get_dev();
        if (eth == NULL)
                return;