diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-13 13:44:31 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-14 09:22:15 -0700 |
commit | db0dcc6a8a7c9051f9228c0f745f1e1d029ae4fa (patch) | |
tree | cfd33c1bd6797319ec024108193290ea0c6490e6 /drivers/net/ethernet/cortina | |
parent | 54f2d8d6ca99a3e24efc9c8b055bbcbe0b583227 (diff) |
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/cortina')
-rw-r--r-- | drivers/net/ethernet/cortina/gemini.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index 82d32caf1374..941f175fb911 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -2473,7 +2473,7 @@ static int gemini_ethernet_port_probe(struct platform_device *pdev) port->mac_addr[0], port->mac_addr[1], port->mac_addr[2]); dev_info(dev, "using a random ethernet address\n"); - eth_random_addr(netdev->dev_addr); + eth_hw_addr_random(netdev); } gmac_write_mac_address(netdev); |