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.
Convert staging from ether_addr_copy() to eth_hw_addr_set():
@@
expression dev, np;
@@
- ether_addr_copy(dev->dev_addr, np)
+ eth_hw_addr_set(dev, np)
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Link: https://lore.kernel.org/r/20211019171243.1412240-3-kuba@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hostif_sme_enqueue(priv, SME_GET_MAC_ADDRESS);
ether_addr_copy(priv->eth_addr, priv->rxp);
priv->mac_address_valid = true;
- ether_addr_copy(dev->dev_addr, priv->eth_addr);
+ eth_hw_addr_set(dev, priv->eth_addr);
netdev_info(dev, "MAC ADDRESS = %pM\n", priv->eth_addr);
break;
case DOT11_PRODUCT_VERSION:
/* dummy address set */
ether_addr_copy(priv->eth_addr, dummy_addr);
- ether_addr_copy(dev->dev_addr, priv->eth_addr);
+ eth_hw_addr_set(dev, priv->eth_addr);
/* The ks_wlan-specific entries in the device structure. */
dev->netdev_ops = &ks_wlan_netdev_ops;
if (m && is_valid_ether_addr(m)) {
if (!is_valid_ether_addr(dev->dev_addr)) {
netdev_info(dev, "set mac %pM\n", m);
- ether_addr_copy(dev->dev_addr, m);
+ eth_hw_addr_set(dev, m);
netif_dormant_off(dev);
} else if (!ether_addr_equal(dev->dev_addr, m)) {
netdev_warn(dev, "reject mac %pM\n", m);
*(u16 *)(&dev->dev_addr[i]) = usValue;
}
} else {
- ether_addr_copy(dev->dev_addr, bMac_Tmp_Addr);
+ eth_hw_addr_set(dev, bMac_Tmp_Addr);
}
RT_TRACE(COMP_INIT, "Permanent Address = %pM\n",
mutex_lock(&priv->wx_mutex);
- ether_addr_copy(dev->dev_addr, addr->sa_data);
+ eth_hw_addr_set(dev, addr->sa_data);
schedule_work(&priv->reset_wq);
mutex_unlock(&priv->wx_mutex);
mutex_lock(&priv->wx_mutex);
- ether_addr_copy(dev->dev_addr, addr->sa_data);
+ eth_hw_addr_set(dev, addr->sa_data);
schedule_work(&priv->reset_wq);
mutex_unlock(&priv->wx_mutex);
struct sockaddr *addr = p;
if (!padapter->bup)
- ether_addr_copy(pnetdev->dev_addr, addr->sa_data);
+ eth_hw_addr_set(pnetdev, addr->sa_data);
return 0;
}
dev_info(&udev->dev,
"r8712u: MAC Address from efuse = %pM\n", mac);
}
- ether_addr_copy(pnetdev->dev_addr, mac);
+ eth_hw_addr_set(pnetdev, mac);
}
/* step 6. Load the firmware asynchronously */
if (rtl871x_load_fw(padapter))