File osdep_service_linux.patch of Package rtl8821ce

--- rtl8821ce-git20180902/include/osdep_service_linux.h	2018-09-02 03:26:26.000000000 +0200
+++ rtl8821ce-0.0.0+git20171129-lp150.1.1.src/rtl8821ce/include/osdep_service_linux.h	2018-09-02 07:00:12.237892351 +0200
@@ -21,6 +21,9 @@
 #define __OSDEP_LINUX_SERVICE_H_
 
 #include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/sched/signal.h>
+#endif
 #include <linux/spinlock.h>
 #include <linux/compiler.h>
 #include <linux/kernel.h>
@@ -288,10 +291,21 @@
 	list_del_init(plist);
 }
 
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 13, 0))
+__inline static void _init_timer(_timer *ptimer, _nic_hdl nic_hdl, void *pfunc, void *cntx)
+#else
 __inline static void _init_timer(_timer *ptimer, _nic_hdl nic_hdl, void *pfunc)
+#endif
+
 {
 	/* setup_timer(ptimer, pfunc,(u32)cntx);	 */
+#if (LINUX_VERSION_CODE <= KERNEL_VERSION(4, 13, 0))
+    ptimer->function = pfunc;
+	ptimer->data = (unsigned long)cntx;
+	init_timer(ptimer);
+#else
 	timer_setup(ptimer, pfunc, 0);
+#endif
 }
 
 __inline static void _set_timer(_timer *ptimer, u32 delay_time)
openSUSE Build Service is sponsored by