u-boot/net
Bernhard Nortmann eaa8a195cc net: expose eth_is_active() function to test network device state
The previous eth_device struct returned by eth_get_dev() allowed
code to directly query the state member field. However, with
CONFIG_DM_ETH this data gets encapsulated (i.e. private), and
eth_get_dev() returns a udevice struct 'abstraction' instead.

This breaks legacy code relying on the former behaviour - e.g.
netconsole.
(see http://lists.denx.de/pipermail/u-boot/2015-June/216528.html)

The patch introduces a method to retrieve the ethernet device
state in a 'clean' and uniform way, supporting both legacy code
and driver model. The new function eth_is_active() accepts a
device struct pointer and tests it for ETH_STATE_ACTIVE.

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-09-29 21:54:45 -05:00
..
arp.c net: cosmetic: Fix checkpatch.pl failures in net.c 2015-04-18 11:11:35 -06:00
arp.h net: cosmetic: Clean up ARP variables and functions 2015-04-18 11:11:33 -06:00
bootp.c net: tftp: Move tftp.h file from ./net to ./include/net 2015-09-07 13:41:04 +02:00
bootp.h net: Convert protocol structures to use explicit sizes 2015-04-18 11:11:35 -06:00
cdp.c net: cosmetic: Fix checkpatch.pl failures in net.c 2015-04-18 11:11:35 -06:00
cdp.h net: cosmetic: Clean up CDP variables and functions 2015-04-18 11:11:34 -06:00
checksum.c net: Add a separate file for IP checksumming 2015-01-23 21:44:59 -07:00
dns.c net: cosmetic: Fix checkpatch.pl failures in net.c 2015-04-18 11:11:35 -06:00
dns.h net: cosmetic: Clean up DNS variables and functions 2015-04-18 11:11:34 -06:00
eth.c net: expose eth_is_active() function to test network device state 2015-09-29 21:54:45 -05:00
Kconfig Allow CONFIG_REGEX to be disabled when CONFIG_NET 2015-07-08 18:26:39 -04:00
link_local.c net: cosmetic: Fix checkpatch.pl failures in net.c 2015-04-18 11:11:35 -06:00
link_local.h net: Add link-local addressing support 2012-05-23 17:53:08 -05:00
Makefile net: Add a separate file for IP checksumming 2015-01-23 21:44:59 -07:00
net.c net: tftp: Move tftp.h file from ./net to ./include/net 2015-09-07 13:41:04 +02:00
net_rand.h net: use common rand()/srand() functions 2012-07-07 14:07:32 +02:00
nfs.c net: cosmetic: Fix checkpatch.pl failures in net.c 2015-04-18 11:11:35 -06:00
nfs.h net: cosmetic: Clean up NFS variables and functions 2015-04-18 11:11:33 -06:00
ping.c net: cosmetic: Fix checkpatch.pl failures in net.c 2015-04-18 11:11:35 -06:00
ping.h SPDX License cleanup for LiMon imported files 2014-10-10 09:44:43 -04:00
rarp.c net: tftp: Move tftp.h file from ./net to ./include/net 2015-09-07 13:41:04 +02:00
rarp.h net: cosmetic: Clean up RARP variables and functions 2015-04-18 11:11:33 -06:00
sntp.c dm: net: rtc: Support using driver model for rtc in sntp 2015-05-05 20:58:40 -06:00
sntp.h net: cosmetic: Clean up SNTP variables and functions 2015-04-18 11:11:34 -06:00
tftp.c net: Revert "tftp: adjust settings to be suitable for 100Mbit ethernet" 2015-09-09 07:48:03 -06:00