- Aug 12, 2015
-
-
Max Krummenacher authored
CONFIG_TFTP_TSIZE should limit a tftp downloads progress to 50 '#' chars. Make this work also for small files. If the file size is small, i.e. smaller than 2 tftp block sizes the number of '#' can get much larger. i.e. with a 1 byte file 65000 characters are printed, with a 512 byte file around 500. When using CONFIG TFTP BLOCKSIZE together with CONFIG_IP_DEFRAG the issue is more notable. Signed-off-by:
Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by:
Marcel Ziswiler <marcel.ziswiler@toradex.com> Reviewed-by:
Marek Vasut <marex@denx.de> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- Jul 21, 2015
-
-
Simon Glass authored
Some drivers may want to implement this method for some of their devices but not for others. So it is not possible to just leave the operation out of the table. Drivers could get around this by masquerading as two separate drivers but that seems unpleasant. Allow the driver to return an error when it does not want to process the write_hwaddr() method. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
Simon Glass authored
Some devices can take a long time to work out whether they have a new packet or now. For example the ASIX USB Ethernet dongle can take 5 seconds to do this, since it waits until it gets a new packet on the wire before allowing the USB bulk read packet to be submitted. At present with driver mode the Ethernet receive code reads 32 packets. This can take a very long time if we must wait for all 32 packets. The old code (before driver model) worked by reading a single set of packets from the USB device, then processing all the packets with in. It would be nice to use the same behaviour with driver model. Add a flag to the receive method which indicates that the driver should try to find a packet if available, by consulting the hardware. When the flag is not set, it should just return any packet data it has already received. If there is none, it should return -EAGAIN so that the loop will terminate. Signed-off-by:
Simon Glass <sjg@chromium.org>
-
- Jul 08, 2015
-
-
Joe Hershberger authored
Instead of selecting REGEX when NET is enabled, make it the default, but allow boards that are tiny to disable it and lose functionality on all but the first Ethernet adapter. cm-bf548, bf538f-ezkit, and bf533-stamp need this. None appear to have more than one Ethernet interface. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- Jun 01, 2015
-
-
Michal Simek authored
NET_RANDOM_ETHADDR depends on lib/rand.c. This patch adds dependency to Kconfig to ensure that library is also compiled. Remove the definitions from Blackfin boards' include/configs. Signed-off-by:
Michal Simek <michal.simek@xilinx.com> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
- May 21, 2015
-
-
Joe Hershberger authored
When the ethaddr is changed in the env, update the device pdata at the same time (only if it is probed for the DM case; only if registered for the non-DM case). Again this gets us closer to completely non-polled env needed to simplify the net_loop. This requires that the NET feature select the REGEX feature. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
The bootfile env var is already kept up to date by the callback in net.c so there is no need to poll it too. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
Instead of checking for changes to the env each time we enter the net_loop, use the env callbacks to update the values of the variables. Don't update the variables when the source was programmatic, since the variables were the source of the new value. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
- May 19, 2015
-
-
Joe Hershberger authored
Implement the random ethaddr fallback in eth.c so it is in a common place and not reimplemented in each board or driver that wants this behavior. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Reviewed-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
When the ethaddr changes in the env, the hardware should also be updated so that MAC filtering will work properly without resetting U-Boot. Also remove the manual calls to set the hwaddr that was included in a few drivers as a result of the framework not doing it. Reported-by:
Michal Simek <michal.simek@xilinx.com> Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Tested-by:
Michal Simek <michal.simek@xilinx.com>
-
- May 06, 2015
-
-
Simon Glass authored
When setting the date, support driver model RTC also. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Simon Glass authored
Rename this function so that it is clear that it is provided by the RTC. Also return an error when it cannot function as expected. This is unlikely to occur since it works for dates since 1752 and many RTCs do not support such old dates. Still it is better to be accurate. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Heiko Schocher <hs@denx.de>
-
- Apr 18, 2015
-
-
Simon Glass authored
At present even with driver model is used there is still much manual init of related devices: PHY, environment and board init. Until these requirements are dealt with in another way we need to keep them around. Break out the init portion of the legacy eth_initialize() into a separate function and call it from both the legacy and driver model eth_initialize() functions. Signed-off-by:
Simon Glass <sjg@chromium.org> Acked-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
When SNTP is enabled and DATE is not, to_tm() is not built in. It could be defined when TIMESTAMP is defined, so check for that. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Sergey Temerkhanov authored
Convert uchar/ushort to u8/u16 respectively. Signed-off-by:
Radha Mohan Chintakuntla <rchintakuntla@cavium.com> Signed-off-by:
Sergey Temerkhanov <s.temerkhanov@gmail.com> Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Sergey Temerkhanov authored
This commit fixes incorrect DHCP/BOOTP packet layout caused by 'ulong' type size difference on 64 and 32-bit architectures. It also renames NetReadLong()/NetCopyLong() to net_read_u32/net_copy_u32() accordingly. Signed-off-by:
Radha Mohan Chintakuntla <rchintakuntla@cavium.com> Signed-off-by:
Sergey Temerkhanov <s.temerkhanov@gmail.com> Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Finish eliminating CamelCase from net.c and other failures Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
There were still a few failures in net/eth.c, especially in the legacy part of the code. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
A few new rules in checkpatch.pl since linklocal.c was added. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within common/cmd_net.c and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within netconsole.c and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within dns.c and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within cdp.c and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within ping.c and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within sntp.c and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within rarp.c and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within nfs.c and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within bootp.c and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within arp and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Make a thorough pass through all variables and function names contained within tftp and remove CamelCase and improve naming. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Update the naming convention used in the network stack functions and variables that Ethernet drivers use to interact with it. This cleans up the temporary hacks that were added to this interface along with the DM support. This patch has a few remaining checkpatch.pl failures that would be out of the scope of this patch to fix (drivers that are in gross violation of checkpatch.pl). Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
This patch cleans up the names of internal packet buffer names that are used within the network stack and the functions that use them. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com>
-
Joe Hershberger authored
Use "_ethaddr" at the end of variables and drop CamelCase. Make constant values actually 'const'. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Remove CamelCase variable naming. Move the definition to the same compilation unit as the primary use. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
The variables around the bootfile were inconsistent and used CamelCase. Update them to make the code more readable. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
This patch is simply clean-up to make the IPv4 type that is used match what Linux uses. It also attempts to move all variables that are IP addresses use good naming instead of CamelCase. No functional change. Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org>
-
Joe Hershberger authored
Some drivers need a chance to manage their receive buffers after the packet has been handled by the network stack. Add an operation that will allow the driver to be called in that case. Reported-by:
Simon Glass <sjg@chromium.org> Signed-off-by:
Joe Hershberger <joe.hershberger@ni.com> Acked-by:
Simon Glass <sjg@chromium.org> Tested-by:
Simon Glass <sjg@chromium.org> Tested-on: pcduino3
-
Joe Hershberger authored
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>
-
Joe Hershberger authored
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>
-
Joe Hershberger authored
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>
-