ipq806x: rt4230w-rev6: fix status reporting via the LEDs
[openwrt/openwrt.git] / package / kernel / lantiq / ltq-tapi / patches / 500-linux-509.patch
1 --- a/src/drv_tapi_linux.c
2 +++ b/src/drv_tapi_linux.c
3 @@ -3287,10 +3287,13 @@ static IFX_void_t proc_EntriesRemove(IFX
4 */
5 static IFX_void_t tapi_wq_setscheduler (IFX_int32_t foo)
6 {
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
8 struct sched_param sched_params;
9 -
10 sched_params.sched_priority = TAPI_OS_THREAD_PRIO_HIGH;
11 sched_setscheduler(current, SCHED_FIFO, &sched_params);
12 +#else
13 + sched_set_fifo_low(current);
14 +#endif
15 }
16 #endif /* LINUX_2_6 */
17
18 @@ -3727,6 +3730,7 @@ static IFX_int32_t TAPI_SelectCh (TAPI_F
19 */
20 IFX_int32_t TAPI_OS_ThreadPriorityModify(IFX_uint32_t newPriority)
21 {
22 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0))
23 struct sched_param sched_params;
24 IFX_int32_t ret;
25
26 @@ -3744,6 +3748,10 @@ IFX_int32_t TAPI_OS_ThreadPriorityModify
27 }
28
29 return (ret < 0) ? IFX_ERROR : IFX_SUCCESS;
30 +#else
31 + sched_set_fifo_low(current);
32 + return IFX_SUCCESS;
33 +#endif
34 }
35
36
37 @@ -3800,7 +3808,9 @@ module_exit (ifx_tapi_module_exit);
38
39 MODULE_AUTHOR ("Lantiq Deutschland GmbH");
40 MODULE_DESCRIPTION ("TAPI Driver - www.lantiq.com");
41 +#if LINUX_VERSION_CODE <= KERNEL_VERSION(5,10,0)
42 MODULE_SUPPORTED_DEVICE ("TAPI DEVICE");
43 +#endif
44 MODULE_LICENSE ("Dual BSD/GPL");
45
46 EXPORT_SYMBOL (IFX_TAPI_Register_LL_Drv);
47 --- a/src/drv_tapi_kpi.c
48 +++ b/src/drv_tapi_kpi.c
49 @@ -134,7 +134,11 @@ extern IFX_int32_t block_ingre
50 /* ========================================================================== */
51 static IFX_void_t ifx_tapi_KPI_IngressHandler (IFX_ulong_t foo);
52 #ifdef KPI_TASKLET
53 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
54 DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L);
55 +#else
56 +DECLARE_TASKLET_OLD(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler);
57 +#endif
58 #endif /* KPI_TASKLET */
59 static IFX_int32_t ifx_tapi_KPI_IngressThread (IFXOS_ThreadParams_t *pThread);
60 static IFX_return_t ifx_tapi_KPI_GroupInit(IFX_uint32_t nKpiGroup);