aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/microblaze/lib/net_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/microblaze/lib/net_common.c')
-rw-r--r--firmware/microblaze/lib/net_common.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/firmware/microblaze/lib/net_common.c b/firmware/microblaze/lib/net_common.c
index 9804ae4c5..947f41dae 100644
--- a/firmware/microblaze/lib/net_common.c
+++ b/firmware/microblaze/lib/net_common.c
@@ -37,6 +37,8 @@
#include <string.h>
#include "pkt_ctrl.h"
+static const bool debug = false;
+
static const eth_mac_addr_t BCAST_MAC_ADDR = {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}};
// ------------------------------------------------------------------------
@@ -159,7 +161,7 @@ send_pkt(eth_mac_addr_t dst, int ethertype,
total_len = 60;
pkt_ctrl_commit_outgoing_buffer(total_len/4);
- //printf("sent %d bytes\n", total_len);
+ if (debug) printf("sent %d bytes\n", (int)total_len);
}
unsigned int CHKSUM(unsigned int x, unsigned int *chksum)
@@ -388,9 +390,9 @@ handle_arp_packet(struct arp_eth_ipv4 *p, size_t size)
void
handle_eth_packet(uint32_t *p, size_t nlines)
{
- //static size_t bcount = 0;
- //printf("===> %d\n", bcount++);
- //print_buffer(p, nlines);
+ static size_t bcount = 0;
+ if (debug) printf("===> %d\n", (int)bcount++);
+ if (debug) print_buffer(p, nlines);
padded_eth_hdr_t *eth_hdr = (padded_eth_hdr_t *)p;