mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-17 04:49:33 +07:00
net: axienet: use eth_hw_addr_random()
Use eth_hw_addr_random() to set a random MAC address in order to make sure ndev->addr_assign_type will be properly set to NET_ADDR_RANDOM. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
81fa846a75
commit
452349c323
@ -301,7 +301,7 @@ static void axienet_set_mac_address(struct net_device *ndev,
|
||||
if (address)
|
||||
memcpy(ndev->dev_addr, address, ETH_ALEN);
|
||||
if (!is_valid_ether_addr(ndev->dev_addr))
|
||||
eth_random_addr(ndev->dev_addr);
|
||||
eth_hw_addr_random(ndev);
|
||||
|
||||
/* Set up unicast MAC address filter set its mac address */
|
||||
axienet_iow(lp, XAE_UAW0_OFFSET,
|
||||
|
Loading…
Reference in New Issue
Block a user