mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-25 02:32:08 +03:00
nvethernet: Correct the if-else condition to copy mac address
Address setting helpers are used to copy mac address from K5.17 as netdev->dev_addr is constant from K5.17.Adding an else condition now so that memcpy will be used for Kernel versions below K5.17 Bug 4076818 Change-Id: I1542a82710aa2bdf12bfc93fdaedf31d34df91b2 Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897883 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
d1f735fe0d
commit
2c2e1dfb9e
@@ -4751,12 +4751,12 @@ static int ether_get_mac_address(struct ether_priv_data *pdata)
|
||||
eth_mac_addr = addr;
|
||||
}
|
||||
|
||||
/* Found a valid mac address */
|
||||
#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 */
|
||||
#else
|
||||
memcpy(ndev->dev_addr, eth_mac_addr, ETH_ALEN);
|
||||
#endif
|
||||
memcpy(osi_core->mac_addr, eth_mac_addr, ETH_ALEN);
|
||||
|
||||
dev_info(dev, "Ethernet MAC address: %pM\n", ndev->dev_addr);
|
||||
|
||||
Reference in New Issue
Block a user