diff options
author | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 07:59:24 +0000 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2012-05-23 17:53:07 -0500 |
commit | e94070c443bdc9c0231abeca920d9f9362701aec (patch) | |
tree | 070a846a4e5ec79753f6267ada3ac09c31ed1320 /include/net.h | |
parent | d7310c7e63ca9ffd42527dc9735cb505cbe908b7 (diff) | |
download | u-boot-e94070c443bdc9c0231abeca920d9f9362701aec.zip u-boot-e94070c443bdc9c0231abeca920d9f9362701aec.tar.gz u-boot-e94070c443bdc9c0231abeca920d9f9362701aec.tar.bz2 |
net: Don't copy every packet that waits for an ARP
Use the NetArpTxPacket for the ARP packet, not to hold what used to
be in NetTxPacket.
This saves a copy and makes the code easier to understand.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net.h b/include/net.h index ec41366..52b9a29 100644 --- a/include/net.h +++ b/include/net.h @@ -483,14 +483,14 @@ static inline void net_set_state(enum net_loop_state state) net_state = state; } -/* Transmit "NetTxPacket" */ +/* Transmit a packet */ static inline void NetSendPacket(uchar *pkt, int len) { (void) eth_send(pkt, len); } /* - * Transmit UDP packet, performing ARP request if needed + * Transmit "NetTxPacket" as UDP packet, performing ARP request if needed * (ether will be populated) * * @param ether Raw packet buffer @@ -499,7 +499,7 @@ static inline void NetSendPacket(uchar *pkt, int len) * @param sport Source UDP port * @param payload_len Length of data after the UDP header */ -extern int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, +extern int NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, int payload_len); /* Processes a received packet */ |