diff options
author | Simon Glass <sjg@chromium.org> | 2011-10-24 18:00:02 +0000 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2011-11-17 17:09:51 -0800 |
commit | 52d640d58d0bba723df03de4493cdcab167ca2ee (patch) | |
tree | 744de14e4752c84655929a6a54237a597c7b66c3 /net | |
parent | da7491fc37940f82c15b44b03dfd209502235756 (diff) |
BACKPORT: net: tftpput: Rename TFTP to TFTPGET
This is a better name for this protocol. Also remove the typedef to keep
checkpatch happy, and move zeroing of NetBootFileXferSize a little
earlier since TFTPPUT will need to change this.
(cherry-picked from e4bf0c5)
Change-Id: I90d03045de0231553a693f7119bdcc67a908e3c9
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/11796
Diffstat (limited to 'net')
-rw-r--r-- | net/net.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/net/net.c b/net/net.c index 5eaf5333550..8990e987e07 100644 --- a/net/net.c +++ b/net/net.c @@ -227,7 +227,7 @@ static ulong timeDelta; /* THE transmit packet */ volatile uchar *NetTxPacket; -static int net_check_prereq(proto_t protocol); +static int net_check_prereq(enum proto_t protocol); static int NetTryCount; @@ -313,8 +313,7 @@ void ArpTimeoutCheck(void) } } -static void -NetInitLoop(proto_t protocol) +static void NetInitLoop(enum proto_t protocol) { static int env_changed_id; bd_t *bd = gd->bd; @@ -343,8 +342,7 @@ NetInitLoop(proto_t protocol) * Main network processing loop. */ -int -NetLoop(proto_t protocol) +int NetLoop(enum proto_t protocol) { bd_t *bd = gd->bd; int ret = -1; @@ -422,10 +420,11 @@ restart: #ifdef CONFIG_NET_MULTI NetDevExists = 1; #endif + NetBootFileXferSize = 0; switch (protocol) { - case TFTP: + case TFTPGET: /* always use ARP to get server ethernet address */ - TftpStart(); + TftpStart(protocol); break; #ifdef CONFIG_CMD_TFTPSRV case TFTPSRV: @@ -487,7 +486,6 @@ restart: break; } - NetBootFileXferSize = 0; break; } @@ -1790,7 +1788,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) { /* Fall through */ @@ -1821,7 +1819,7 @@ static int net_check_prereq(proto_t protocol) #if defined(CONFIG_CMD_NFS) case NFS: #endif - case TFTP: + case TFTPGET: if (NetServerIP == 0) { puts("*** ERROR: `serverip' not set\n"); return 1; |