diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2017-02-28 12:21:12 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-03-06 17:15:41 -0800 |
commit | 452349c3235252aaccaf30cc75402827d43b72d4 (patch) | |
tree | 44283b401f30acf0ff6b96d13c87c0d24c28228f /drivers/net/ethernet | |
parent | 81fa846a75f5a5ffe684c41dd29b193bb6527a08 (diff) | |
download | linux-452349c3235252aaccaf30cc75402827d43b72d4.tar.bz2 |
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index b96e96919e31..33c595f4691d 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -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, |