1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-30 00:47:38 +00:00

adopt upstream: net: Fix inconsistent teardown

net: Fix inconsistent teardown and release of private netdev state.

commit id
cf124db566e6b036b8bcbe8decbed740bdfac8c6
This commit is contained in:
Christian kimocoder 2017-10-24 16:29:48 +02:00 committed by GitHub
parent efc08fe295
commit 0402e2a32b

View File

@ -3670,6 +3670,11 @@ 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;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12 ,0))
mon_ndev->needs_free_netdev = true;
#else
mon_ndev->destructor = rtw_ndev_destructor;
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 9))
mon_ndev->needs_free_netdev = false;
mon_ndev->priv_destructor = rtw_ndev_destructor;