- Jul 24, 2013
-
-
Wolfgang Denk authored
Signed-off-by:
Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by:
Tom Rini <trini@ti.com>
-
- Jun 25, 2013
-
-
Joe Hershberger authored
Make the link-local code conform more completely with the RFC. This will prevent ARP queries for the target (such as while it is rebooting) from causing the device to choose a different link-local address, thinking that its address is in use by another machine. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Kim Phillips authored
tftp.c:464:17: warning: cast to restricted __be16 tftp.c:552:29: warning: cast to restricted __be16 tftp.c:640:33: warning: cast to restricted __be16 tftp.c:642:25: warning: cast to restricted __be16 Signed-off-by:
Kim Phillips <kim.phillips@freescale.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
-
Matthias Brugger authored
This patch tackles the time out problem which leads to break the boot process, when loading file over nfs. The patch does two things. First of all, we just ignore messages that arrive with a rpc_id smaller then the client id. We just interpret this messages as answers to formaly timed out messages. Second, when a time out occurs we double the time to wait, so that we do not stress the server resending the last message. Signed-off-by:
Matthias Brugger <matthias.bgg@gmail.com> Tested-by:
Enric Balletbo i Serra <eballetbo@gmail.com>
-
- Jun 19, 2013
-
-
Jim Lin authored
If we try to boot from NET device, NetInitLoop in net.c will be invoked. If NET device is not installed, eth_get_dev() function will return eth_current value, which is NULL. When NetInitLoop is called, "eth_get_dev->enetaddr" will access restricted memory area and therefore cause hanging. This issue is found on Tegra30 Cardhu platform after adding CONFIG_CMD_NET and CONFIG_CMD_DHCP in config header file. Signed-off-by:
Jim Lin <jilin@nvidia.com> Tested-by:
Stephen Warren <swarren@nvidia.com>
-
- Mar 01, 2013
-
-
Simon Glass authored
Use setenv_ulong(), setenv_hex() and setenv_addr() in net/ Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Dec 15, 2012
-
-
Joe Hershberger authored
The ip is stored in network order, so we can't test it in host order. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Kim Phillips <kim.phillips@freescale.com>
-
Simon Glass authored
This prints a tftp speed indication after the download completes. This is the 3.6 MiB/s indicator below. Tegra2 (SeaBoard) # tftp ... Using asx0 device TFTP from server 172.22.72.144; our IP address is 172.22.73.81 Filename '/tftpboot/uImage-user-seaboard-1'. Load address: 0x408000 Loading: ################################################# 3.6 MiB/s done Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Igor Grinberg <grinberg@compulab.co.il>
-
- Dec 13, 2012
-
-
Joe Hershberger authored
Remove the hard-coded bootfile handler and use a callback instead Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
Move the getenv_yesno() to env_common.c and change most checks for 'y' or 'n' to use this helper. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- Nov 04, 2012
-
-
Kim Phillips authored
bootp.c:44:14: warning: symbol 'dhcp_state' was not declared. Should it be static? bootp.c:45:15: warning: symbol 'dhcp_leasetime' was not declared. Should it be static? bootp.c:46:10: warning: symbol 'NetDHCPServerIP' was not declared. Should it be static? arp.c:30:17: warning: symbol 'NetArpWaitReplyIP' was not declared. Should it be static? arp.c:37:16: warning: symbol 'NetArpTxPacket' was not declared. Should it be static? arp.c:38:17: warning: symbol 'NetArpPacketBuf' was not declared. Should it be static? atheros.c:33:19: warning: symbol 'AR8021_driver' was not declared. Should it be static? net.c:183:7: warning: symbol 'PktBuf' was not declared. Should it be static? net.c:159:21: warning: symbol 'net_state' was not declared. Should it be static? ping.c:73:6: warning: symbol 'ping_start' was not declared. Should it be static? ping.c:82:13: warning: symbol 'ping_receive' was not declared. Should it be static? tftp.c:53:7: warning: symbol 'TftpRRQTimeoutMSecs' was not declared. Should it be static? tftp.c:54:5: warning: symbol 'TftpRRQTimeoutCountMax' was not declared. Should it be static? eth.c:125:19: warning: symbol 'eth_current' was not declared. Should it be static? Note: in the ping.c fix, commit a36b12f9 "net: Move PING out of net.c" mistakenly carried the ifdef CMD_PING clause from when it was necessary to avoid warnings when it was embedded in net.c. Signed-off-by:
Kim Phillips <kim.phillips@freescale.com>
-
- Oct 03, 2012
-
-
Joe Hershberger authored
Adjustment of Michael Walle's fix patch Commit 8a0eccb1 breaks netconsole. src_ip must not be converted to host byte order, because nc_ip is already stored in network byte order (see string_to_ip(), called by getenv_IPaddr()). Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- Oct 01, 2012
-
-
Ilya Yanok authored
This patch adds support for networking in SPL. Some devices are capable of loading SPL via network so it makes sense to load the main U-Boot binary via network too. This patch tries to use existing network code as much as possible. Unfortunately, it depends on environment which in turn depends on other code so SPL size is increased significantly. No effort was done to decouple network code and environment so far. Signed-off-by:
Ilya Yanok <ilya.yanok@cogentembedded.com> Acked-by:
Joe Hershberger <joe.hershberger@ni.com> Signed-off-by:
Tom Rini <trini@ti.com>
-
Ilya Yanok authored
Vendor Class Identifier option is common to BOOTP and DHCP and can be useful without PXE. So send VCI in both BOOTP and DHCP requests if CONFIG_BOOTP_VCI_STRING is defined. Signed-off-by:
Ilya Yanok <ilya.yanok@cogentembedded.com> Signed-off-by:
Tom Rini <trini@ti.com>
-
- Sep 27, 2012
-
-
Brian Rzycki authored
Some DHCP servers (notably dnsmasq) always transmit DHCP Option 28, Broadcast Address as specified in RFC 2132. Without this patch u-boot displays the warning: *** Unhandled DHCP Option in OFFER/ACK: 28 The patch suppresses the warning and ignores DHCP Option 28. There is no environment variable to set the broadcast address into and if for some reason u-boot needs the broadcast it can be calculated from ipaddr and netmask. Signed-off-by:
Brian Rzycki <bmr@freescale.com>
-
Benoît Thébaudeau authored
If dev->enetaddr was supposed to be set with dev->write_hwaddr() but the MAC address was not valid, return an error. Signed-off-by:
Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Acked-by:
Mike Frysinger <vapier@gentoo.org>
-
- Sep 24, 2012
-
-
Joe Hershberger authored
Check the incoming packets' source IP address... if ncip isn't set to a broadcast address, only listen to the client at ncip. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
Previously u-boot would initialize the network interface for every network operation and then shut it down again. This makes sense for most operations where the network in not known to be needed soon after the operation is complete. In the case of netconsole, it will use the network for every interaction with the shell or every printf. This means that the network is being reinitialized very often. On many devices, this intialization is very slow. This patch checks for consecutive netconsole actions and leaves the ethernet hardware initialized between them. It will still behave the same old way for all other network operations and any time another network operation happens between netconsole operations. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Cc: Stefano Babic <sbabic@denx.de> Acked-by:
Stefano Babic <sbabic@denx.de>
-
Tetsuyuki Kobayashi authored
NetSetTimeout sets incorrect value to timeDelta when CONFIG_SYS_HZ != 1000. Signed-off-by:
Tetsuyuki Kobayashi <koba@kmckk.co.jp>
-
Michael Walle authored
If the requested length is too small to hold the received packet, eth_receive() will return -1 and will leave the packet in the receive buffers. Instead of returning an error in this case, we return the first portion of the received packet and remove it from the receive buffers. This fixes FreeBSD's ubldr. Without this patch it will just stop receiving packets if the NIC receives more than PKTBUFSRX too large packets. Signed-off-by:
Michael Walle <michael@walle.cc> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Rafal Jaworowski <raj@semihalf.com> Cc: Piotr Kruszynski <ppk@semihalf.com>
-
- Jul 24, 2012
-
-
Joe Hershberger authored
NetConsole may call NetSendUDPPacket before NetLoop is called. This will cause the source MAC address (NetOurEther) to be wrong. Instead of only changing it in NetLoop, move it to NetLoopInit so that it is also updated when net_init() is called (especially by nc_start()). Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reported-by:
Michael Walle <michael@walle.cc> Acked-by:
Michael Walle <michael@walle.cc>
-
- Jul 19, 2012
-
-
benoit.thebaudeau@advans authored
Fix comment within comment build error. Signed-off-by:
Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
-
benoit.thebaudeau@advans authored
Fix NetSetState function name used with CONFIG_BOOTP_MAY_FAIL. Signed-off-by:
Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
-
- Jul 12, 2012
-
-
Tetsuyuki Kobayashi authored
NFS_TIMEOUT is constant value defined in net/nfs.c. But sometimes it needs to adjust. This patch enables to override NFS_TIMEOUT by defining CONFIG_NFS_TIMEOUT in a board specific config file. Signed-off-by:
Tetsuyuki Kobayashi <koba@kmckk.co.jp>
-
- Jul 11, 2012
-
-
Joe Hershberger authored
This function is currently only used in one case. Inline for now. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Rob Herring authored
If the net driver has setup a valid ethernet address and an ethernet address is not set in the environment already, then set the environment variables from the net driver setting. This enables pxe booting on boards which don't set ethaddr env variable. Signed-off-by:
Rob Herring <rob.herring@calxeda.com>
-
Jayachandran Chandrasekharan Nair authored
The block argument for store_block can be -1 when the tftp sequence number rolls over (i.e TftpBlock == 0), so the first argument to store_block has to be of type 'int' instead of 'unsigned'. In our environment (gcc 4.4.5 mips toolchain), this causes incorrect 'offset' to be generated for storing the block, and the tftp block with number 0 will be written elsewhere, resulting in a bad block in the downloaded file and a memory corruption. Signed-off-by:
Jayachandran Chandrasekharan Nair <jayachandranc@netlogicmicro.com>
-
- Jul 10, 2012
-
-
Mike Frysinger authored
The clean up patch missed an &, so we end up passing an int rather than a pointer to the sprintf function. arp.c: In function 'ArpReceive': arp.c:197: warning: format '%p' expects type 'void *', but argument 3 has type 'int' Signed-off-by:
Mike Frysinger <vapier@gentoo.org>
-
Wolfgang Denk authored
Signed-off-by:
Wolfgang Denk <wd@denx.de>
-
- Jul 08, 2012
-
-
Kim Phillips authored
commit "net: use common rand()/srand() functions" introduced the following build warning on the current u-boot-arm tree: $ ./MAKEALL MPC8313ERDB_66 Configuring for MPC8313ERDB_66 - Board: MPC8313ERDB, Options: SYS_66MHZ text data bss dec hex filename 271988 13976 41768 327732 50034 ./u-boot In file included from bootp.c:15:0: net_rand.h: In function 'srand_mac': net_rand.h:40:2: warning: implicit declaration of function 'srand' [-Wimplicit-function-declaration] adding this dependency fixes it. Cc: Michael Walle <michael@walle.cc> Cc: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by:
Kim Phillips <kim.phillips@freescale.com> Acked-by:
Michael Walle <michael@walle.cc>
-
- Jul 07, 2012
-
-
Michael Walle authored
Add new function eth_random_enetaddr() to generate a locally administered ethernet address. Signed-off-by:
Michael Walle <michael@walle.cc> Acked-by:
Joe Hershberger <joe.hershberger@gmail.com>
-
Michael Walle authored
Replace rand() with the functions from lib/. The link-local network code stores its own seed, derived from the MAC address. Thus making it independent from calls to srand() in other modules. Signed-off-by:
Michael Walle <michael@walle.cc> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- May 23, 2012
-
-
Joe Hershberger authored
Add several levels of DEBUG prints so that you can limit the noise to the severety of your problem. DEBUG_LL_STATE = Link local state machine changes DEBUG_DEV_PKT = Packets or info directed to the device DEBUG_NET_PKT = Packets on info on the network at large DEBUG_INT_STATE = Internal network state changes Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
Cisco's arp-proxy feature fails to ignore the link-local address range This means that a link-local device on a network with this Cisco equipment will reply to ARP requests for our device (in addition to our reply). If we happen to reply first, the requester's ARP table will be populated with our MAC address, and one packet will be sent to us... shortly following this, the requester will get an ARP reply from the Cisco equipment telling the requester to send packets their way instead of to our device from now on. This work-around detects this link-local condition and will delay replying to the ARP request for 5ms so that the first packet is sent to the Cisco equipment and all following packets are sent to our device. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
Code based on networking/zcip.c in busybox commit 8531d76a15890c2c535908ce888b2e2aed35b172 Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
Link-local support will need to send ARP packets, but needs more fine-grained control over the contents. Split the implementation into 2 parts so link-local can share the code. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
Use the NetArpTxPacket for the ARP packet, not to hold what used to be in NetTxPacket. This saves a copy and makes the code easier to understand. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
A new non-static function net_init() will initialize buffers and read from the environment. Only update from the env on each entry to NetLoop(). Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Noone uses it. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Don't force ARP clients to return the MAC address if they don't care (such as ping) Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Mike Frysinger <vapier@gentoo.org>
-