return -ENOMEM;
}
- if (device_get_mac_address(dev, ndev->dev_addr))
+ if (device_get_ethdev_address(dev, ndev))
eth_hw_addr_random(ndev);
memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len);
xgene_get_port_id_acpi(dev, pdata);
#endif
- if (device_get_mac_address(dev, ndev->dev_addr))
+ if (device_get_ethdev_address(dev, ndev))
eth_hw_addr_random(ndev);
memcpy(ndev->perm_addr, ndev->dev_addr, ndev->addr_len);
if (pd && !IS_ERR_OR_NULL(pd->mac_address))
eth_hw_addr_set(dev, pd->mac_address);
else
- if (device_get_mac_address(&pdev->dev, dev->dev_addr))
+ if (device_get_ethdev_address(&pdev->dev, dev))
if (has_acpi_companion(&pdev->dev))
bcmgenet_get_hw_addr(priv, dev->dev_addr);
{
struct hns_nic_priv *priv = netdev_priv(ndev);
- if (device_get_mac_address(priv->dev, ndev->dev_addr)) {
+ if (device_get_ethdev_address(priv->dev, ndev)) {
eth_hw_addr_random(ndev);
dev_warn(priv->dev, "No valid mac, use random mac %pM",
ndev->dev_addr);