X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fnet%2F3c589.c;h=f2c7d326b40dd7d309f0d01d497312d476dc46c9;hb=f9abdfe0f27cccd67b4d7dd3e998e2a7a61119d7;hp=3f1e770efe17f99081b16ff7647359e6de8f4d0b;hpb=42fd5f87b1613d3039f57e93c16f760a768d3e84;p=oweals%2Fu-boot.git diff --git a/drivers/net/3c589.c b/drivers/net/3c589.c index 3f1e770efe..f2c7d326b4 100644 --- a/drivers/net/3c589.c +++ b/drivers/net/3c589.c @@ -26,8 +26,6 @@ #include #include -#ifdef CONFIG_DRIVER_3C589 - #include "3c589.h" @@ -261,10 +259,13 @@ static void el_reset(bd_t *bd) /* set mac addr */ { - unsigned char *mac_addr = bd->bi_enetaddr; + uchar mac_addr[6]; int i; - el_get_mac_addr( mac_addr ); + if (!eth_getenv_enetaddr("ethaddr", mac_addr)) { + el_get_mac_addr(mac_addr); + eth_setenv_enetaddr("ethaddr", mac_addr); + } GO_WINDOW(2); VX_BUSY_WAIT; @@ -514,6 +515,3 @@ int eth_send(volatile void *packet, int length) { return length; } - - -#endif /* CONFIG_DRIVER_3C589 */