diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2020-03-06 15:06:52 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-08-19 07:34:45 +0200 |
commit | c6b23fc0169057c4b4ffb530a71ec3a4742a4530 (patch) | |
tree | 2ae8b2f05e9d559c58a30c8a705b44805a317ffa /include/net.h | |
parent | 5a66288569a1960d34312d8a30c93da48bee95f2 (diff) | |
download | barebox-c6b23fc0169057c4b4ffb530a71ec3a4742a4530.tar.gz barebox-c6b23fc0169057c4b4ffb530a71ec3a4742a4530.tar.xz |
net: Add a slice to struct eth_device
Add ethernet code safe for being called from a poller.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h index 54db8a179a..aad28e4f4c 100644 --- a/include/net.h +++ b/include/net.h @@ -19,6 +19,7 @@ #include <stdlib.h> #include <clock.h> #include <led.h> +#include <slice.h> #include <xfuncs.h> #include <linux/phy.h> #include <linux/string.h> /* memcpy */ @@ -63,6 +64,10 @@ struct eth_device { char *bootarg; char *linuxdevname; + struct slice slice; + + struct list_head send_queue; + bool ifup; #define ETH_MODE_DHCP 0 #define ETH_MODE_STATIC 1 @@ -72,6 +77,11 @@ struct eth_device { #define dev_to_edev(d) container_of(d, struct eth_device, dev) +static inline struct slice *eth_device_slice(struct eth_device *edev) +{ + return &edev->slice; +} + static inline const char *eth_name(struct eth_device *edev) { return edev->devname; |