fix for 4.11.10 kernel
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
This commit is contained in:
parent
8d0c180b73
commit
d255c74de5
|
@ -3928,7 +3928,8 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name, struct ne
|
||||||
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
mon_ndev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||||
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
strncpy(mon_ndev->name, name, IFNAMSIZ);
|
||||||
mon_ndev->name[IFNAMSIZ - 1] = 0;
|
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))
|
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29))
|
||||||
mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;
|
mon_ndev->netdev_ops = &rtw_cfg80211_monitor_if_ops;
|
||||||
|
|
|
@ -3047,7 +3047,6 @@ void rtw_ndev_destructor(struct net_device *ndev)
|
||||||
if (ndev->ieee80211_ptr)
|
if (ndev->ieee80211_ptr)
|
||||||
rtw_mfree((u8 *)ndev->ieee80211_ptr, sizeof(struct wireless_dev));
|
rtw_mfree((u8 *)ndev->ieee80211_ptr, sizeof(struct wireless_dev));
|
||||||
#endif
|
#endif
|
||||||
free_netdev(ndev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_ARP_KEEP_ALIVE
|
#ifdef CONFIG_ARP_KEEP_ALIVE
|
||||||
|
|
Loading…
Reference in a new issue