linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ppopov@linux-mips.org
Date: Mon, 10 Jan 2005 08:29:35 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ppopov@ftp.linux-mips.org       05/01/10 08:29:29

Modified files:
        drivers/net    : au1000_eth.c 

Log message:
        au1000_mac_addr memcpy bug fix.

diff -urN linux/drivers/net/au1000_eth.c linux/drivers/net/au1000_eth.c
--- linux/drivers/net/au1000_eth.c      2004/11/26 08:45:17     1.39
+++ linux/drivers/net/au1000_eth.c      2005/01/10 08:29:29     1.40
@@ -97,8 +97,7 @@
 // externs
 extern  void ack_rise_edge_irq(unsigned int);
 extern int get_ethernet_addr(char *ethernet_addr);
-extern inline void str2eaddr(unsigned char *ea, unsigned char *str);
-extern inline unsigned char str2hexnum(unsigned char c);
+extern void str2eaddr(unsigned char *ea, unsigned char *str);
 extern char * __init prom_getcmdline(void);
 
 /*
@@ -1042,7 +1041,7 @@
        }
 #endif
 
-       if (aup->mii == NULL) {
+       if (aup->mii->chip_info == NULL) {
                printk(KERN_ERR "%s: Au1x No MII transceivers found!\n",
                                dev->name);
                return -1;
@@ -1494,7 +1493,7 @@
        {
                /* check env variables first */
                if (!get_ethernet_addr(ethaddr)) { 
-                       memcpy(au1000_mac_addr, ethaddr, sizeof(dev->dev_addr));
+                       memcpy(au1000_mac_addr, ethaddr, 
sizeof(au1000_mac_addr));
                } else {
                        /* Check command line */
                        argptr = prom_getcmdline();
@@ -1505,12 +1504,12 @@
                        } else {
                                str2eaddr(ethaddr, pmac + strlen("ethaddr="));
                                memcpy(au1000_mac_addr, ethaddr, 
-                                               sizeof(dev->dev_addr));
+                                               sizeof(au1000_mac_addr));
                        }
                }
                        aup->enable = (volatile u32 *) 
                                ((unsigned long)iflist[0].macen_addr);
-               memcpy(dev->dev_addr, au1000_mac_addr, sizeof(dev->dev_addr));
+               memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr));
                setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR);
                aup->mac_id = 0;
                au_macs[0] = aup;
@@ -1520,7 +1519,7 @@
        {
                        aup->enable = (volatile u32 *) 
                                ((unsigned long)iflist[1].macen_addr);
-               memcpy(dev->dev_addr, au1000_mac_addr, sizeof(dev->dev_addr));
+               memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr));
                dev->dev_addr[4] += 0x10;
                setup_hw_rings(aup, MAC1_RX_DMA_ADDR, MAC1_TX_DMA_ADDR);
                aup->mac_id = 1;

<Prev in Thread] Current Thread [Next in Thread>