diff options
author | Marcel van Nies <morcles@gmail.com> | 2007-04-21 15:31:58 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-04-21 15:31:58 -0700 |
commit | d0dc1129c2e5a5a0e53940cad44333e6bd2f9af3 (patch) | |
tree | e86e9f19e704de5b670b6694356ad33968d51b23 /drivers/net/sunqe.c | |
parent | 2e6679a0aa352e6b74f6385c49cd4dca3dc7201f (diff) | |
download | linux-d0dc1129c2e5a5a0e53940cad44333e6bd2f9af3.tar.gz linux-d0dc1129c2e5a5a0e53940cad44333e6bd2f9af3.tar.bz2 linux-d0dc1129c2e5a5a0e53940cad44333e6bd2f9af3.zip |
[SUNQE]: Fix MAC address assignment.
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>
Diffstat (limited to 'drivers/net/sunqe.c')
-rw-r--r-- | drivers/net/sunqe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 7874eb1ef043..f3bad56d476a 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c @@ -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); |