Commit 58f317d1823c34b41990f21931d143a6606f5507

Authored by Simon Glass
Committed by Wolfgang Denk
1 parent e4cde2f70d

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>

Showing 4 changed files with 4 additions and 5 deletions Side-by-side Diff

... ... @@ -367,7 +367,7 @@
367 367  
368 368 enum proto_t {
369 369 BOOTP, RARP, ARP, TFTPGET, DHCP, PING, DNS, NFS, CDP, NETCONS, SNTP,
370   - TFTPSRV
  370 + TFTPSRV, TFTPPUT
371 371 };
372 372  
373 373 /* from net/net.c */
... ... @@ -165,7 +165,7 @@
165 165 }
166 166 #endif
167 167 }
168   - TftpStart();
  168 + TftpStart(TFTPGET);
169 169 }
170 170  
171 171 #if !defined(CONFIG_CMD_DHCP)
... ... @@ -595,8 +595,7 @@
595 595 }
596 596  
597 597  
598   -void
599   -TftpStart(void)
  598 +void TftpStart(enum proto_t protocol)
600 599 {
601 600 char *ep; /* Environment pointer */
602 601  
... ... @@ -16,7 +16,7 @@
16 16 */
17 17  
18 18 /* tftp.c */
19   -extern void TftpStart (void); /* Begin TFTP get */
  19 +void TftpStart(enum proto_t protocol); /* Begin TFTP get/put */
20 20  
21 21 #ifdef CONFIG_CMD_TFTPSRV
22 22 extern void TftpStartServer(void); /* Wait for incoming TFTP put */