diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-12 09:06:33 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-13 09:41:37 -0700 |
commit | 20c3d9e45ba630a7156d682a40988c0e96be1b92 (patch) | |
tree | 98e03c21b2ff3998e87b858353169cf709c20409 /drivers/net/hamradio/6pack.c | |
parent | 40af35fdf79c77e19c597e47cc8fe9a8e200de30 (diff) | |
download | linux-20c3d9e45ba630a7156d682a40988c0e96be1b92.tar.bz2 |
hamradio: use dev_addr_set() for setting device address
Use dev_addr_set() instead of writing to netdev->dev_addr
directly in hamradio drivers.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/hamradio/6pack.c')
-rw-r--r-- | drivers/net/hamradio/6pack.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c index 6192244b304a..f4e8793e995d 100644 --- a/drivers/net/hamradio/6pack.c +++ b/drivers/net/hamradio/6pack.c @@ -288,7 +288,7 @@ static int sp_set_mac_address(struct net_device *dev, void *addr) netif_tx_lock_bh(dev); netif_addr_lock(dev); - memcpy(dev->dev_addr, &sa->sax25_call, AX25_ADDR_LEN); + __dev_addr_set(dev, &sa->sax25_call, AX25_ADDR_LEN); netif_addr_unlock(dev); netif_tx_unlock_bh(dev); @@ -317,7 +317,7 @@ static void sp_setup(struct net_device *dev) /* Only activated in AX.25 mode */ memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN); - memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN); + dev_addr_set(dev, (u8 *)&ax25_defaddr); dev->flags = 0; } @@ -726,7 +726,7 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file, } netif_tx_lock_bh(dev); - memcpy(dev->dev_addr, &addr, AX25_ADDR_LEN); + __dev_addr_set(dev, &addr, AX25_ADDR_LEN); netif_tx_unlock_bh(dev); err = 0; break; |