mirror of
https://github.com/RinCat/RTL88x2BU-Linux-Driver.git
synced 2024-11-10 01:02:50 +00:00
Linux 5.15 compat: use dev_addr_set
This commit is contained in:
parent
5f6ef2ff4f
commit
a543f246e3
@ -1621,7 +1621,11 @@ static int rtw_net_set_mac_address(struct net_device *pnetdev, void *addr)
|
||||
}
|
||||
|
||||
_rtw_memcpy(adapter_mac_addr(padapter), sa->sa_data, ETH_ALEN); /* set mac addr to adapter */
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
||||
dev_addr_set(pnetdev, sa->sa_data);
|
||||
#else
|
||||
_rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
if (rtw_is_hw_init_completed(padapter)) {
|
||||
@ -2157,7 +2161,11 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
|
||||
/* alloc netdev name */
|
||||
rtw_init_netdev_name(ndev, name);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 15, 0))
|
||||
dev_addr_set(ndev, adapter_mac_addr(adapter));
|
||||
#else
|
||||
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NET_NS
|
||||
dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter)));
|
||||
|
Loading…
Reference in New Issue
Block a user