ethernet: make eth_hw_addr_random() use dev_addr_set()
Commit 406f42fa0d
("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: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
766607570b
commit
54f2d8d6ca
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue