mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 10:45:09 +07:00
fm10k: use ether_addr_copy to copy MAC address
Cleanup the remaining instances of using memcpy() instead of the preferred ether_addr_copy(). Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
1905add427
commit
11c49f79b2
@ -1776,8 +1776,8 @@ static int fm10k_sw_init(struct fm10k_intfc *interface,
|
|||||||
netdev->addr_assign_type |= NET_ADDR_RANDOM;
|
netdev->addr_assign_type |= NET_ADDR_RANDOM;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(netdev->dev_addr, hw->mac.addr, netdev->addr_len);
|
ether_addr_copy(netdev->dev_addr, hw->mac.addr);
|
||||||
memcpy(netdev->perm_addr, hw->mac.addr, netdev->addr_len);
|
ether_addr_copy(netdev->perm_addr, hw->mac.addr);
|
||||||
|
|
||||||
if (!is_valid_ether_addr(netdev->perm_addr)) {
|
if (!is_valid_ether_addr(netdev->perm_addr)) {
|
||||||
dev_err(&pdev->dev, "Invalid MAC Address\n");
|
dev_err(&pdev->dev, "Invalid MAC Address\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user