RTL8192DU: Fix build with kernel 4.2+

This commit is contained in:
fritsch 2015-10-20 12:28:48 -07:00 committed by Stephan Raue
parent 10735c6bfb
commit 40765be557

View File

@ -0,0 +1,30 @@
From 9e7eb15c74779150e7cc7229a06335a579366f2a Mon Sep 17 00:00:00 2001
From: Larry Finger <Larry.Finger@lwfinger.net>
Date: Mon, 28 Sep 2015 19:55:49 -0500
Subject: [PATCH] rtl8192du: Fix build on kernel 4.2
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
os_dep/ioctl_cfg80211.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c
index a2bc7ed..7054e3a 100644
--- a/os_dep/ioctl_cfg80211.c
+++ b/os_dep/ioctl_cfg80211.c
@@ -491,8 +491,13 @@ void rtw_cfg80211_indicate_disconnect(struct rtw_adapter *padapter)
WLAN_STATUS_UNSPECIFIED_FAILURE,
GFP_ATOMIC/*GFP_KERNEL*/);
} else {
- cfg80211_disconnected(padapter->pnetdev, 0, NULL,
- 0, GFP_ATOMIC);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)
+ cfg80211_disconnected(padapter->pnetdev, 0,
+ NULL, 0, true, GFP_ATOMIC);
+#else
+ cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0,
+ GFP_ATOMIC);
+#endif
}
}
}