AX88180: switch to common mii.h header
[oweals/u-boot.git] / drivers / net / 3c589.c
index 3f1e770efe17f99081b16ff7647359e6de8f4d0b..f2c7d326b40dd7d309f0d01d497312d476dc46c9 100644 (file)
@@ -26,8 +26,6 @@
 #include <command.h>
 #include <net.h>
 
-#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 */