aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/arcnet/com90xx.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-12 07:27:57 -0700
committerJakub Kicinski <kuba@kernel.org>2021-10-13 10:03:59 -0700
commit13b5ffa0e282f3d18e57735e37b8fed3a392872b (patch)
tree52b0862e3d866825464e63775e5bcb65eb732f15 /drivers/net/arcnet/com90xx.c
parentMerge branch 'net-use-dev_addr_set-in-hamradio-and-ip-tunnels' (diff)
downloadlinux-dev-13b5ffa0e282f3d18e57735e37b8fed3a392872b.tar.xz
linux-dev-13b5ffa0e282f3d18e57735e37b8fed3a392872b.zip
net: remove single-byte netdev->dev_addr writes
Make the drivers which use single-byte netdev addresses (netdev->addr_len == 1) use the appropriate address setting helpers. arcnet copies from int variables and io reads a lot, so add a helper for arcnet drivers to use. Similar helper could be reused for phonet and appletalk but there isn't any good central location where we could put it, and netdevice.h is already very crowded. Acked-by: Sebastian Reichel <sebastian.reichel@collabora.com> # for HSI Link: https://lore.kernel.org/r/20211012142757.4124842-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/arcnet/com90xx.c')
-rw-r--r--drivers/net/arcnet/com90xx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/arcnet/com90xx.c b/drivers/net/arcnet/com90xx.c
index d8dfb9ea0de8..f49dae194284 100644
--- a/drivers/net/arcnet/com90xx.c
+++ b/drivers/net/arcnet/com90xx.c
@@ -531,7 +531,8 @@ static int __init com90xx_found(int ioaddr, int airq, u_long shmem,
}
/* get and check the station ID from offset 1 in shmem */
- dev->dev_addr[0] = arcnet_readb(lp->mem_start, COM9026_REG_R_STATION);
+ arcnet_set_addr(dev, arcnet_readb(lp->mem_start,
+ COM9026_REG_R_STATION));
dev->base_addr = ioaddr;