summaryrefslogtreecommitdiff
path: root/drivers/net/macvlan.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2021-10-22 16:21:02 -0700
committerDavid S. Miller <davem@davemloft.net>2021-10-24 13:59:45 +0100
commit8bc7823ed3bd5b87765e1b3d6f72c69624680921 (patch)
treeda886dddb66e26577880c26081fe3a14d12323cc /drivers/net/macvlan.c
parent5520fb42a0a1eacbb07352e46b6383399c9065e1 (diff)
downloadlwn-8bc7823ed3bd5b87765e1b3d6f72c69624680921.tar.gz
lwn-8bc7823ed3bd5b87765e1b3d6f72c69624680921.zip
net: drivers: get ready for const netdev->dev_addr
Commit 406f42fa0d3c ("net-next: When a bond have a massive amount of VLANs...") introduced a rbtree for faster Ethernet address look up. To maintain netdev->dev_addr in this tree we need to make all the writes to it go through appropriate helpers. We will make netdev->dev_addr a const. Make sure local references to netdev->dev_addr are constant. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/macvlan.c')
-rw-r--r--drivers/net/macvlan.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c
index 6189acb33973..d2f830ec2969 100644
--- a/drivers/net/macvlan.c
+++ b/drivers/net/macvlan.c
@@ -698,7 +698,8 @@ hash_del:
return 0;
}
-static int macvlan_sync_address(struct net_device *dev, unsigned char *addr)
+static int macvlan_sync_address(struct net_device *dev,
+ const unsigned char *addr)
{
struct macvlan_dev *vlan = netdev_priv(dev);
struct net_device *lowerdev = vlan->lowerdev;