summaryrefslogtreecommitdiffstats
path: root/include/net.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-03-11 13:41:49 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-03-31 12:35:45 +0200
commit18cce41473e3c2dbeb50e28daed36411112d72df (patch)
treec7bbf2c1589a148aa77e69a0d4da1afa154503f7 /include/net.h
parent6a58ec609eec5b28d7ee72fcfd65efb864612234 (diff)
downloadbarebox-18cce41473e3c2dbeb50e28daed36411112d72df.tar.gz
barebox-18cce41473e3c2dbeb50e28daed36411112d72df.tar.xz
net: Open ethernet devices explicitly
Open ethernet devices explicitly rather than implicitly when sending packets. This allows us to not only enable, but in the next step to also disable ethernet devices. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h
index 6912a557b5..509d1b38a1 100644
--- a/include/net.h
+++ b/include/net.h
@@ -80,7 +80,8 @@ static inline const char *eth_name(struct eth_device *edev)
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);
-
+int eth_open(struct eth_device *edev);
+void eth_close(struct eth_device *edev);
int eth_send(struct eth_device *edev, void *packet, int length); /* Send a packet */
int eth_rx(void); /* Check for received packets */