diff options
author | Jakub Kicinski <kuba@kernel.org> | 2021-10-18 16:50:17 -0700 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2021-10-21 16:46:28 +0200 |
commit | e76219e675ebebebdb054bb57b0c6236c27755fe (patch) | |
tree | 18aa60d52e886a21a2e562d447d5a7c804988c4b | |
parent | eb3d6175e4a904f7e4b0216c52810ac6065877df (diff) | |
download | linux-e76219e675ebebebdb054bb57b0c6236c27755fe.tar.gz linux-e76219e675ebebebdb054bb57b0c6236c27755fe.tar.bz2 linux-e76219e675ebebebdb054bb57b0c6236c27755fe.zip |
wireless: mac80211_hwsim: use eth_hw_addr_set()
Commit 406f42fa0d3c ("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>
-rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 2d09e998d643..dba10d5a9bfd 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -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) |