summaryrefslogtreecommitdiff
path: root/net/eth_legacy.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/eth_legacy.c')
-rw-r--r--net/eth_legacy.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/eth_legacy.c b/net/eth_legacy.c
index 850f362d87..41f5263526 100644
--- a/net/eth_legacy.c
+++ b/net/eth_legacy.c
@@ -11,6 +11,7 @@
#include <net.h>
#include <phy.h>
#include <linux/errno.h>
+#include <net/pcap.h>
#include "eth_internal.h"
DECLARE_GLOBAL_DATA_PTR;
@@ -352,10 +353,17 @@ int eth_is_active(struct eth_device *dev)
int eth_send(void *packet, int length)
{
+ int ret;
+
if (!eth_current)
return -ENODEV;
- return eth_current->send(eth_current, packet, length);
+ ret = eth_current->send(eth_current, packet, length);
+#if defined(CONFIG_CMD_PCAP)
+ if (ret >= 0)
+ pcap_post(packet, lengeth, true);
+#endif
+ return ret;
}
int eth_rx(void)