wireless: mac80211_hwsim: use eth_hw_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>
Link: https://lore.kernel.org/r/20211018235021.1279697-12-kuba@kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Jakub Kicinski 2021-10-18 16:50:17 -07:00 committed by Johannes Berg
parent eb3d6175e4
commit e76219e675

View File

@ -3653,13 +3653,16 @@ static const struct net_device_ops hwsim_netdev_ops = {
static void hwsim_mon_setup(struct net_device *dev)
{
u8 addr[ETH_ALEN];
dev->netdev_ops = &hwsim_netdev_ops;
dev->needs_free_netdev = true;
ether_setup(dev);
dev->priv_flags |= IFF_NO_QUEUE;
dev->type = ARPHRD_IEEE80211_RADIOTAP;
eth_zero_addr(dev->dev_addr);
dev->dev_addr[0] = 0x12;
eth_zero_addr(addr);
addr[0] = 0x12;
eth_hw_addr_set(dev, addr);
}
static struct mac80211_hwsim_data *get_hwsim_data_ref_from_addr(const u8 *addr)