4.11.9: Fix build regression due to netdev destructor fix

As seen in [upstream commit](https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=v4.11.9&id=ed66e50d9587fc0bb032e276a2563c0068a5b63a)

Signed-off-by: masterzorag <masterzorag@gmail.com>
This commit is contained in:
masterzorag 2017-07-06 11:54:03 +02:00 committed by CGarces
parent 2f44b072f1
commit 7203537add

View File

@ -3959,7 +3959,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;
#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;