From 86848a74c3c8eb2f8dd179d039ee604dc45288cf Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 15 Jul 2009 21:31:28 -0400 Subject: net: sync env ethaddr to device enetaddr in eth_init() In the previous enetaddr refactoring, the assumption with commit 56b555a644 was that the eth layer would handle the env -> device enetaddr syncing. This was not the case as eth_initialize() is called only once and the sync occurs there. So make sure the eth_init() function does the env -> device sync with every network init. Reported-by: Andrzej Wolski Signed-off-by: Mike Frysinger Signed-off-by: Ben Warren --- include/net.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/net.h') diff --git a/include/net.h b/include/net.h index 4a03717ae..4873000c0 100644 --- a/include/net.h +++ b/include/net.h @@ -119,10 +119,10 @@ extern struct eth_device *eth_get_dev(void); /* get the current device MAC */ extern struct eth_device *eth_get_dev_by_name(char *devname); /* get device */ extern struct eth_device *eth_get_dev_by_index(int index); /* get dev @ index */ extern int eth_get_dev_index (void); /* get the device index */ -extern void eth_set_enetaddr(int num, char* a); /* Set new MAC address */ extern void eth_parse_enetaddr(const char *addr, uchar *enetaddr); extern int eth_getenv_enetaddr(char *name, uchar *enetaddr); extern int eth_setenv_enetaddr(char *name, const uchar *enetaddr); +extern int eth_getenv_enetaddr_by_index(int index, uchar *enetaddr); extern int eth_init(bd_t *bis); /* Initialize the device */ extern int eth_send(volatile void *packet, int length); /* Send a packet */ -- cgit v1.2.3