ramips: ethernet: Replace random_ether_addr with eth_hw_addr_random

eth_hw_addr_random additionally sets addr_assign_type to NET_ADDR_RANDOM.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2019-03-13 14:05:44 -07:00 committed by John Crispin
parent 0b2a2f4380
commit c36ef5970b

View File

@ -1388,7 +1388,7 @@ static int __init fe_init(struct net_device *dev)
/* If the mac address is invalid, use random mac address */ /* If the mac address is invalid, use random mac address */
if (!is_valid_ether_addr(dev->dev_addr)) { if (!is_valid_ether_addr(dev->dev_addr)) {
random_ether_addr(dev->dev_addr); eth_hw_addr_random(dev);
dev_err(priv->dev, "generated random MAC address %pM\n", dev_err(priv->dev, "generated random MAC address %pM\n",
dev->dev_addr); dev->dev_addr);
} }