Commit 15c343eb authored by Jakub Kicinski's avatar Jakub Kicinski Committed by David S. Miller

ethernet: mv643xx: use eth_hw_addr_set()

Commit 406f42fa ("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.

Read the address into an array on the stack, then call
eth_hw_addr_set().
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 641a305b
...@@ -2925,10 +2925,14 @@ static void set_params(struct mv643xx_eth_private *mp, ...@@ -2925,10 +2925,14 @@ static void set_params(struct mv643xx_eth_private *mp,
struct net_device *dev = mp->dev; struct net_device *dev = mp->dev;
unsigned int tx_ring_size; unsigned int tx_ring_size;
if (is_valid_ether_addr(pd->mac_addr)) if (is_valid_ether_addr(pd->mac_addr)) {
eth_hw_addr_set(dev, pd->mac_addr); eth_hw_addr_set(dev, pd->mac_addr);
else } else {
uc_addr_get(mp, dev->dev_addr); u8 addr[ETH_ALEN];
uc_addr_get(mp, addr);
eth_hw_addr_set(dev, addr);
}
mp->rx_ring_size = DEFAULT_RX_QUEUE_SIZE; mp->rx_ring_size = DEFAULT_RX_QUEUE_SIZE;
if (pd->rx_queue_size) if (pd->rx_queue_size)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment