diff options
author | Stanislav O. Bezzubtsev <stas@lvk.cs.msu.su> | 2009-11-16 00:17:02 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-16 00:17:02 -0500 |
commit | 655a6595af5cd7e91992bd768d7a5949f813dc0d (patch) | |
tree | d3964281bea5d06db71a3ed2105e9244b738b2c5 /drivers | |
parent | 3fa8486bae2b56d9f47c1c281866d10fb56c3adc (diff) |
forcedeth: mac address fix
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/forcedeth.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 0a1c2bb27d4d..73fe97777201 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -5820,10 +5820,7 @@ static int __devinit nv_probe(struct pci_dev *pci_dev, const struct pci_device_i | |||
5820 | dev->dev_addr); | 5820 | dev->dev_addr); |
5821 | dev_printk(KERN_ERR, &pci_dev->dev, | 5821 | dev_printk(KERN_ERR, &pci_dev->dev, |
5822 | "Please complain to your hardware vendor. Switching to a random MAC.\n"); | 5822 | "Please complain to your hardware vendor. Switching to a random MAC.\n"); |
5823 | dev->dev_addr[0] = 0x00; | 5823 | random_ether_addr(dev->dev_addr); |
5824 | dev->dev_addr[1] = 0x00; | ||
5825 | dev->dev_addr[2] = 0x6c; | ||
5826 | get_random_bytes(&dev->dev_addr[3], 3); | ||
5827 | } | 5824 | } |
5828 | 5825 | ||
5829 | dprintk(KERN_DEBUG "%s: MAC Address %pM\n", | 5826 | dprintk(KERN_DEBUG "%s: MAC Address %pM\n", |