]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[SUNQE]: Fix MAC address assignment.
authorMarcel van Nies <morcles@gmail.com>
Sat, 21 Apr 2007 22:31:58 +0000 (15:31 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Apr 2007 22:31:58 +0000 (15:31 -0700)
The MAC address assignment at module loading is simply forgotten.
The bug at module unloading is caused by an incorrect call.

The bug at module unloading does not only happen for sunqe,
sunlance and sunhme (sbus) suffer from it too.

I've tested this on my SS20.

Signed-off-by: Marcel van Nies <morcles@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/sunqe.c

index 7874eb1ef04381edade7b85f7eb014705c54d2ed..f3bad56d476a95728c3f946cf2de4c2eb7db968f 100644 (file)
@@ -845,6 +845,8 @@ static int __init qec_ether_init(struct sbus_dev *sdev)
        if (!dev)
                return -ENOMEM;
 
+       memcpy(dev->dev_addr, idprom->id_ethaddr, 6);
+
        qe = netdev_priv(dev);
 
        i = of_getintprop_default(sdev->ofdev.node, "channel#", -1);
@@ -960,7 +962,7 @@ static int __devexit qec_sbus_remove(struct of_device *dev)
        struct sunqe *qp = dev_get_drvdata(&dev->dev);
        struct net_device *net_dev = qp->dev;
 
-       unregister_netdevice(net_dev);
+       unregister_netdev(net_dev);
 
        sbus_iounmap(qp->qcregs, CREG_REG_SIZE);
        sbus_iounmap(qp->mregs, MREGS_REG_SIZE);