Added Kernel 5.17 support

This commit is contained in:
ivanovborislav 2022-03-29 18:48:22 +03:00 committed by GitHub
parent 1cc0023690
commit e0c990215e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -2174,7 +2174,11 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
/* alloc netdev name */ /* alloc netdev name */
rtw_init_netdev_name(ndev, name); rtw_init_netdev_name(ndev, name);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0))
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN); _rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN);
#else
dev_addr_set(ndev, adapter_mac_addr(adapter));
#endif
/* Tell the network stack we exist */ /* Tell the network stack we exist */