aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/drivers
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-01-26 14:55:09 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-01-26 14:55:09 +0000
commit6bea544949ce683dfb1d95bbc8510a397e0e1dd2 (patch)
treeb4b53c8d336e486d6cd4b5c697402f8dc5f679e1 /target/linux/ar71xx/files/drivers
parenta43685367ef84a5579aae53ceb33797e6209a43d (diff)
downloadupstream-6bea544949ce683dfb1d95bbc8510a397e0e1dd2.tar.gz
upstream-6bea544949ce683dfb1d95bbc8510a397e0e1dd2.tar.bz2
upstream-6bea544949ce683dfb1d95bbc8510a397e0e1dd2.zip
move random MAC address generation into the platform initialization code
SVN-Revision: 14204
Diffstat (limited to 'target/linux/ar71xx/files/drivers')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h2
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c11
2 files changed, 3 insertions, 10 deletions
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
index 2db35ec12e..2bbc7486e2 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
@@ -38,7 +38,7 @@
#define ETH_FCS_LEN 4
#define AG71XX_DRV_NAME "ag71xx"
-#define AG71XX_DRV_VERSION "0.5.16"
+#define AG71XX_DRV_VERSION "0.5.17"
#define AG71XX_NAPI_WEIGHT 64
#define AG71XX_OOM_REFILL (1 + HZ/10)
diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
index 58e3b11518..8921639ab8 100644
--- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
+++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c
@@ -868,16 +868,9 @@ static int __init ag71xx_probe(struct platform_device *pdev)
ag->oom_timer.data = (unsigned long) dev;
ag->oom_timer.function = ag71xx_oom_timer_handler;
- netif_napi_add(dev, &ag->napi, ag71xx_poll, AG71XX_NAPI_WEIGHT);
+ memcpy(dev->dev_addr, pdata->mac_addr, ETH_ALEN);
- if (is_valid_ether_addr(pdata->mac_addr))
- memcpy(dev->dev_addr, pdata->mac_addr, ETH_ALEN);
- else {
- dev->dev_addr[0] = 0xde;
- dev->dev_addr[1] = 0xad;
- get_random_bytes(&dev->dev_addr[2], 3);
- dev->dev_addr[5] = pdev->id & 0xff;
- }
+ netif_napi_add(dev, &ag->napi, ag71xx_poll, AG71XX_NAPI_WEIGHT);
err = register_netdev(dev);
if (err) {