Commit e76219e6 authored by Jakub Kicinski's avatar Jakub Kicinski Committed by Johannes Berg

wireless: mac80211_hwsim: 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.
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20211018235021.1279697-12-kuba@kernel.orgSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent eb3d6175
...@@ -3653,13 +3653,16 @@ static const struct net_device_ops hwsim_netdev_ops = { ...@@ -3653,13 +3653,16 @@ static const struct net_device_ops hwsim_netdev_ops = {
static void hwsim_mon_setup(struct net_device *dev) static void hwsim_mon_setup(struct net_device *dev)
{ {
u8 addr[ETH_ALEN];
dev->netdev_ops = &hwsim_netdev_ops; dev->netdev_ops = &hwsim_netdev_ops;
dev->needs_free_netdev = true; dev->needs_free_netdev = true;
ether_setup(dev); ether_setup(dev);
dev->priv_flags |= IFF_NO_QUEUE; dev->priv_flags |= IFF_NO_QUEUE;
dev->type = ARPHRD_IEEE80211_RADIOTAP; dev->type = ARPHRD_IEEE80211_RADIOTAP;
eth_zero_addr(dev->dev_addr); eth_zero_addr(addr);
dev->dev_addr[0] = 0x12; addr[0] = 0x12;
eth_hw_addr_set(dev, addr);
} }
static struct mac80211_hwsim_data *get_hwsim_data_ref_from_addr(const u8 *addr) static struct mac80211_hwsim_data *get_hwsim_data_ref_from_addr(const u8 *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