Skip to content

Commit

Permalink
[SUNQE]: Fix MAC address assignment.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marcel van Nies authored and David S. Miller committed Apr 21, 2007
1 parent 2e6679a commit d0dc112
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/sunqe.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d0dc112

Please sign in to comment.