diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2007-10-15 19:06:20 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-10-15 14:38:24 -0400 |
commit | 2de889235d0e820a6b256b834ee6a64e12fede08 (patch) | |
tree | cb7b58e6ed74f2c6fe8479acb28ff9c50781a2d6 /drivers/net/au1000_eth.c | |
parent | c2af68e5f550a671ac9f67f566f04e1580a103a0 (diff) | |
download | lwn-2de889235d0e820a6b256b834ee6a64e12fede08.tar.gz lwn-2de889235d0e820a6b256b834ee6a64e12fede08.zip |
update AU1000 get_ethernet_addr()
Update AU1000 get_ethernet_addr().
Three functions were brought together in one.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
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 *); static void enable_mac(struct net_device *, int); // externs -extern int get_ethernet_addr(char *ethernet_addr); -extern void str2eaddr(unsigned char *ea, unsigned char *str); -extern char * prom_getcmdline(void); +extern int prom_get_ethernet_addr(char *ethernet_addr); /* * Theory of operation @@ -619,7 +617,6 @@ static struct net_device * au1000_probe(int port_num) struct au1000_private *aup = NULL; struct net_device *dev = NULL; db_dest_t *pDB, *pDBfree; - char *pmac, *argptr; char ethaddr[6]; int irq, i, err; u32 base, macen; @@ -677,21 +674,12 @@ static struct net_device * au1000_probe(int port_num) au_macs[port_num] = aup; if (port_num == 0) { - /* Check the environment variables first */ - if (get_ethernet_addr(ethaddr) == 0) + if (prom_get_ethernet_addr(ethaddr) == 0) memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr)); else { - /* Check command line */ - argptr = prom_getcmdline(); - if ((pmac = strstr(argptr, "ethaddr=")) == NULL) - printk(KERN_INFO "%s: No MAC address found\n", - dev->name); + printk(KERN_INFO "%s: No MAC address found\n", + dev->name); /* Use the hard coded MAC addresses */ - else { - str2eaddr(ethaddr, pmac + strlen("ethaddr=")); - memcpy(au1000_mac_addr, ethaddr, - sizeof(au1000_mac_addr)); - } } setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR); |