From 1cc0023690253df6bc1cf4c7d6efa3c59ab79da3 Mon Sep 17 00:00:00 2001 From: ivanovborislav <81085106+ivanovborislav@users.noreply.github.com> Date: Tue, 29 Mar 2022 18:46:02 +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 3612523..85cac45 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1634,7 +1634,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, 17, 0)) _rtw_memcpy(pnetdev->dev_addr, sa->sa_data, ETH_ALEN); /* set mac addr to net_device */ +#else + dev_addr_set(pnetdev, sa->sa_data); /* set mac addr to net_device */ +#endif #if 0 if (rtw_is_hw_init_completed(padapter)) {