RTL8812AU: Fix build with kernel 4.2+

This commit is contained in:
fritsch 2015-10-20 12:28:52 -07:00 committed by Stephan Raue
parent 40765be557
commit 3208b638f5

View File

@ -0,0 +1,26 @@
From 0aa1823aa7e658422f49f558b8b82b03a32f0c30 Mon Sep 17 00:00:00 2001
From: Jos Dehaes <jos.dehaes@gmail.com>
Date: Fri, 25 Sep 2015 23:11:57 +0200
Subject: [PATCH] adapt to api in linux 4.2
---
os_dep/linux/ioctl_cfg80211.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
index 4946de3..6a751fd 100644
--- a/os_dep/linux/ioctl_cfg80211.c
+++ b/os_dep/linux/ioctl_cfg80211.c
@@ -601,8 +601,12 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter)
else if(pwdev->sme_state==CFG80211_SME_CONNECTED)
cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, GFP_ATOMIC);
#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0)
+ cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, 0, GFP_ATOMIC);
+#else
cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, GFP_ATOMIC);
#endif
+#endif
//DBG_8192C("pwdev->sme_state(a)=%d\n", pwdev->sme_state);
}