- starting point of kernel 4.15 fixes
[packages/rtl8812au.git] / kernel-4.15.patch
1 diff -ur rtl8812au-5.1.5/include/osdep_service_linux.h rtl8812au-5.1.5-4.15/include/osdep_service_linux.h
2 --- rtl8812au-5.1.5/include/osdep_service_linux.h       2017-07-30 13:07:06.000000000 +0200
3 +++ rtl8812au-5.1.5-4.15/include/osdep_service_linux.h  2018-01-30 09:39:19.303035056 +0100
4 @@ -273,9 +273,13 @@
5  __inline static void _init_timer(_timer *ptimer, _nic_hdl nic_hdl, void *pfunc, void *cntx)
6  {
7         /* setup_timer(ptimer, pfunc,(u32)cntx);         */
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
9 +       timer_setup(ptimer, pfunc, 0);
10 +#else
11         ptimer->function = pfunc;
12         ptimer->data = (unsigned long)cntx;
13         init_timer(ptimer);
14 +#endif
15  }
16  
17  __inline static void _set_timer(_timer *ptimer, u32 delay_time)
18 diff -ur rtl8812au-5.1.5/os_dep/linux/recv_linux.c rtl8812au-5.1.5-4.15/os_dep/linux/recv_linux.c
19 --- rtl8812au-5.1.5/os_dep/linux/recv_linux.c   2017-07-30 13:07:06.000000000 +0200
20 +++ rtl8812au-5.1.5-4.15/os_dep/linux/recv_linux.c      2018-01-30 10:00:34.479700310 +0100
21 @@ -789,10 +789,15 @@
22  #endif
23  
24  }
25 -void _rtw_reordering_ctrl_timeout_handler(void *FunctionContext);
26 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0)
27 +void _rtw_reordering_ctrl_timeout_handler(struct timer_list *timer)
28 +{
29 +       struct recv_reorder_ctrl *preorder_ctrl = from_timer(preorder_ctrl, timer, reordering_ctrl_timer);
30 +#else
31  void _rtw_reordering_ctrl_timeout_handler(void *FunctionContext)
32  {
33         struct recv_reorder_ctrl *preorder_ctrl = (struct recv_reorder_ctrl *)FunctionContext;
34 +#endif
35         rtw_reordering_ctrl_timeout_handler(preorder_ctrl);
36  }
37  
This page took 0.065864 seconds and 3 git commands to generate.