summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/configs/sandbox.h2
-rw-r--r--include/net.h5
2 files changed, 6 insertions, 1 deletions
diff --git a/include/configs/sandbox.h b/include/configs/sandbox.h
index e225ce6772..9769a8dd80 100644
--- a/include/configs/sandbox.h
+++ b/include/configs/sandbox.h
@@ -178,7 +178,7 @@
#define SANDBOX_ETH_SETTINGS "ethaddr=00:00:11:22:33:44\0" \
"eth1addr=00:00:11:22:33:45\0" \
- "eth2addr=00:00:11:22:33:46\0" \
+ "eth5addr=00:00:11:22:33:46\0" \
"ipaddr=1.2.3.4\0"
#define CONFIG_EXTRA_ENV_SETTINGS SANDBOX_SERIAL_SETTINGS \
diff --git a/include/net.h b/include/net.h
index 0a1b3a827c..942fa4c929 100644
--- a/include/net.h
+++ b/include/net.h
@@ -124,6 +124,11 @@ struct eth_ops {
#define eth_get_ops(dev) ((struct eth_ops *)(dev)->driver->ops)
struct udevice *eth_get_dev(void); /* get the current device */
+/*
+ * The devname can be either an exact name given by the driver or device tree
+ * or it can be an alias of the form "eth%d"
+ */
+struct udevice *eth_get_dev_by_name(const char *devname);
unsigned char *eth_get_ethaddr(void); /* get the current device MAC */
/* Used only when NetConsole is enabled */
int eth_init_state_only(void); /* Set active state */