summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2022-09-16 08:32:41 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-09-22 11:31:07 +0200
commit19eabb0a16b5e2435afc4dd16718fef1cc08b6fd (patch)
tree628194f2eeae209d2e2f3dd9f21ac171b974fd4f /include
parent8fcd6851baa3a9f4c1b74bd8cf1ad784e02e6794 (diff)
downloadbarebox-19eabb0a16b5e2435afc4dd16718fef1cc08b6fd.tar.gz
barebox-19eabb0a16b5e2435afc4dd16718fef1cc08b6fd.tar.xz
net: Bring up all interfaces when going interactive
So far we only bring up network interfaces when we actually need them. This means we could be idling in the shell for long and once the user decides to do networking he has to wait for the link to be established. We can do better: Before going interactive bring up all known network interfaces which makes the links established when the user needs them. To implement this we have to rework carrier checking a bit, because otherwise barebox would wait for the links to be established before continuing. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/net.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net.h b/include/net.h
index 310bf5169d..338033d698 100644
--- a/include/net.h
+++ b/include/net.h
@@ -79,6 +79,8 @@ struct eth_device {
#define ETH_MODE_STATIC 1
#define ETH_MODE_DISABLED 2
unsigned int global_mode;
+
+ uint64_t last_link_check;
};
#define dev_to_edev(d) container_of(d, struct eth_device, dev)
@@ -109,6 +111,7 @@ 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 */
+void eth_open_all(void);
struct eth_device *of_find_eth_device_by_node(struct device_node *np);
/* associate a MAC address to a ethernet device. Should be called by