diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-13 22:44:31 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-14 18:22:15 +0200 |
commit | db0dcc6a8a7c9051f9228c0f745f1e1d029ae4fa (patch) | |
tree | cfd33c1bd6797319ec024108193290ea0c6490e6 /drivers/net/ethernet/atheros | |
parent | ethernet: make eth_hw_addr_random() use dev_addr_set() (diff) | |
download | linux-db0dcc6a8a7c9051f9228c0f745f1e1d029ae4fa.tar.xz linux-db0dcc6a8a7c9051f9228c0f745f1e1d029ae4fa.zip |
ethernet: make use of eth_hw_addr_random() where appropriate
Number of drivers use eth_random_addr(netdev->dev_addr)
thus writing to netdev->dev_addr directly, and not setting
the address type. Switch them to eth_hw_addr_random().
@@
expression netdev;
@@
- eth_random_addr(netdev->dev_addr);
+ eth_hw_addr_random(netdev);
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/atheros')
-rw-r--r-- | drivers/net/ethernet/atheros/ag71xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index 1aaaf8a4e7c5..ada3a9f0c8c8 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -1971,7 +1971,7 @@ static int ag71xx_probe(struct platform_device *pdev) err = of_get_ethdev_address(np, ndev); if (err) { netif_err(ag, probe, ndev, "invalid MAC address, using random address\n"); - eth_random_addr(ndev->dev_addr); + eth_hw_addr_random(ndev); } err = of_get_phy_mode(np, &ag->phy_if_mode); |