mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-29 01:59:02 +00:00
22fbc2d896
MODULE_SUPPORTED_DEVICE was removed after Linux 5.10. Drop it from the driver as well. Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
61 lines
1.9 KiB
Diff
61 lines
1.9 KiB
Diff
--- a/src/drv_tapi_linux.c
|
|
+++ b/src/drv_tapi_linux.c
|
|
@@ -3287,10 +3287,13 @@ static IFX_void_t proc_EntriesRemove(IFX
|
|
*/
|
|
static IFX_void_t tapi_wq_setscheduler (IFX_int32_t foo)
|
|
{
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
|
struct sched_param sched_params;
|
|
-
|
|
sched_params.sched_priority = TAPI_OS_THREAD_PRIO_HIGH;
|
|
sched_setscheduler(current, SCHED_FIFO, &sched_params);
|
|
+#else
|
|
+ sched_set_fifo_low(current);
|
|
+#endif
|
|
}
|
|
#endif /* LINUX_2_6 */
|
|
|
|
@@ -3727,6 +3730,7 @@ static IFX_int32_t TAPI_SelectCh (TAPI_F
|
|
*/
|
|
IFX_int32_t TAPI_OS_ThreadPriorityModify(IFX_uint32_t newPriority)
|
|
{
|
|
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0))
|
|
struct sched_param sched_params;
|
|
IFX_int32_t ret;
|
|
|
|
@@ -3744,6 +3748,10 @@ IFX_int32_t TAPI_OS_ThreadPriorityModify
|
|
}
|
|
|
|
return (ret < 0) ? IFX_ERROR : IFX_SUCCESS;
|
|
+#else
|
|
+ sched_set_fifo_low(current);
|
|
+ return IFX_SUCCESS;
|
|
+#endif
|
|
}
|
|
|
|
|
|
@@ -3800,7 +3808,9 @@ module_exit (ifx_tapi_module_exit);
|
|
|
|
MODULE_AUTHOR ("Lantiq Deutschland GmbH");
|
|
MODULE_DESCRIPTION ("TAPI Driver - www.lantiq.com");
|
|
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(5,10,0)
|
|
MODULE_SUPPORTED_DEVICE ("TAPI DEVICE");
|
|
+#endif
|
|
MODULE_LICENSE ("Dual BSD/GPL");
|
|
|
|
EXPORT_SYMBOL (IFX_TAPI_Register_LL_Drv);
|
|
--- a/src/drv_tapi_kpi.c
|
|
+++ b/src/drv_tapi_kpi.c
|
|
@@ -134,7 +134,11 @@ extern IFX_int32_t block_ingre
|
|
/* ========================================================================== */
|
|
static IFX_void_t ifx_tapi_KPI_IngressHandler (IFX_ulong_t foo);
|
|
#ifdef KPI_TASKLET
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,9,0)
|
|
DECLARE_TASKLET(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler, 0L);
|
|
+#else
|
|
+DECLARE_TASKLET_OLD(tl_kpi_ingress, ifx_tapi_KPI_IngressHandler);
|
|
+#endif
|
|
#endif /* KPI_TASKLET */
|
|
static IFX_int32_t ifx_tapi_KPI_IngressThread (IFXOS_ThreadParams_t *pThread);
|
|
static IFX_return_t ifx_tapi_KPI_GroupInit(IFX_uint32_t nKpiGroup);
|