summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-05-23 07:59:13 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-05-23 17:46:20 -0500
commitadf5d93e441eb3eacd8c0430d6064b35d47ad2a5 (patch)
treed8e088ac9d135ab710a276b405c3ed3e5f19b872 /net/net.c
parent61da3c2af8ba7a06cb1f7e9e0db54b9ddea532ce (diff)
downloadu-boot-adf5d93e441eb3eacd8c0430d6064b35d47ad2a5.tar.gz
net: Refactor to use NetSendPacket instead of eth_send directly
Use this entry-point consistently across the net/ code Use a static inline function to preserve code size Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/net.c b/net/net.c
index b29d372b89..e5fbda3e7f 100644
--- a/net/net.c
+++ b/net/net.c
@@ -584,13 +584,6 @@ NetSetTimeout(ulong iv, thand_f *f)
}
}
-
-void
-NetSendPacket(uchar *pkt, int len)
-{
- (void) eth_send(pkt, len);
-}
-
int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport,
int payload_len)
{
@@ -646,7 +639,7 @@ int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport,
return 1; /* waiting */
} else {
debug("sending UDP to %pI4/%pM\n", &dest, ether);
- eth_send(NetTxPacket, pkt_hdr_size + payload_len);
+ NetSendPacket(NetTxPacket, pkt_hdr_size + payload_len);
return 0; /* transmitted */
}
}