Commit Graph

474 Commits

Author SHA1 Message Date
Joe Hershberger
60304592b9 net: Improve error handling
Take a pass at plumbing errors through to the users of the network stack

Currently only the start() function errors will be returned from
NetLoop(). recv() tends not to have errors, so that is likely not worth
adding. send() certainly can return errors, but this patch does not
attempt to plumb them yet. halt() is not expected to error.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:14 -06:00
Joe Hershberger
6536b9bb76 dm: eth: Add support for ethprime env var
The ethprime env var is used to indicate the starting device if none is
specified in ethact. Also support aliases specified in the ethprime var.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:13 -06:00
Joe Hershberger
e58780dcb7 dm: eth: Add support for aliases
Allow network devices to be referred to as "eth0" instead of
"eth@12345678" when specified in ethact.

Add tests to verify this behavior.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:13 -06:00
Joe Hershberger
17591405a7 dm: eth: Pass the packet pointer as a parameter to recv
Stop forcing drivers to call net_process_received_packet() - formerly
called NetReceive(). Now the uclass will handle calling the driver for
each packet until the driver errors or has nothing to return. The uclass
will then pass the good packets off to the network stack by calling
net_process_received_packet().

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2015-04-18 11:11:12 -06:00
Joe Hershberger
2a504df006 net: Clean up network stack names used in DM drivers
Take the opportunity to enforce better names on newly written or
retrofitted Ethernet drivers.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:12 -06:00
Joe Hershberger
05c3e68f85 dm: eth: Add basic driver model support to Ethernet stack
First just add support for MAC drivers.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:12 -06:00
Joe Hershberger
55d5fd9a84 net: Access mapped physmem in net functions
Previously the net functions would access memory assuming physmem did
not need to be mapped.  In sandbox, that's not the case.

Now we map the physmem specified by the user in loadaddr to the buffer
that represents that space.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:11 -06:00
Joe Hershberger
5c421331d5 net: Make netretry actually do something
netretry previously would only retry in one specific case (your MAC
address is not set) and no other. This is basically useless. In the DM
implementation for eth it turns this into a completely useless case
since an un-configured MAC address results in not even entering the
NetLoop. The behavior is now changed to retry any failed command
(rotating through the eth adapters if ethrotate != no).

It also defaulted to retry forever. It is now changed to default to not
retry

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:11 -06:00
Joe Hershberger
d2eaec6006 net: Remove the bd* parameter from net stack functions
This value is not used by the network stack and is available in the
global data, so stop passing it around.  For the one legacy function
that still expects it (init op on old Ethernet drivers) pass in the
global pointer version directly to avoid changing that interface.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
(Trival fix to remove an unneeded variable declaration in 4xx_enet.c)
2015-04-18 11:11:11 -06:00
Joe Hershberger
fce6900b49 net: Use int instead of u8 for boolean flag
On some archs masking the parameter is inefficient, so don't use u8.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:11 -06:00
Joe Hershberger
05324a488b net: Change return codes from net/eth.c to use errorno constants
Many functions returned -1 previously. Change them to return appropriate error
codes.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:11 -06:00
Joe Hershberger
84eb1fba7b net: Refactor in preparation for driver model
Move some things around and organize things so that the driver model
implementation will fit in more easily.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:10 -06:00
Joe Hershberger
4c7c65afbe net: Rename helper function to be more clear
Make it clear that the helper is checking the addr, not setting it.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:10 -06:00
Joe Hershberger
8b2c9a7157 net: Provide a function to get the current MAC address
The current implementation exposes the eth_device struct to code that
needs to access the MAC address.  Add a wrapper function for this to
abstract away the pointer for this operation.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2015-04-18 11:11:10 -06:00
Simon Glass
0da0fcd51f net: Use new checksum functions
Drop the old checksum functions in favour of the new ones.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-02-12 10:35:33 -07:00
Simon Glass
9b0e35cb48 net: Add a separate file for IP checksumming
Move the checksum code out into its own file so it can be used elsewhere.
Also use a new version which supports a length which is not a multiple of
2 and add a new function to add two checksums.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-23 21:44:59 -07:00
Wu, Josh
ecec4e9c82 net: bootp: as CONFIG_BOOTP_SERVERIP is defined, keep bootfile not changed
Currenly when CONFIG_BOOTP_SERVERIP is defined, the SERVERIP is not changed
when receive the BOOTP packet. But BOOTFILE is changed via BOOTP packet.

As we will load the BOOTFILE from SERVERIP, if the BOOTFILE is modified
by bootp packet but SERVERIP is not, that is not make sense.

This patch make SERVERIP and BOOTFILE be consistent. If we define the
CONFIG_BOOTP_SERVERIP, then SERVERIP and BOOTFILE will not changed by
BOOTP packet. Only IP address is changed.

Signed-off-by: Josh Wu <josh.wu@atmel.com>
2014-12-08 09:35:41 -05:00
Jeroen Hofstee
783a91fdbb eth: make eth_address_set static
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
2014-10-25 07:02:01 -04:00
Simon Glass
8104f54629 net: Display the size when tftpboot finishes
If we know the file size, display it after loading the file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-10-22 21:50:33 -06:00
Wolfgang Denk
2ea9103924 SPDX License cleanup for LiMon imported files
A number of network related files were imported from the LiMon
project; these contain a somewhat unclear license statement:

	Copyright 1994 - 2000 Neil Russell.
	(See License)

I analyzed the source code of LiMon v1.4.2 which was used for this
import.  It does not contain any "License" file, but the top level
directory contains a file "COPYING", which turns out to be GPL v2
of June 1991.  So it is legitimate to conclude that the LiMon derived
files are also to be released under GPLv2.  Mark them as such.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2014-10-10 09:44:43 -04:00
Masahiro Yamada
ed36323f6d kconfig: add blank Kconfig files
This would be useful to start moving various config options.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
2014-09-24 18:30:28 -04:00
Gerhard Sittig
f395e75e27 net: dns: fix for DNS queries sent to the wrong MAC address
When a DNS query is sent out, the ethernet packet can get directed to
the MAC address of a server that was communicated to before.  This is
wrong when the previously stored MAC address corresponds to a different
server's IP address, i.e. when the IP address of the previous and the
current communication are different.

The error can get reproduced by running a sequence of e.g. a TFTP
download and a DNS query, where the TFTP and DNS servers reside on
individual machines.

The fix is to clear the server's MAC address that might be left from a
previous operation, and to fetch the peer's MAC address in a new ARP
lookup, before the DNS query is sent.  This is the approach taken in
other network services, like 8e52533d10 ("net: tftpsrv: Get correct
client MAC address").

Reported-by: Dirk Zimoch <dirk.zimoch@psi.ch>
Signed-off-by: Gerhard Sittig <gsi@denx.de>
2014-09-16 12:24:00 -04:00
Thierry Reding
92ac8acc01 net: More BOOTP retry timeout improvements
It's not unusual for DHCP servers to take a couple hundred milliseconds
to respond to DHCP discover messages. One possible reason for the delay
can be that the server checks (typically using an ARP request) that the
IP it's about to hand out isn't in use yet. To make matters worse, some
servers may also queue up requests and process them sequentially, which
can cause excessively long delays if clients retry too fast.

Commit f59be6e850 ("net: BOOTP retry timeout improvements") shortened
the retry timeouts significantly, but the BOOTP/DHCP implementation in
U-Boot doesn't handle that well because it will ignore incoming replies
to earlier requests. In one particular setup this increases the time it
takes to obtain a DHCP lease from 630 ms to 8313 ms.

This commit attempts to fix this in two ways. First it increases the
initial retry timeout from 10 ms to 250 ms to give DHCP servers some
more time to respond. At the same time a cache of outstanding DHCP
request IDs is kept so that the implementation will know to continue
transactions even after a retransmission of the DISCOVER message. The
maximum retry timeout is also increased from 1 second to 2 seconds. An
ID cache of size 4 will keep DHCP requests around for 8 seconds (once
the maximum retry timeout has been reached) before dropping them. This
should give servers plenty of time to respond. If it ever turns out
that this isn't enough, the size of the cache can easily be increased.

With this commit the DHCP lease on the above-mentioned setup still takes
longer (1230 ms) than originally, but that's an acceptable compromise to
improve DHCP lease acquisition time for a broader range of setups.

To make it easier to benchmark DHCP in the future, this commit also adds
the time it took to obtain a lease to the final "DHCP client bound to
address x.x.x.x" message.

Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-08-21 12:01:30 -04:00
Stephen Warren
f59be6e850 net: BOOTP retry timeout improvements
Currently, the BOOTP code sends out its initial request as soon as the
Ethernet driver indicates "link up". If this packet is lost or not
replied to for some reason, the code waits for a 1s timeout before
retrying. For some reason, such early packets are often lost on my
system, so this causes an annoying delay.

To optimize this, modify the BOOTP code to have very short timeouts for
the first packet transmitted, but gradually increase the timeout each
time a timeout occurs. This way, if the first packet is lost, the second
packet is transmitted quite quickly and hence the overall delay is low.
However, if there's still no response, we don't keep spewing out packets
at an insane speed.

It's arguably more correct to try and find out why the first packet is
lost. However, it seems to disappear inside my Ethenet chip; the TX chip
indicates no error during TX (not that it has much in the way of
reporting...), yet wireshark on the RX side doesn't see any packet.
FWIW, I'm using an ASIX USB Ethernet adapter. Perhaps "link up" is
reported too early or based on the wrong condition in HW, and we should
add some fixed extra delay into the driver. However, this would slow down
every link up event even if it ends up not being needed in some cases.
Having BOOTP retry quickly applies the fix/WAR to every possible
Ethernet device, and is quite simple to implement, so seems a better
solution.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2014-08-09 11:17:03 -04:00
Pavel Machek
75d9a45cb0 Ethernet: let user know if there is no valid ethernet address
Improve error messages in case of invalid/unset ethernet addresses.

Signed-off-by: Pavel Machek <pavel@denx.de>
2014-07-22 07:44:28 -04:00
Pavel Machek
8e8d73b4a5 bootp can use mdelay
Cleanup bootp code by using mdelay.

Signed-off-by: Pavel Machek <pavel@denx.de>
Acked-by: Marek Vasut <marex@denx.de>
2014-07-22 07:44:25 -04:00
Hannes Petermaier
1f9ce3063c fix: CONFIG_NETCONSOLE start/handle this stuff only outside SPL
SPL stage does not support various networking things, and therefore
CONFIG_NETCONSOLE cannot be built within SPL.

Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
2014-06-19 11:19:05 -04:00
Masahiro Yamada
da384a9d76 net: rename and refactor eth_rand_ethaddr() function
Some functions in include/net.h are ported from
include/linux/etherdevice.h of Linux Kernel.

For ex.
  is_zero_ether_addr()
  is_multicast_ether_addr()
  is_broadcast_ether_addr()
  is_valid_ether_addr();

So, we should use the same function name as that of Linux Kernel,
eth_rand_addr(), for consistency.

Besides, eth_rand_addr() has been implemented as an inline function.
So it should not be surrounded by #ifdef CONFIG_RANDOM_MACADDR.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2014-05-12 15:19:46 -04:00
Przemyslaw Marczak
d718ded056 lib: uuid: code refactor for proper maintain between uuid bin and string
Changes in lib/uuid.c to:
- uuid_str_to_bin()
- uuid_bin_to_str()

New parameter is added to specify input/output string format in listed functions
This change allows easy recognize which UUID type is or should be stored in given
string array. Binary data of UUID and GUID is always stored in big endian, only
string representations are different as follows.

String byte: 0                                  36
String char: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
string UUID:    be     be   be   be       be
string GUID:    le     le   le   be       be

This patch also updates functions calls and declarations in a whole code.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Lukasz Majewski <l.majewski@samsung.com>
Cc: trini@ti.com
2014-04-02 15:44:40 -04:00
Masahiro Yamada
6825a95b0b kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild.

This commit disables temporary scripts:
  scripts/{Makefile.build.tmp, Makefile.host.tmp}
and enables real Kbuild scripts:
  scripts/{Makefile.build,Makefile.host,Makefile.lib}.

This switch is triggered by the line in scripts/Kbuild.include
  -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
  +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj

We need to adjust some build scripts for U-Boot.
But smaller amount of modification is preferable.

Additionally, we need to fix compiler flags which are
locally added or removed.

In Kbuild, it is not allowed to change CFLAGS locally.
Instead, ccflags-y, asflags-y, cppflags-y,
CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
are prepared for that purpose.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Gerhard Sittig <gsi@denx.de>
2014-02-19 11:07:50 -05:00
Alexey Brodkin
27ee59af28 net: execute "miiphy_init" if CONFIG_PHYLIB defined
In "common/Makefile" "miiphyutil.o" gets built if any of the following
items enabled:
 * CONFIG_PHYLIB
 * CONFIG_MII
 * CONFIG_CMD_MII

So it's possible to not define CONFIG_MII or CONFIG_CMD_MII and still
use functions like "miiphy_get_dev_by_name".

In its turn "miiphy_get_dev_by_name" traverses "mii_devs" list which is
not initialized because "miiphy_init" never got called.

Cc: Rob Herring <rob.herring@calxeda.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2014-02-07 09:16:36 -05:00
Andrew Ruder
8e52533d10 net: tftpsrv: Get correct client MAC address
NetServerEther was not being cleared in the tftp server code, so the
destination MAC address would be whatever the last destination MAC
address was.

Scenario:
U-Boot:
	dhcp
	tftpsrv
Host:
	Send device WRQ
Device:
	Responds with ACK to dhcp server mac address with
	host ip address

By clearing NetServerEther, we force a lookup of the host MAC address
to go with the associated host IP.

Signed-off-by: Andrew Ruder <andrew.ruder@elecsyscorp.com>
2013-11-22 17:03:18 -06:00
rockly
f754f5dc6f net: tftp: Make sure timeout will not effect wrap offset
When the block 0 store to the memory of client and timeout at this
moment. Because of no ACK packet, the server will send block 0 again,
if this client reconnect to the server at this time,
TftpBlockWrapOffset will become larger than it should be.

Signed-off-by: Rockly <rocklygnome@gmail.com>
Patch: 264417
2013-11-22 14:39:31 -06:00
Masahiro Yamada
9cc1180c37 net: convert a makefile to Kbuild style
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2013-10-31 13:26:44 -04:00
Jim Lin
b63056d6a4 NET: Add net_busy_flag if CONFIG_USB_KEYBOARD is defined
This flag is to make console aware that NET transfer is running or not.

Signed-off-by: Jim Lin <jilin@nvidia.com>
2013-08-26 21:56:35 +02:00
Wolfgang Denk
1a4596601f Add GPL-2.0+ SPDX-License-Identifier to source files
Signed-off-by: Wolfgang Denk <wd@denx.de>
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini <trini@ti.com>
2013-07-24 09:44:38 -04:00
Joe Hershberger
5da7cf81c8 net: Correct check for link-local target IP conflict
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>
2013-06-24 19:11:13 -05:00
Kim Phillips
61fdd4f7c3 net/tftp: sparse fixes
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>
2013-06-24 19:11:12 -05:00
Matthias Brugger
fa84fa708c net: nfs: add dynamic wait period
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>
2013-06-24 19:10:15 -05:00
Jim Lin
7315cfd9e1 NET: Fix system hanging if NET device is not installed
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>
2013-06-19 08:32:44 -04:00
Simon Glass
978226da5e net: Use new numeric setenv functions
Use setenv_ulong(), setenv_hex() and setenv_addr() in net/

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-02-28 19:09:23 -08:00
Joe Hershberger
65b0db831e net: Fix endianness bug in link-local
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>
2012-12-15 12:28:23 -06:00
Simon Glass
85b1980273 net: Add tftp speed indication
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>
2012-12-15 12:28:22 -06:00
Joe Hershberger
a9f51c9b43 env: Add a bootfile env handler
Remove the hard-coded bootfile handler and use a callback instead

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:55 -07:00
Joe Hershberger
ec8a252cd4 env: Use getenv_yesno() more generally
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>
2012-12-13 11:46:55 -07:00
Kim Phillips
0637059088 net/: sparse fixes
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 a36b12f95a
"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>
2012-11-04 11:00:36 -07:00
Tom Rini
1981668777 Merge branch 'master' of git://git.denx.de/u-boot-arm 2012-10-04 10:00:42 -07:00
Joe Hershberger
8cab08e804 net: fix netconsole filtering
Adjustment of Michael Walle's fix patch

Commit 8a0eccb105 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>
2012-10-03 16:01:22 -07:00
Ilya Yanok
7ac2fe2da2 OMAP: networking support for SPL
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>
2012-10-01 10:02:14 -07:00
Ilya Yanok
9ace17c88a net/bootp: add VCI support for BOOTP also
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>
2012-10-01 10:02:14 -07:00