From 924f57d1cce2843aa28d557b74baf00a6482caa8 Mon Sep 17 00:00:00 2001 From: Butterfly Date: Tue, 12 Apr 2022 00:08:52 +0300 Subject: [PATCH] ioctl_linux.c: fix warning _rtw_memcpy ioctl_linux.c: fix warning _rtw_memcpy --- os_dep/linux/ioctl_linux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c index 20dd583..a0d32ee 100644 --- a/os_dep/linux/ioctl_linux.c +++ b/os_dep/linux/ioctl_linux.c @@ -9778,7 +9778,11 @@ static int rtw_mp_efuse_set(struct net_device *dev, rtw_hal_read_chip_info(padapter); /* set mac addr*/ rtw_macaddr_cfg(adapter_mac_addr(padapter), get_hal_mac_addr(padapter)); +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) _rtw_memcpy(padapter->pnetdev->dev_addr, get_hal_mac_addr(padapter), ETH_ALEN); /* set mac addr to net_device */ +#else + dev_addr_set(padapter->pnetdev, get_hal_mac_addr(padapter)); /* set mac addr to net_device */ +#endif #ifdef CONFIG_P2P rtw_init_wifidirect_addrs(padapter, adapter_mac_addr(padapter), adapter_mac_addr(padapter));