From d255c74de581c758ed9177f38a1f791e35ac06d4 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Sat, 15 Jul 2017 01:09:04 +0800 Subject: [PATCH] fix for 4.11.10 kernel Signed-off-by: Icenowy Zheng --- os_dep/linux/ioctl_cfg80211.c | 3 ++- os_dep/linux/os_intfs.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 90f8f11..69b40ed 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -3928,7 +3928,8 @@ 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; + mon_ndev->priv_destructor = rtw_ndev_destructor; + mon_ndev->needs_free_netdev = true; #if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29)) mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops; diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index a8d756a..748a409 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -3047,7 +3047,6 @@ void rtw_ndev_destructor(struct net_device *ndev) if (ndev->ieee80211_ptr) rtw_mfree((u8 *)ndev->ieee80211_ptr, sizeof(struct wireless_dev)); #endif - free_netdev(ndev); } #ifdef CONFIG_ARP_KEEP_ALIVE