diff options
author | David S. Miller <davem@davemloft.net> | 2021-10-02 14:18:26 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-02 14:18:26 +0100 |
commit | e9637775c05f2bbae24f060a91b7f8459bbe2286 (patch) | |
tree | fc737b1464f6d6faaa12c636506bc78b51208d9c /net/dsa/slave.c | |
parent | fa8274b788a3766c299a3172d4f5416e574ec42d (diff) | |
parent | 16be9a16340b1cec90be018162e434c8bdd1fcd1 (diff) |
Merge branch 'hw_addr_set'
Jakub Kicinski says:
====================
Use netdev->dev_addr write helpers (part 1)
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 got through appropriate helpers.
This is the first installment of predictably tedious conversion.
It tackles:
memcpy(netdev->dev_addr, something, ETH_ADDR)
and
ether_addr_copy(netdev->dev_addr, something)
replacing both with eth_hw_addr_set().
The first 7 patches are done entirely by sparse.
Next 4 were semi-manual because the sparse conversion
resulted in errors.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r-- | net/dsa/slave.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index a2bf2d8ac65b..11ec9e689589 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -174,7 +174,7 @@ static int dsa_slave_set_mac_address(struct net_device *dev, void *a) dev_uc_del(master, dev->dev_addr); out: - ether_addr_copy(dev->dev_addr, addr->sa_data); + eth_hw_addr_set(dev, addr->sa_data); return 0; } @@ -1954,7 +1954,7 @@ int dsa_slave_create(struct dsa_port *port) slave_dev->ethtool_ops = &dsa_slave_ethtool_ops; if (!is_zero_ether_addr(port->mac)) - ether_addr_copy(slave_dev->dev_addr, port->mac); + eth_hw_addr_set(slave_dev, port->mac); else eth_hw_addr_inherit(slave_dev, master); slave_dev->priv_flags |= IFF_NO_QUEUE; |