summaryrefslogtreecommitdiff
path: root/net/tftp.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-06-05 19:27:42 +0000
committerwdenk <wdenk>2003-06-05 19:27:42 +0000
commit73a8b27c574f5ec1c8fdd9d8d065bb845d8743d3 (patch)
treef409359364776e565b9484337a0620388041b456 /net/tftp.c
parent08eaea9c9fa4e8ea25325610c512cb90b6bea1dd (diff)
downloadu-boot-imx-73a8b27c574f5ec1c8fdd9d8d065bb845d8743d3.zip
u-boot-imx-73a8b27c574f5ec1c8fdd9d8d065bb845d8743d3.tar.gz
u-boot-imx-73a8b27c574f5ec1c8fdd9d8d065bb845d8743d3.tar.bz2
* Add support for RMU board
* Add support for TQM862L at 100/50 MHz * Patch by Pantelis Antoniou, 02 Jun 2003: major reconstruction of networking code; add "ping" support (outgoing only!)
Diffstat (limited to 'net/tftp.c')
-rw-r--r--net/tftp.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/net/tftp.c b/net/tftp.c
index 0ad244f..5598be3 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -142,10 +142,7 @@ TftpSend (void)
break;
}
- NetSetEther (NetTxPacket, NetServerEther, PROT_IP);
- NetSetIP (NetTxPacket + ETHER_HDR_SIZE, NetServerIP,
- TftpServerPort, TftpOurPort, len);
- NetSendPacket (NetTxPacket, ETHER_HDR_SIZE + IP_HDR_SIZE + len);
+ NetSendUDPPacket(NetServerEther, NetServerIP, TftpServerPort, TftpOurPort, len);
}
@@ -257,17 +254,6 @@ TftpTimeout (void)
void
TftpStart (void)
{
-#ifdef ET_DEBUG
- printf ("\nServer ethernet address %02x:%02x:%02x:%02x:%02x:%02x\n",
- NetServerEther[0],
- NetServerEther[1],
- NetServerEther[2],
- NetServerEther[3],
- NetServerEther[4],
- NetServerEther[5]
- );
-#endif /* DEBUG */
-
if (BootFile[0] == '\0') {
IPaddr_t OurIP = ntohl(NetOurIP);
@@ -320,6 +306,9 @@ TftpStart (void)
TftpState = STATE_RRQ;
TftpOurPort = 1024 + (get_timer(0) % 3072);
+ /* zero out server ether in case the server ip has changed */
+ memset(NetServerEther, 0, 6);
+
TftpSend ();
}