ramips: ethernet: Replace random_ether_addr with eth_hw_addr_random
authorRosen Penev <rosenp@gmail.com>
Wed, 13 Mar 2019 21:05:44 +0000 (14:05 -0700)
committerJohn Crispin <john@phrozen.org>
Sun, 27 Oct 2019 13:13:47 +0000 (14:13 +0100)
eth_hw_addr_random additionally sets addr_assign_type to NET_ADDR_RANDOM.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c

index 65aa7f32606518a1ed6e497559f17113115cbe86..00e84bbcfb9397848fc7bd61f62bc8540eb04d16 100644 (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 (!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->dev_addr);
        }