| 818f91eb | 17-Jan-2016 |
Simon Glass <sjg@chromium.org> |
net: Move common init into a new eth_common.c file
Only half of the init is actually common. Move that part into a new common file and call it from driver-model and legacy code. More common function
net: Move common init into a new eth_common.c file
Only half of the init is actually common. Move that part into a new common file and call it from driver-model and legacy code. More common functions will be added in future patches.
Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| c5a75339 | 21-Dec-2015 |
Joe Hershberger <joe.hershberger@ni.com> |
net: Fix delay in net_retry test
Introduced in 45b4773 (net/arp: account for ARP delay, avoid duplicate packets on timeout)
Check the arp timeout and adjust the timeout start time before the call t
net: Fix delay in net_retry test
Introduced in 45b4773 (net/arp: account for ARP delay, avoid duplicate packets on timeout)
Check the arp timeout and adjust the timeout start time before the call to eth_recv() so that the sandbox driver has the opportunity to adjust the sandbox timer after the new start time has been recorded.
Also, change the adjustment amount by 11 seconds instead of exactly the 10 seconds that the ping timout is expecting since the timeout check is looking for the time elapsed to be greater than but not equal to the specified delay.
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 4cdc2c8c | 22-Dec-2015 |
Bin Meng <bmeng.cn@gmail.com> |
dm: eth: Stick to 'ethact' when 'ethrotate' is 'no' in eth_init()
When 'ethrotate' variable is set to 'no' and 'ethact' variable is already set to an ethernet device, we should stick to 'ethact'.
S
dm: eth: Stick to 'ethact' when 'ethrotate' is 'no' in eth_init()
When 'ethrotate' variable is set to 'no' and 'ethact' variable is already set to an ethernet device, we should stick to 'ethact'.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
show more ...
|
| ac1d3138 | 08-Oct-2015 |
Bin Meng <bmeng.cn@gmail.com> |
net: eth: Check return value in various places
eth_get_dev() can return NULL which means device_probe() fails for that ethernet device. Add return value check in various places or U-Boot will crash
net: eth: Check return value in various places
eth_get_dev() can return NULL which means device_probe() fails for that ethernet device. Add return value check in various places or U-Boot will crash due to NULL pointer access.
With this commit, 'dm_test_eth_act' test case passes.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| a16edabe | 08-Oct-2015 |
Bin Meng <bmeng.cn@gmail.com> |
net: eth: Clear MAC address in eth_pre_remove()
platdata->enetaddr was assigned to a value in dev_probe() last time. If we don't clear it, for dev_probe() at the second time, dm eth will end up trea
net: eth: Clear MAC address in eth_pre_remove()
platdata->enetaddr was assigned to a value in dev_probe() last time. If we don't clear it, for dev_probe() at the second time, dm eth will end up treating it as a MAC address from ROM no matter where it came from originally (maybe env, ROM, or even random). Fix this by clearing platdata->enetaddr when removing an Ethernet device.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 774c3e05 | 03-Sep-2015 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
net: parse DHCP options from overloaded file/sname fields
If Option 52 in the vendor option field signals overloading of the file and/or sname fields, these field may contain additional options. For
net: parse DHCP options from overloaded file/sname fields
If Option 52 in the vendor option field signals overloading of the file and/or sname fields, these field may contain additional options. Formatting of file/sname contained options is the same as in the vendor options field, but without the leading magic.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| ec87b1b3 | 03-Sep-2015 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
net: Do not overwrite options found in overloaded 'file' field
If 'file' is overloaded, it is wrong to get or put the bootfile name from it/to it.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aa
net: Do not overwrite options found in overloaded 'file' field
If 'file' is overloaded, it is wrong to get or put the bootfile name from it/to it.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 219cc94a | 01-Sep-2015 |
Josh Wu <josh.wu@atmel.com> |
net: change the env name to use const
As we don't modify the 'name' parameter, so change it to const.
Signed-off-by: Josh Wu <josh.wu@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by
net: change the env name to use const
As we don't modify the 'name' parameter, so change it to const.
Signed-off-by: Josh Wu <josh.wu@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 7aba0f2c | 31-Aug-2015 |
Gong Qianyu <Qianyu.Gong@freescale.com> |
net/eth: fix a bug in on_ethaddr()
The loop should check all ethenet devices, not only the first device, to set each specified ethaddr, or it'll cause failure when we use other devices.
Signed-off-
net/eth: fix a bug in on_ethaddr()
The loop should check all ethenet devices, not only the first device, to set each specified ethaddr, or it'll cause failure when we use other devices.
Signed-off-by: Gong Qianyu <Qianyu.Gong@freescale.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 4f28c9b1 | 30-Aug-2015 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
net: cancel timeout handler after DHCPACK
Timeout handler should be stopped after reception of DHCPACK. If "autoload" is not set, the handler is immediately replaced by the TFTP handler, otherwise i
net: cancel timeout handler after DHCPACK
Timeout handler should be stopped after reception of DHCPACK. If "autoload" is not set, the handler is immediately replaced by the TFTP handler, otherwise it may trigger before the next boot stage begins.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 45b47734 | 30-Aug-2015 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
net/arp: account for ARP delay, avoid duplicate packets on timeout
eth_rx() in the main reception loop may trigger sending a packet which is already timed out (or will immediately) upon reception of
net/arp: account for ARP delay, avoid duplicate packets on timeout
eth_rx() in the main reception loop may trigger sending a packet which is already timed out (or will immediately) upon reception of an ARP reply. As long as the ARP reply is pending, the timeout handler of a packet should be postponed. Happens on TFTP with bad network (e.g. WLAN).
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 94323111 | 30-Aug-2015 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
net/arp: Do not run net_start_again() on timeout
net_start_again() will be called from net_loop() if state is NETLOOP_FAIL.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe
net/arp: Do not run net_start_again() on timeout
net_start_again() will be called from net_loop() if state is NETLOOP_FAIL.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| c56eb573 | 28-Aug-2015 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
net: Fix parsing of Bootp/DHCP option 0 (Pad)
Pad has no len byte, so the normal parsing code fails.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershb
net: Fix parsing of Bootp/DHCP option 0 (Pad)
Pad has no len byte, so the normal parsing code fails.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 454d9d3e | 27-Aug-2015 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
net: send RFC1542 compliant value for bootp requests
RFC1542, 3.2: "The 'secs' field of a BOOTREQUEST message SHOULD represent the elapsed time, in seconds, since the client sent its first BOOTREQUE
net: send RFC1542 compliant value for bootp requests
RFC1542, 3.2: "The 'secs' field of a BOOTREQUEST message SHOULD represent the elapsed time, in seconds, since the client sent its first BOOTREQUEST message. Note that this implies that the 'secs' field of the first BOOTREQUEST message SHOULD be set to zero."
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 867d6ae2 | 27-Aug-2015 |
Stefan Brüns <stefan.bruens@rwth-aachen.de> |
net: reject Bootp/DHCP packets with bad OP value
Rename check_packet to check_reply_packet to make its function more obvious. The check for DHCP_* values is completely off, as it should compare agai
net: reject Bootp/DHCP packets with bad OP value
Rename check_packet to check_reply_packet to make its function more obvious. The check for DHCP_* values is completely off, as it should compare against DHCP option 53 (Message Type). Only valid value for any Bootp/DHCP reply is BOOTREPLY.
Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
show more ...
|
| 214dc1da | 25-Aug-2015 |
Hannes Petermaier <oe5hpm@oevsv.at> |
net: bootp fix vci string on SPL-Boot
If CONFIG_CMD_DHCP is enabled, the vci (vendor-class-identifier) string isn't inserted into the bootp-packet during SPL stage because the
CONFIG_BOOTP_VCI_STRI
net: bootp fix vci string on SPL-Boot
If CONFIG_CMD_DHCP is enabled, the vci (vendor-class-identifier) string isn't inserted into the bootp-packet during SPL stage because the
CONFIG_BOOTP_VCI_STRING instead CONFIG_SPL_NET_VCI_STRING
We fix this with testing for CONFIG_SPL_BUILD and testing for existing CONFIG_SPL_NET_VCI_STRING.
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Tom Rini <trini@konsulko.com>
show more ...
|