diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2009-01-26 14:55:09 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2009-01-26 14:55:09 +0000 |
commit | fc9fbf2abb37e65a2cf07b3d2b07550ee53aee9d (patch) | |
tree | 4c39da6efb6ce332ca8a11f0eeee16e789664400 /target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c | |
parent | fc32548f2a4c56ab530aa69ac5abedfd15491634 (diff) | |
download | master-187ad058-fc9fbf2abb37e65a2cf07b3d2b07550ee53aee9d.tar.gz master-187ad058-fc9fbf2abb37e65a2cf07b3d2b07550ee53aee9d.tar.bz2 master-187ad058-fc9fbf2abb37e65a2cf07b3d2b07550ee53aee9d.zip |
[ar71xx] move random MAC address generation into the platform initialization code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14204 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c')
-rw-r--r-- | target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_main.c | 11 |
1 files changed, 2 insertions, 9 deletions
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) { |