Skip to content

Commit

Permalink
RTL8192DU: Fix build with kernel 4.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
fritsch authored and sraue committed Nov 2, 2015
1 parent 10735c6 commit 40765be
Showing 1 changed file with 30 additions and 0 deletions.
@@ -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
}
}
}

0 comments on commit 40765be

Please sign in to comment.