net: Remove all calls to net_random_ethaddr()

Remove the calls to net_random_ethaddr() that some boards and some
drivers are calling. This is now implemented inside of net/eth.c

Enable the feature for all boards that previously enabled it.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Acked-By: Michael Walle <michael@walle.cc> (for the lsxl board part)

Series-changes: 2
-Fixed bfin build errors
This commit is contained in:
Joe Hershberger
2015-05-04 14:55:15 -05:00
parent 92ac520821
commit 76ec988b06
41 changed files with 64 additions and 294 deletions

View File

@@ -343,13 +343,7 @@ static int dm9000_init(struct eth_device *dev, bd_t *bd)
printf("MAC: %pM\n", dev->enetaddr);
if (!is_valid_ethaddr(dev->enetaddr)) {
#ifdef CONFIG_RANDOM_MACADDR
printf("Bad MAC address (uninitialized EEPROM?), randomizing\n");
net_random_ethaddr(dev->enetaddr);
printf("MAC: %pM\n", dev->enetaddr);
#else
printf("WARNING: Bad MAC address (uninitialized EEPROM?)\n");
#endif
}
/* fill device MAC address registers */

View File

@@ -424,9 +424,6 @@ int ftmac110_initialize(bd_t *bis)
dev->send = ftmac110_send;
dev->recv = ftmac110_recv;
if (!eth_getenv_enetaddr_by_index("eth", card_nr, dev->enetaddr))
net_random_ethaddr(dev->enetaddr);
/* allocate tx descriptors (it must be 16 bytes aligned) */
chip->txd = dma_alloc_coherent(
sizeof(struct ftmac110_desc) * CFG_TXDES_NUM, &chip->txd_dma);