diff options
Diffstat (limited to 'drivers/net/au1000_eth.c')
-rw-r--r-- | drivers/net/au1000_eth.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index b46c5d8a77bd..297e2d08d267 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -97,9 +97,7 @@ static void au1000_adjust_link(struct net_device *); | |||
97 | static void enable_mac(struct net_device *, int); | 97 | static void enable_mac(struct net_device *, int); |
98 | 98 | ||
99 | // externs | 99 | // externs |
100 | extern int get_ethernet_addr(char *ethernet_addr); | 100 | extern int prom_get_ethernet_addr(char *ethernet_addr); |
101 | extern void str2eaddr(unsigned char *ea, unsigned char *str); | ||
102 | extern char * prom_getcmdline(void); | ||
103 | 101 | ||
104 | /* | 102 | /* |
105 | * Theory of operation | 103 | * Theory of operation |
@@ -619,7 +617,6 @@ static struct net_device * au1000_probe(int port_num) | |||
619 | struct au1000_private *aup = NULL; | 617 | struct au1000_private *aup = NULL; |
620 | struct net_device *dev = NULL; | 618 | struct net_device *dev = NULL; |
621 | db_dest_t *pDB, *pDBfree; | 619 | db_dest_t *pDB, *pDBfree; |
622 | char *pmac, *argptr; | ||
623 | char ethaddr[6]; | 620 | char ethaddr[6]; |
624 | int irq, i, err; | 621 | int irq, i, err; |
625 | u32 base, macen; | 622 | u32 base, macen; |
@@ -677,21 +674,12 @@ static struct net_device * au1000_probe(int port_num) | |||
677 | au_macs[port_num] = aup; | 674 | au_macs[port_num] = aup; |
678 | 675 | ||
679 | if (port_num == 0) { | 676 | if (port_num == 0) { |
680 | /* Check the environment variables first */ | 677 | if (prom_get_ethernet_addr(ethaddr) == 0) |
681 | if (get_ethernet_addr(ethaddr) == 0) | ||
682 | memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr)); | 678 | memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr)); |
683 | else { | 679 | else { |
684 | /* Check command line */ | 680 | printk(KERN_INFO "%s: No MAC address found\n", |
685 | argptr = prom_getcmdline(); | 681 | dev->name); |
686 | if ((pmac = strstr(argptr, "ethaddr=")) == NULL) | ||
687 | printk(KERN_INFO "%s: No MAC address found\n", | ||
688 | dev->name); | ||
689 | /* Use the hard coded MAC addresses */ | 682 | /* Use the hard coded MAC addresses */ |
690 | else { | ||
691 | str2eaddr(ethaddr, pmac + strlen("ethaddr=")); | ||
692 | memcpy(au1000_mac_addr, ethaddr, | ||
693 | sizeof(au1000_mac_addr)); | ||
694 | } | ||
695 | } | 683 | } |
696 | 684 | ||
697 | setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR); | 685 | setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR); |