diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-13 23:44:31 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-14 19:22:15 +0300 |
commit | db0dcc6a8a7c9051f9228c0f745f1e1d029ae4fa (patch) | |
tree | cfd33c1bd6797319ec024108193290ea0c6490e6 /drivers/net/ethernet/ti | |
parent | 54f2d8d6ca99a3e24efc9c8b055bbcbe0b583227 (diff) | |
download | linux-db0dcc6a8a7c9051f9228c0f745f1e1d029ae4fa.tar.xz |
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/ti')
-rw-r--r-- | drivers/net/ethernet/ti/netcp_core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c index b666e1b53c5f..b818e4579f6f 100644 --- a/drivers/net/ethernet/ti/netcp_core.c +++ b/drivers/net/ethernet/ti/netcp_core.c @@ -2030,14 +2030,14 @@ static int netcp_create_interface(struct netcp_device *netcp_device, if (is_valid_ether_addr(efuse_mac_addr)) eth_hw_addr_set(ndev, efuse_mac_addr); else - eth_random_addr(ndev->dev_addr); + eth_hw_addr_random(ndev); devm_iounmap(dev, efuse); devm_release_mem_region(dev, res.start, size); } else { ret = of_get_ethdev_address(node_interface, ndev); if (ret) - eth_random_addr(ndev->dev_addr); + eth_hw_addr_random(ndev); } ret = of_property_read_string(node_interface, "rx-channel", |