diff options
author | Kamal Heib <kamalheib1@gmail.com> | 2018-06-20 13:47:11 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-06-28 21:50:16 +0900 |
commit | 144e2643e2f57d29804cacb5403708cd22984b73 (patch) | |
tree | b36761b799548c3f1ce72ba9a891ed2fbbe6eceb /drivers/staging/mt7621-eth | |
parent | 85e1d42663a0c163002961d2685be952067b0dc2 (diff) | |
download | linux-144e2643e2f57d29804cacb5403708cd22984b73.tar.gz linux-144e2643e2f57d29804cacb5403708cd22984b73.tar.bz2 linux-144e2643e2f57d29804cacb5403708cd22984b73.zip |
staging: mt7621-eth: Use eth_hw_addr_random()
Use eth_hw_addr_random() to set a random dev_addr and update
addr_assign_type.
Fixes: e3cbf478f846 ('staging: mt7621-eth: add the drivers core files')
Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/mt7621-eth')
-rw-r--r-- | drivers/staging/mt7621-eth/mtk_eth_soc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/mt7621-eth/mtk_eth_soc.c b/drivers/staging/mt7621-eth/mtk_eth_soc.c index 381d9d270bf5..f9b593ca2bcf 100644 --- a/drivers/staging/mt7621-eth/mtk_eth_soc.c +++ b/drivers/staging/mt7621-eth/mtk_eth_soc.c @@ -1822,10 +1822,9 @@ static int __init mtk_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(eth->dev, "generated random MAC address %pM\n", dev->dev_addr); - dev->addr_assign_type = NET_ADDR_RANDOM; } mac->hw->soc->set_mac(mac, dev->dev_addr); |