From cc5a4fee9547d6a63b01629818b7c3f7cac2778c Mon Sep 17 00:00:00 2001 From: kst123abc Date: Mon, 10 Jul 2017 18:23:07 -0400 Subject: [PATCH] working for Arch 4.11.9 --- include/osdep_service_linux.h | 3 +++ os_dep/linux/ioctl_cfg80211.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/osdep_service_linux.h b/include/osdep_service_linux.h index 9aaf191cc..de875e8d7 100755 --- a/include/osdep_service_linux.h +++ b/include/osdep_service_linux.h @@ -46,6 +46,9 @@ #endif #include #include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)) + #include +#endif #include #include #include diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index c92dd77e5..d1246d8fa 100755 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -3951,7 +3951,12 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP; strncpy(mon_ndev->name, name, IFNAMSIZ); mon_ndev->name[IFNAMSIZ - 1] = 0; - mon_ndev->destructor = rtw_ndev_destructor; +#if(LINUX_VERSION_CODE>=KERNEL_VERSION(4,11,9)) + mon_ndev->needs_free_netdev = false; + mon_ndev->priv_destructor = rtw_ndev_destructor; +#else + mon_ndev->destructor = rtw_ndev_destructor; +#endif #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29)) mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;