rtl8812au/0003-Fix-build-with-kernel-4.11.9.patch
2017-10-19 12:07:15 +00:00

28 lines
977 B
Diff

From 128289124927edb14e780ddaa9d91a16d44a805c Mon Sep 17 00:00:00 2001
From: Yoyosan <veselu@gmail.com>
Date: Fri, 14 Jul 2017 08:35:14 +0300
Subject: [PATCH] Fix build with kernel 4.11.9.
---
os_dep/linux/ioctl_cfg80211.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index e040059..684447e 100755
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -3961,7 +3961,13 @@ static int rtw_cfg80211_add_monitor_if(_adapter *padapter, char *name,
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;