summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-08-03 08:08:23 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-08-03 08:08:23 +0200
commit7a51da5ff1e2b2c9397d781d04d0165371e80c6c (patch)
tree8b22cfc0db8b3b8c90876017e08d834442851b44 /include
parentb927df0329a97dcfe9ba22b45375be2dc416dcd6 (diff)
parenta622565d06b0747458b59240c71f92b6925f562c (diff)
downloadbarebox-7a51da5ff1e2b2c9397d781d04d0165371e80c6c.tar.gz
barebox-7a51da5ff1e2b2c9397d781d04d0165371e80c6c.tar.xz
Merge branch 'for-next/net'
Diffstat (limited to 'include')
-rw-r--r--include/net.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h
index 13e335aac2..8f857c8f85 100644
--- a/include/net.h
+++ b/include/net.h
@@ -51,6 +51,7 @@ struct eth_device {
struct phy_device *phydev;
struct device_d dev;
+ char *devname;
struct device_d *parent;
char *nodepath;
@@ -65,6 +66,11 @@ struct eth_device {
#define dev_to_edev(d) container_of(d, struct eth_device, dev)
+static inline const char *eth_name(struct eth_device *edev)
+{
+ return edev->devname;
+}
+
int eth_register(struct eth_device* dev); /* Register network device */
void eth_unregister(struct eth_device* dev); /* Unregister network device */
int eth_set_ethaddr(struct eth_device *edev, const char *ethaddr);
@@ -466,4 +472,8 @@ void led_trigger_network(enum led_trigger trigger);
int ifup(const char *name, unsigned flags);
int ifup_all(unsigned flags);
+extern struct list_head netdev_list;
+
+#define for_each_netdev(netdev) list_for_each_entry(netdev, &netdev_list, list)
+
#endif /* __NET_H__ */