fix for 4.11.10 kernel

Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
This commit is contained in:
Icenowy Zheng 2017-07-15 01:09:04 +08:00
parent 8d0c180b73
commit d255c74de5
2 changed files with 2 additions and 2 deletions

View file

@ -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;

View file

@ -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