summaryrefslogtreecommitdiff
path: root/drivers/net/arcnet/arcdevice.h
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/arcdevice.h
parent400f17d3301ee531ad3646aa6fe179e7f8718dbc (diff)
downloadlwn-13b5ffa0e282f3d18e57735e37b8fed3a392872b.tar.gz
lwn-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/arcdevice.h')
-rw-r--r--drivers/net/arcnet/arcdevice.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/arcnet/arcdevice.h b/drivers/net/arcnet/arcdevice.h
index 5d4a4c7efbbf..19e996a829c9 100644
--- a/drivers/net/arcnet/arcdevice.h
+++ b/drivers/net/arcnet/arcdevice.h
@@ -364,6 +364,11 @@ netdev_tx_t arcnet_send_packet(struct sk_buff *skb,
struct net_device *dev);
void arcnet_timeout(struct net_device *dev, unsigned int txqueue);
+static inline void arcnet_set_addr(struct net_device *dev, u8 addr)
+{
+ dev_addr_set(dev, &addr);
+}
+
/* I/O equivalents */
#ifdef CONFIG_SA1100_CT6001