summaryrefslogtreecommitdiff
path: root/drivers/net/hamradio/scc.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-12 09:06:33 -0700
committerJakub Kicinski <kuba@kernel.org>2021-10-13 09:41:37 -0700
commit20c3d9e45ba630a7156d682a40988c0e96be1b92 (patch)
tree98e03c21b2ff3998e87b858353169cf709c20409 /drivers/net/hamradio/scc.c
parent40af35fdf79c77e19c597e47cc8fe9a8e200de30 (diff)
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/scc.c')
-rw-r--r--drivers/net/hamradio/scc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index 9b745d09d327..3d59dac063ac 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -1563,9 +1563,6 @@ static void scc_net_setup(struct net_device *dev)
dev->netdev_ops = &scc_netdev_ops;
dev->header_ops = &ax25_header_ops;
- memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);
- memcpy(dev->dev_addr, &ax25_defaddr, AX25_ADDR_LEN);
-
dev->flags = 0;
dev->type = ARPHRD_AX25;
@@ -1573,6 +1570,8 @@ static void scc_net_setup(struct net_device *dev)
dev->mtu = AX25_DEF_PACLEN;
dev->addr_len = AX25_ADDR_LEN;
+ memcpy(dev->broadcast, &ax25_bcast, AX25_ADDR_LEN);
+ dev_addr_set(dev, (u8 *)&ax25_defaddr);
}
/* ----> open network device <---- */