1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

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>
This commit is contained in:
Joe Hershberger
2012-05-23 07:59:24 +00:00
parent d7310c7e63
commit e94070c443
5 changed files with 23 additions and 38 deletions

View File

@@ -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 */