diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-07-15 21:31:28 -0400 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2009-08-07 17:39:23 -0700 |
commit | 86848a74c3c8eb2f8dd179d039ee604dc45288cf (patch) | |
tree | f380764541e302d8a2810c817768058cdba4cdb0 /include/net.h | |
parent | 0ebf04c607b54a352629dcf7e76b76f1785dae54 (diff) | |
download | u-boot-imx-86848a74c3c8eb2f8dd179d039ee604dc45288cf.zip u-boot-imx-86848a74c3c8eb2f8dd179d039ee604dc45288cf.tar.gz u-boot-imx-86848a74c3c8eb2f8dd179d039ee604dc45288cf.tar.bz2 |
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 <awolski@poczta.fm>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'include/net.h')
-rw-r--r-- | include/net.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h index 4a03717..4873000 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 */ |