nvethernet: use address setting helpers

Use address setting helpers as netdev->dev_addr
is constant from K5.17

Bug 3978991

Change-Id: I75520ecf695cbf370ef8233d12c250996ebc2abd
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2872952
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Revanth Kumar Uppala
2023-03-17 15:21:21 +00:00
committed by mobile promotions
parent 48061dcb5d
commit 1d36e57bf2

View File

@@ -4667,6 +4667,10 @@ static int ether_get_mac_address(struct ether_priv_data *pdata)
eth_mac_addr = addr;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0)
dev_addr_mod(ndev, 0, eth_mac_addr, ETH_ALEN);
#endif
/* Found a valid mac address */
memcpy(ndev->dev_addr, eth_mac_addr, ETH_ALEN);
memcpy(osi_core->mac_addr, eth_mac_addr, ETH_ALEN);