aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-10-24 18:00:05 +0000
committerWolfgang Denk <wd@denx.de>2011-10-26 21:34:44 +0200
commit58f317d1823c34b41990f21931d143a6606f5507 (patch)
tree62ec42cc1c56ab96622a8487708fb2e16e0e4eb8
parente4cde2f70d2377fdf484cbbc1729b188f81b8ec8 (diff)
downloadu-boot-linaro-stable-58f317d1823c34b41990f21931d143a6606f5507.tar.gz
net: tftpput: Support selecting get/put for tftp
TftpStart should support starting either a get or a put. Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r--include/net.h2
-rw-r--r--net/bootp.c2
-rw-r--r--net/tftp.c3
-rw-r--r--net/tftp.h2
4 files changed, 4 insertions, 5 deletions
diff --git a/include/net.h b/include/net.h
index 495f60e72..b408dea66 100644
--- a/include/net.h
+++ b/include/net.h
@@ -367,7 +367,7 @@ extern int NetRestartWrap; /* Tried all network devices */
enum proto_t {
BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
- TFTPSRV
+ TFTPSRV, TFTPPUT
};
/* from net/net.c */
diff --git a/net/bootp.c b/net/bootp.c
index 73470f2d4..b703f428c 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -165,7 +165,7 @@ static void auto_load(void)
}
#endif
}
- TftpStart();
+ TftpStart(TFTPGET);
}
#if !defined(CONFIG_CMD_DHCP)
diff --git a/net/tftp.c b/net/tftp.c
index 6d46bbbe7..7e3bb3dc2 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -595,8 +595,7 @@ TftpTimeout(void)
}
-void
-TftpStart(void)
+void TftpStart(enum proto_t protocol)
{
char *ep; /* Environment pointer */
diff --git a/net/tftp.h b/net/tftp.h
index 3abdf7bc2..c51aa253c 100644
--- a/net/tftp.h
+++ b/net/tftp.h
@@ -16,7 +16,7 @@
*/
/* tftp.c */
-extern void TftpStart (void); /* Begin TFTP get */
+void TftpStart(enum proto_t protocol); /* Begin TFTP get/put */
#ifdef CONFIG_CMD_TFTPSRV
extern void TftpStartServer(void); /* Wait for incoming TFTP put */