summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-11-06 09:45:33 -0500
committerTom Rini <[email protected]>2023-11-06 09:45:33 -0500
commitfd0d7d7efecd22d5a9cc77cb7589c4f144a1c506 (patch)
tree931e72fdf65dbfde58b84ee4de4d7cb1f360dbcf /include
parenta4c83bda17196bf5d1ce640844595aaeced6465e (diff)
parentd44f3d21fe4420709b5a09379b809a3b92b7fa07 (diff)
Merge branch '2023-11-06-networking-updates'
- A few dhcp related improvements, be clearer to the user when we don't have a MAC address, assorted driver/phy improvements and new drivers.
Diffstat (limited to 'include')
-rw-r--r--include/net.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h
index e254df7d7f4..e63a946002d 100644
--- a/include/net.h
+++ b/include/net.h
@@ -16,6 +16,7 @@
#include <asm/cache.h>
#include <asm/byteorder.h> /* for nton* / ntoh* stuff */
#include <env.h>
+#include <hexdump.h>
#include <log.h>
#include <time.h>
#include <linux/if_ether.h>
@@ -29,6 +30,7 @@ struct udevice;
#define DEBUG_DEV_PKT 0 /* Packets or info directed to the device */
#define DEBUG_NET_PKT 0 /* Packets on info on the network at large */
#define DEBUG_INT_STATE 0 /* Internal network state changes */
+#define DEBUG_NET_PKT_TRACE 0 /* Trace all packet data */
/*
* The number of receive packet buffers, and the required packet buffer
@@ -640,6 +642,8 @@ uchar * net_get_async_tx_pkt_buf(void);
/* Transmit a packet */
static inline void net_send_packet(uchar *pkt, int len)
{
+ if (DEBUG_NET_PKT_TRACE)
+ print_hex_dump_bytes("tx: ", DUMP_PREFIX_OFFSET, pkt, len);
/* Currently no way to return errors from eth_send() */
(void) eth_send(pkt, len);
}