aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/lantiq/ltq-tapi
diff options
context:
space:
mode:
Diffstat (limited to 'package/kernel/lantiq/ltq-tapi')
-rw-r--r--package/kernel/lantiq/ltq-tapi/Makefile2
-rw-r--r--package/kernel/lantiq/ltq-tapi/patches/410-custom_pulsedigit_time.patch52
-rw-r--r--package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch10
-rw-r--r--package/kernel/lantiq/ltq-tapi/patches/510-linux-515.patch14
-rw-r--r--package/kernel/lantiq/ltq-tapi/patches/600-fix-compilation-warning-switch-fallthrough.patch114
-rw-r--r--package/kernel/lantiq/ltq-tapi/patches/601-fix-compilation-warning-ret-not-handled.patch12
6 files changed, 203 insertions, 1 deletions
diff --git a/package/kernel/lantiq/ltq-tapi/Makefile b/package/kernel/lantiq/ltq-tapi/Makefile
index 77728644f60..d44eeae5658 100644
--- a/package/kernel/lantiq/ltq-tapi/Makefile
+++ b/package/kernel/lantiq/ltq-tapi/Makefile
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=drv_tapi
PKG_VERSION:=3.13.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=drv_tapi-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=@OPENWRT
diff --git a/package/kernel/lantiq/ltq-tapi/patches/410-custom_pulsedigit_time.patch b/package/kernel/lantiq/ltq-tapi/patches/410-custom_pulsedigit_time.patch
new file mode 100644
index 00000000000..965b8be9602
--- /dev/null
+++ b/package/kernel/lantiq/ltq-tapi/patches/410-custom_pulsedigit_time.patch
@@ -0,0 +1,52 @@
+--- a/src/drv_tapi.h
++++ b/src/drv_tapi.h
+@@ -25,6 +25,7 @@
+ #include <lib_bufferpool.h>
+ #include "drv_tapi_io.h"
+ #include "drv_tapi_event.h"
++#include <linux/module.h>
+
+
+ /* ============================= */
+--- a/src/drv_tapi_dial.c
++++ b/src/drv_tapi_dial.c
+@@ -20,6 +20,19 @@
+ #include "drv_tapi.h"
+ #include "drv_tapi_errno.h"
+
++
++
++static unsigned int min_digit_low = TAPI_MIN_DIGIT_LOW;
++static unsigned int max_digit_low = TAPI_MAX_DIGIT_LOW;
++static unsigned int min_digit_high = TAPI_MIN_DIGIT_HIGH;
++static unsigned int max_digit_high = TAPI_MAX_DIGIT_HIGH;
++static unsigned int min_interdigit = TAPI_MIN_INTERDIGIT;
++module_param(min_digit_low, uint, 0);
++module_param(max_digit_low, uint, 0);
++module_param(min_digit_high, uint, 0);
++module_param(max_digit_high, uint, 0);
++module_param(min_interdigit, uint, 0);
++
+ /*lint -save -esym(749, TAPI_HOOK_STATE_PULSE_H_FLASH_VAL) */
+ /* ============================= */
+ /* Local macros and definitions */
+@@ -408,14 +421,14 @@ IFX_int32_t IFX_TAPI_Dial_Initialise(TAP
+ }
+ }
+ /* set default values for the validation timers */
+- pTapiDialData->TapiDigitLowTime.nMinTime = TAPI_MIN_DIGIT_LOW;
+- pTapiDialData->TapiDigitLowTime.nMaxTime = TAPI_MAX_DIGIT_LOW;
+- pTapiDialData->TapiDigitHighTime.nMinTime = TAPI_MIN_DIGIT_HIGH;
+- pTapiDialData->TapiDigitHighTime.nMaxTime = TAPI_MAX_DIGIT_HIGH;
++ pTapiDialData->TapiDigitLowTime.nMinTime = min_digit_low;
++ pTapiDialData->TapiDigitLowTime.nMaxTime = max_digit_low;
++ pTapiDialData->TapiDigitHighTime.nMinTime = min_digit_high;
++ pTapiDialData->TapiDigitHighTime.nMaxTime = max_digit_high;
+ pTapiDialData->TapiHookFlashTime.nMinTime = TAPI_MIN_FLASH;
+ pTapiDialData->TapiHookFlashTime.nMaxTime = TAPI_MAX_FLASH;
+ pTapiDialData->TapiHookFlashMakeTime.nMinTime = TAPI_MIN_FLASH_MAKE;
+- pTapiDialData->TapiInterDigitTime.nMinTime = TAPI_MIN_INTERDIGIT;
++ pTapiDialData->TapiInterDigitTime.nMinTime = min_interdigit;
+ pTapiDialData->TapiHookOffTime.nMinTime = TAPI_MIN_OFF_HOOK;
+ pTapiDialData->TapiHookOnTime.nMinTime = TAPI_MIN_ON_HOOK;
+ /* start hook state FSM in onhook state */
diff --git a/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch b/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch
index 586af59d856..07f61aa6326 100644
--- a/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch
+++ b/package/kernel/lantiq/ltq-tapi/patches/500-linux-509.patch
@@ -34,6 +34,16 @@
}
+@@ -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
diff --git a/package/kernel/lantiq/ltq-tapi/patches/510-linux-515.patch b/package/kernel/lantiq/ltq-tapi/patches/510-linux-515.patch
new file mode 100644
index 00000000000..ee20c6caf7c
--- /dev/null
+++ b/package/kernel/lantiq/ltq-tapi/patches/510-linux-515.patch
@@ -0,0 +1,14 @@
+--- a/src/drv_tapi_linux.c
++++ b/src/drv_tapi_linux.c
+@@ -3779,8 +3779,10 @@ IFX_void_t TAPI_OS_ThreadKill(IFXOS_Thre
+ mb();
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
+ kill_proc(pThrCntrl->tid, SIGKILL, 1);
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0)
+ kill_pid(find_vpid(pThrCntrl->tid), SIGKILL, 1);
++#else
++ kill_pid(get_task_pid(pThrCntrl->tid, PIDTYPE_PID), SIGKILL, 1);
+ #endif
+ /* release the big kernel lock */
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)
diff --git a/package/kernel/lantiq/ltq-tapi/patches/600-fix-compilation-warning-switch-fallthrough.patch b/package/kernel/lantiq/ltq-tapi/patches/600-fix-compilation-warning-switch-fallthrough.patch
new file mode 100644
index 00000000000..bb27ff355ad
--- /dev/null
+++ b/package/kernel/lantiq/ltq-tapi/patches/600-fix-compilation-warning-switch-fallthrough.patch
@@ -0,0 +1,114 @@
+--- a/src/drv_tapi_cid.c
++++ b/src/drv_tapi_cid.c
+@@ -1424,6 +1424,8 @@ static IFX_int32_t cid_lookup_transparent(TAPI_CIDTX_DATA_t *pTxData,
+
+ cidfsk_set_tx_time (pTxData, &pConfData->TapiCidFskConf);
+
++ fallthrough;
++
+ case IFX_TAPI_CID_GEN_TYPE_DTMF:
+ memcpy (pTxData->cidBuf[IFX_TAPI_CID_GEN_TYPE_DTMF].pBuf,
+ pMessage[0].transparent.data, pMessage[0].transparent.len);
+@@ -1497,6 +1499,7 @@ static IFX_int32_t cid_prepare_data(TAPI_CHANNEL *pChannel,
+ break;
+ case IFX_TAPI_CID_STD_KPN_DTMF:
+ /*lint -fallthrough*/
++ fallthrough;
+ case IFX_TAPI_CID_STD_KPN_DTMF_FSK:
+ if (IFX_TAPI_CID_HM_ONHOOK == pTxData->txHookMode)
+ {
+@@ -1506,6 +1509,7 @@ static IFX_int32_t cid_prepare_data(TAPI_CHANNEL *pChannel,
+ }
+ /* KPN CID Type 2 (off-hook) always using FSK */
+ /*lint -fallthrough*/
++ fallthrough;
+ default:
+ pTxData->cidGenType = IFX_TAPI_CID_GEN_TYPE_FSK;
+ break;
+@@ -1532,6 +1536,7 @@ static IFX_int32_t cid_prepare_data(TAPI_CHANNEL *pChannel,
+ break;
+
+ /*lint -fallthrough*/
++ fallthrough;
+ case IFX_TAPI_CID_GEN_TYPE_FSK:
+
+ if (IFX_TAPI_CID_STD_NTT == pConfData->nStandard)
+@@ -2036,6 +2041,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(TAPI_CHANNEL *pChannel)
+ }
+ pTxData->nCidSubState++;
+ /*lint -fallthrough*/
++ fallthrough;
+ case 1:
+ if (pConfData->OSIoffhook && pConfData->nSAStone)
+ {
+@@ -2052,6 +2058,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(TAPI_CHANNEL *pChannel)
+ }
+ pTxData->nCidSubState++;
+ /*lint -fallthrough*/
++ fallthrough;
+ case 2:
+ if (pConfData->nSAStone)
+ {
+@@ -2069,6 +2076,7 @@ static FSM_STATUS_t cid_fsm_alert_exec(TAPI_CHANNEL *pChannel)
+ }
+ pTxData->nCidSubState++;
+ /*lint -fallthrough*/
++ fallthrough;
+ default:
+ /* Play CAS tone on data channel, use unprotected function, protection
+ is done around cid_fsm_alert_exec */
+@@ -3458,6 +3466,7 @@ IFX_int32_t TAPI_Phone_CID_Stop_Tx(TAPI_CHANNEL *pChannel)
+ }
+ /* deliberately fall through */
+ /*lint -fallthrough*/
++ fallthrough;
+ case TAPI_CID_STATE_ACK:
+ /* deactivate the DTMF override - last two params are ignored */
+ if (ptr_chk(pDrvCtx->SIG.DTMFD_Override, ""))
+@@ -3469,6 +3478,7 @@ IFX_int32_t TAPI_Phone_CID_Stop_Tx(TAPI_CHANNEL *pChannel)
+ }
+ /* deliberately fall through */
+ /*lint -fallthrough*/
++ fallthrough;
+ case TAPI_CID_STATE_SENDING:
+ TAPI_Stop_Timer (pTxData->CidTimerID);
+ break;
+@@ -4066,6 +4076,7 @@ IFX_int32_t TAPI_Phone_Get_CidRxData (TAPI_CHANNEL *pChannel,
+ /* If the fifo is not empty take the data from the fifo first. */
+ /* deliberately fallthrough to default case */
+ /*lint -fallthrough*/
++ fallthrough;
+ default:
+ /* Allow readout of data in all other states not handled above.
+ When there is no data in the fifo TAPI_statusErr is returned. */
+--- a/src/drv_tapi_dial.c
++++ b/src/drv_tapi_dial.c
+@@ -319,6 +319,8 @@ static IFX_void_t ifx_tapi_dial_OnTimer(Timer_ID Timer, IFX_ulong_t nArg)
+ /* NOTE: the "break" statement has been intentionally omitted */
+ /*lint -fallthrough */
+
++ fallthrough;
++
+ case TAPI_HOOK_STATE_DIAL_L_VAL:
+ /* digit_l_min expires: onhook has lasted long enough to be a
+ certain low pulse (not noise). The next state is the overlap with
+--- a/src/drv_tapi_event.c
++++ b/src/drv_tapi_event.c
+@@ -1545,6 +1545,7 @@ IFX_int32_t IFX_TAPI_Event_Dispatch_ProcessCtx(IFX_TAPI_EXT_EVENT_PARAM_t*
+ /**\todo put in device fifo */
+ pEvent->ch = IFX_TAPI_DEVICE_CH_NUMBER;
+ /*lint -fallthrough */
++ fallthrough;
+ case IFX_TAPI_ERRSRC_LL_CH:
+ pEvent->data.value |= IFX_TAPI_ERRSRC_LL;
+ break;
+--- a/src/drv_tapi_ioctl.c
++++ b/src/drv_tapi_ioctl.c
+@@ -1552,6 +1553,7 @@ static IFX_int32_t TAPI_IoctlCh (IFX_TAPI_DRV_CTX_t* pDrvCtx,
+ /* Dial Services */
+ ret = TAPI_statusNotSupported;
+ /*lint -fallthrough*/
++ fallthrough;
+ default:
+ bHandled = IFX_FALSE;
+ break;
diff --git a/package/kernel/lantiq/ltq-tapi/patches/601-fix-compilation-warning-ret-not-handled.patch b/package/kernel/lantiq/ltq-tapi/patches/601-fix-compilation-warning-ret-not-handled.patch
new file mode 100644
index 00000000000..b97ced30f80
--- /dev/null
+++ b/package/kernel/lantiq/ltq-tapi/patches/601-fix-compilation-warning-ret-not-handled.patch
@@ -0,0 +1,12 @@
+--- a/src/drv_tapi_ioctl.c
++++ b/src/drv_tapi_ioctl.c
+@@ -702,7 +702,8 @@ static IFX_int32_t TAPI_IoctlDev (IFX_TAPI_DRV_CTX_t* pDrvCtx,
+
+ if (ret == TAPI_statusOk || ret == 1)
+ {
+- copy_to_user ((IFX_void_t*)ioarg, p_tmp, sizeof(IFX_TAPI_CAP_t));
++ if (copy_to_user ((IFX_void_t*)ioarg, p_tmp, sizeof(IFX_TAPI_CAP_t)))
++ ret = TAPI_statusErrKernCpy;
+ }
+ }
+ TAPI_OS_Free (p_tmp);