diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-08 20:53:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-09 13:55:01 +0300 |
commit | ea52a0b58e41c3b2b9e97ff13fe0da9c9e430ea8 (patch) | |
tree | beeede725830633b0e8314873371ce207a3f2929 /drivers/net/vmxnet3 | |
parent | 794a69b3f803fcdc31fb0060843b4df13e7de101 (diff) | |
download | linux-ea52a0b58e41c3b2b9e97ff13fe0da9c9e430ea8.tar.xz |
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 <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vmxnet3')
-rw-r--r-- | drivers/net/vmxnet3/vmxnet3_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c index 142f70670f5c..7a205ddf0060 100644 --- a/drivers/net/vmxnet3/vmxnet3_drv.c +++ b/drivers/net/vmxnet3/vmxnet3_drv.c @@ -2824,7 +2824,7 @@ vmxnet3_set_mac_addr(struct net_device *netdev, void *p) struct sockaddr *addr = p; struct vmxnet3_adapter *adapter = netdev_priv(netdev); - memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); + dev_addr_set(netdev, addr->sa_data); vmxnet3_write_mac_addr(adapter, addr->sa_data); return 0; @@ -3638,7 +3638,7 @@ vmxnet3_probe_device(struct pci_dev *pdev, #endif vmxnet3_read_mac_addr(adapter, mac); - memcpy(netdev->dev_addr, mac, netdev->addr_len); + dev_addr_set(netdev, mac); netdev->netdev_ops = &vmxnet3_netdev_ops; vmxnet3_set_ethtool_ops(netdev); |