Commit 54f2d8d6 authored by Jakub Kicinski's avatar Jakub Kicinski

ethernet: make eth_hw_addr_random() use dev_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.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 76660757
......@@ -269,8 +269,11 @@ static inline void eth_zero_addr(u8 *addr)
*/
static inline void eth_hw_addr_random(struct net_device *dev)
{
u8 addr[ETH_ALEN];
eth_random_addr(addr);
__dev_addr_set(dev, addr, ETH_ALEN);
dev->addr_assign_type = NET_ADDR_RANDOM;
eth_random_addr(dev->dev_addr);
}
/**
......
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