mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-07-23 07:12:25 +00:00
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>
This commit is contained in:
parent
61da3c2af8
commit
adf5d93e44
5 changed files with 10 additions and 15 deletions
|
@ -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 */
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue