diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2009-05-02 13:52:13 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-02 13:52:13 -0700 |
commit | 379b026ecc20c4657d37e40ead789f7f28f1a1c1 (patch) | |
tree | 04e4f62a9f674474b0d679716b5a0f95bf4106fc | |
parent | 902e5ea15f8471a3213a37b11b98196f3406aeaf (diff) | |
download | kernel-crypto-379b026ecc20c4657d37e40ead789f7f28f1a1c1.tar.gz kernel-crypto-379b026ecc20c4657d37e40ead789f7f28f1a1c1.tar.xz kernel-crypto-379b026ecc20c4657d37e40ead789f7f28f1a1c1.zip |
ne2k-pci: Do not register device until initialized.
Doing it in reverse order causes uevent to be sent before
we have a MAC address, which confuses udev.
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ne2k-pci.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c index eb66f658f9d..7d83896b8c2 100644 --- a/drivers/net/ne2k-pci.c +++ b/drivers/net/ne2k-pci.c @@ -374,18 +374,17 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev, dev->ethtool_ops = &ne2k_pci_ethtool_ops; NS8390_init(dev, 0); + memcpy(dev->dev_addr, SA_prom, 6); + memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); + i = register_netdev(dev); if (i) goto err_out_free_netdev; - for(i = 0; i < 6; i++) - dev->dev_addr[i] = SA_prom[i]; printk("%s: %s found at %#lx, IRQ %d, %pM.\n", dev->name, pci_clone_list[chip_idx].name, ioaddr, dev->irq, dev->dev_addr); - memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); - return 0; err_out_free_netdev: |