From 7616e7850804c7c69e0a22c179dfcba9e8f3f587 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 13 Jun 2011 16:13:10 -0700 Subject: Add Ethernet hardware MAC address framework to usbnet MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Built-in Ethernet adapters support setting the mac address by means of a ethaddr environment variable for each interface (ethaddr, eth1addr, eth2addr). This adds similar support to the USB network side, using the names usbethaddr, usbeth1addr, etc. They are kept separate since we don't want a USB device taking the MAC address of a built-in device or vice versa. Signed-off-by: Simon Glass Tested-by: Eric BĂ©nard --- board/davinci/common/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'board/davinci') diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c index 610333921..89ae1115d 100644 --- a/board/davinci/common/misc.c +++ b/board/davinci/common/misc.c @@ -101,7 +101,7 @@ void davinci_sync_env_enetaddr(uint8_t *rom_enetaddr) { uint8_t env_enetaddr[6]; - eth_getenv_enetaddr_by_index(0, env_enetaddr); + eth_getenv_enetaddr_by_index("eth", 0, env_enetaddr); if (!memcmp(env_enetaddr, "\0\0\0\0\0\0", 6)) { /* There is no MAC address in the environment, so we initialize * it from the value in the EEPROM. */ -- cgit v1.2.3