From ea52a0b58e41c3b2b9e97ff13fe0da9c9e430ea8 Mon Sep 17 00:00:00 2001 From: Jakub Kicinski Date: Fri, 8 Oct 2021 10:53:39 -0700 Subject: net: use dev_addr_set() Use dev_addr_set() instead of writing directly to netdev->dev_addr in various misc and old drivers. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller --- drivers/net/ntb_netdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/ntb_netdev.c') diff --git a/drivers/net/ntb_netdev.c b/drivers/net/ntb_netdev.c index a5bab614ff84..98ca6b18415e 100644 --- a/drivers/net/ntb_netdev.c +++ b/drivers/net/ntb_netdev.c @@ -428,7 +428,7 @@ static int ntb_netdev_probe(struct device *client_dev) ndev->watchdog_timeo = msecs_to_jiffies(NTB_TX_TIMEOUT_MS); eth_random_addr(ndev->perm_addr); - memcpy(ndev->dev_addr, ndev->perm_addr, ndev->addr_len); + dev_addr_set(ndev, ndev->perm_addr); ndev->netdev_ops = &ntb_netdev_ops; ndev->ethtool_ops = &ntb_ethtool_ops; -- cgit v1.2.3