forcedeth: mac address fix
authorStanislav O. Bezzubtsev <stas@lvk.cs.msu.su>
Mon, 16 Nov 2009 05:17:02 +0000 (21:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Nov 2009 05:17:02 +0000 (21:17 -0800)
Use the existing random_ether_addr() to generate random MAC
instead of doing it by-hand.

Signed-off-by: Stanislav O. Bezzubtsev <stas@lvk.cs.msu.su>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/forcedeth.c

index 0a1c2bb27d4d841dc889b908cf5c911039b1d526..73fe97777201821ea811c985aab9fd9411d33751 100644 (file)
@@ -5820,10 +5820,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i
                        dev->dev_addr);
                dev_printk(KERN_ERR, &pci_dev->dev,
                        "Please complain to your hardware vendor. Switching to a random MAC.\n");
-               dev->dev_addr[0] = 0x00;
-               dev->dev_addr[1] = 0x00;
-               dev->dev_addr[2] = 0x6c;
-               get_random_bytes(&dev->dev_addr[3], 3);
+               random_ether_addr(dev->dev_addr);
        }
 
        dprintk(KERN_DEBUG "%s: MAC Address %pM\n",