summaryrefslogtreecommitdiff
path: root/include/net.h
diff options
context:
space:
mode:
authorJoe Hershberger <joe.hershberger@ni.com>2012-05-23 07:59:24 +0000
committerJoe Hershberger <joe.hershberger@ni.com>2012-05-23 17:53:07 -0500
commite94070c443bdc9c0231abeca920d9f9362701aec (patch)
tree070a846a4e5ec79753f6267ada3ac09c31ed1320 /include/net.h
parentd7310c7e63ca9ffd42527dc9735cb505cbe908b7 (diff)
downloadu-boot-imx-e94070c443bdc9c0231abeca920d9f9362701aec.zip
u-boot-imx-e94070c443bdc9c0231abeca920d9f9362701aec.tar.gz
u-boot-imx-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.h6
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 */