From e0c990215e4ebc582394b5e7cba314b642be6741 Mon Sep 17 00:00:00 2001 From: ivanovborislav <81085106+ivanovborislav@users.noreply.github.com> Date: Tue, 29 Mar 2022 18:48:22 +0300 Subject: [PATCH] Added Kernel 5.17 support --- os_dep/linux/os_intfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 85cac45..1246e04 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -2174,7 +2174,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, 17, 0)) _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 */