diff options
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h index 81118d26dc..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); |