@@ -5221,7 +5221,7 @@ static int ice_set_mac_address(struct net_device *netdev, void *pi)
* modified outside of the driver and needs to be restored back
* to this value.
*/
- memcpy(netdev->dev_addr, mac, netdev->addr_len);
+ ether_addr_copy(netdev->dev_addr, mac);
netdev_dbg(netdev, "filter for MAC %pM already exists\n", mac);
return 0;
}
@@ -5238,7 +5238,7 @@ static int ice_set_mac_address(struct net_device *netdev, void *pi)
}
/* change the netdev's MAC address */
- memcpy(netdev->dev_addr, mac, netdev->addr_len);
+ ether_addr_copy(netdev->dev_addr, mac);
netdev_dbg(vsi->netdev, "updated MAC address to %pM\n",
netdev->dev_addr);
To save the netdev->dev_addr the driver is using memcpy with the length of a MAC address. ether_addr_copy() is meant specifically for this, so use it. Signed-off-by: Brett Creeley <brett.creeley@intel.com> --- drivers/net/ethernet/intel/ice/ice_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)