aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dm9000.c
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2011-02-23 22:17:12 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-28 15:42:17 -0500
commit85e6b8c5d8be1e901b5402bfe42ce408912ab83e (patch)
treee614a49bf8a3039e07e2fca77eee358e7827e853 /drivers/net/dm9000.c
parent6f2e154b68b9321d958391bc0b1ffc2b90d57d71 (diff)
DM9000: Allow randomised ethernet address
Allow randomised ethernet address if the device does not have a valid EEPROM or pre-set MAC address. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dm9000.c')
-rw-r--r--drivers/net/dm9000.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index 2d4c4fc1d900..c30935587207 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -1592,10 +1592,15 @@ dm9000_probe(struct platform_device *pdev)
1592 ndev->dev_addr[i] = ior(db, i+DM9000_PAR); 1592 ndev->dev_addr[i] = ior(db, i+DM9000_PAR);
1593 } 1593 }
1594 1594
1595 if (!is_valid_ether_addr(ndev->dev_addr)) 1595 if (!is_valid_ether_addr(ndev->dev_addr)) {
1596 dev_warn(db->dev, "%s: Invalid ethernet MAC address. Please " 1596 dev_warn(db->dev, "%s: Invalid ethernet MAC address. Please "
1597 "set using ifconfig\n", ndev->name); 1597 "set using ifconfig\n", ndev->name);
1598 1598
1599 random_ether_addr(ndev->dev_addr);
1600 mac_src = "random";
1601 }
1602
1603
1599 platform_set_drvdata(pdev, ndev); 1604 platform_set_drvdata(pdev, ndev);
1600 ret = register_netdev(ndev); 1605 ret = register_netdev(ndev);
1601 1606