提交 655a6595 编写于 作者: S Stanislav O. Bezzubtsev 提交者: David S. Miller

forcedeth: mac address fix

Use the existing random_ether_addr() to generate random MAC
instead of doing it by-hand.
Signed-off-by: NStanislav O. Bezzubtsev <stas@lvk.cs.msu.su>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3fa8486b
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册