|
@@ -225,7 +225,7 @@ static ulong timeDelta;
|
|
/* THE transmit packet */
|
|
/* THE transmit packet */
|
|
volatile uchar *NetTxPacket;
|
|
volatile uchar *NetTxPacket;
|
|
|
|
|
|
-static int net_check_prereq(proto_t protocol);
|
|
|
|
|
|
+static int net_check_prereq(enum proto_t protocol);
|
|
|
|
|
|
static int NetTryCount;
|
|
static int NetTryCount;
|
|
|
|
|
|
@@ -311,8 +311,7 @@ void ArpTimeoutCheck(void)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-static void
|
|
|
|
-NetInitLoop(proto_t protocol)
|
|
|
|
|
|
+static void NetInitLoop(enum proto_t protocol)
|
|
{
|
|
{
|
|
static int env_changed_id;
|
|
static int env_changed_id;
|
|
bd_t *bd = gd->bd;
|
|
bd_t *bd = gd->bd;
|
|
@@ -341,8 +340,7 @@ NetInitLoop(proto_t protocol)
|
|
* Main network processing loop.
|
|
* Main network processing loop.
|
|
*/
|
|
*/
|
|
|
|
|
|
-int
|
|
|
|
-NetLoop(proto_t protocol)
|
|
|
|
|
|
+int NetLoop(enum proto_t protocol)
|
|
{
|
|
{
|
|
bd_t *bd = gd->bd;
|
|
bd_t *bd = gd->bd;
|
|
int ret = -1;
|
|
int ret = -1;
|
|
@@ -407,10 +405,11 @@ restart:
|
|
|
|
|
|
case 0:
|
|
case 0:
|
|
NetDevExists = 1;
|
|
NetDevExists = 1;
|
|
|
|
+ NetBootFileXferSize = 0;
|
|
switch (protocol) {
|
|
switch (protocol) {
|
|
- case TFTP:
|
|
|
|
|
|
+ case TFTPGET:
|
|
/* always use ARP to get server ethernet address */
|
|
/* always use ARP to get server ethernet address */
|
|
- TftpStart();
|
|
|
|
|
|
+ TftpStart(protocol);
|
|
break;
|
|
break;
|
|
#ifdef CONFIG_CMD_TFTPSRV
|
|
#ifdef CONFIG_CMD_TFTPSRV
|
|
case TFTPSRV:
|
|
case TFTPSRV:
|
|
@@ -472,7 +471,6 @@ restart:
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
- NetBootFileXferSize = 0;
|
|
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1764,7 +1762,7 @@ NetReceive(volatile uchar *inpkt, int len)
|
|
|
|
|
|
/**********************************************************************/
|
|
/**********************************************************************/
|
|
|
|
|
|
-static int net_check_prereq(proto_t protocol)
|
|
|
|
|
|
+static int net_check_prereq(enum proto_t protocol)
|
|
{
|
|
{
|
|
switch (protocol) {
|
|
switch (protocol) {
|
|
/* Fall through */
|
|
/* Fall through */
|
|
@@ -1795,7 +1793,7 @@ static int net_check_prereq(proto_t protocol)
|
|
#if defined(CONFIG_CMD_NFS)
|
|
#if defined(CONFIG_CMD_NFS)
|
|
case NFS:
|
|
case NFS:
|
|
#endif
|
|
#endif
|
|
- case TFTP:
|
|
|
|
|
|
+ case TFTPGET:
|
|
if (NetServerIP == 0) {
|
|
if (NetServerIP == 0) {
|
|
puts("*** ERROR: `serverip' not set\n");
|
|
puts("*** ERROR: `serverip' not set\n");
|
|
return 1;
|
|
return 1;
|