Skip to content

Commit

Permalink
forcedeth: mac address fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stanislav O. Bezzubtsev authored and David S. Miller committed Nov 16, 2009
1 parent 3fa8486 commit 655a659
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 655a659

Please sign in to comment.