nErrCode = DSL_DRV_PM_HistoryDelete(pContext, EpData.pHistShowtime );
--- a/src/device/drv_dsl_cpe_device_danube.c
+++ b/src/device/drv_dsl_cpe_device_danube.c
-@@ -3193,7 +3193,7 @@ DSL_Error_t DSL_DRV_DEV_AutobootHandleTraining(
+@@ -3193,7 +3193,7 @@ DSL_Error_t DSL_DRV_DEV_AutobootHandleTr
DSL_DEV_NUM(pContext)));
}
#endif /* INCLUDE_DSL_DELT*/
--- a/src/g997/drv_dsl_cpe_api_g997_danube.c
+++ b/src/g997/drv_dsl_cpe_api_g997_danube.c
-@@ -1984,41 +1984,53 @@ DSL_Error_t DSL_DRV_DEV_G997_DeltHlogGet(
+@@ -1984,41 +1984,53 @@ DSL_Error_t DSL_DRV_DEV_G997_DeltHlogGet
{
if (nDirection == DSL_DOWNSTREAM)
{
--- a/src/g997/drv_dsl_cpe_api_g997_danube.c
+++ b/src/g997/drv_dsl_cpe_api_g997_danube.c
-@@ -2512,6 +2524,7 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManagementStateForcedTrigger(
+@@ -2524,6 +2524,7 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManage
else
{
/* read L3 request failure reason */
nErrCode = DSL_DRV_DANUBE_CmvRead(pContext, DSL_CMV_GROUP_STAT,
DSL_CMV_ADDRESS_STAT_L3_FAILURE_REASON, 0, 1, &nVal);
DSL_DEBUG(DSL_DBG_MSG,
-@@ -2525,11 +2538,13 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManagementStateForcedTrigger(
+@@ -2537,11 +2538,13 @@ DSL_Error_t DSL_DRV_DEV_G997_PowerManage
nErrCode = DSL_ERR_MSG_EXCHANGE;
break;
}
--- /dev/null
+--- a/src/common/drv_dsl_cpe_os_linux.c
++++ b/src/common/drv_dsl_cpe_os_linux.c
+@@ -556,7 +556,11 @@ static int DSL_DRV_KernelThreadStartup(v
+ retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams);
+ pThrCntrl->thrParams.bRunning = 0;
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
+ complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
++#else
++ kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
++#endif
+
+ DSL_DEBUG( DSL_DBG_MSG,
+ (DSL_NULL, "EXIT - Kernel Thread Startup <%s>" DSL_DRV_CRLF,
--- a/ifxmips_ptm_adsl.c
+++ b/ifxmips_ptm_adsl.c
-@@ -180,7 +180,7 @@ static int proc_read_version(char *, char **, off_t, int, int *, void *);
+@@ -180,7 +180,7 @@ static int proc_read_version(char *, cha
static int proc_read_wanmib(char *, char **, off_t, int, int *, void *);
static int proc_write_wanmib(struct file *, const char *, unsigned long, void *);
#endif
static int proc_read_genconf(char *, char **, off_t, int, int *, void *);
#endif
#if defined(ENABLE_DBG_PROC) && ENABLE_DBG_PROC
-@@ -191,8 +191,8 @@ static int proc_write_wanmib(struct file *, const char *, unsigned long, void *)
+@@ -191,8 +191,8 @@ static int proc_write_wanmib(struct file
/*
* Proc Help Functions
*/
static INLINE int strincmp(const char *, const char *, int);
#endif
static INLINE int ifx_ptm_version(char *);
-@@ -1159,8 +1159,6 @@ static int proc_write_dbg(struct file *file, const char *buf, unsigned long coun
+@@ -1159,8 +1159,6 @@ static int proc_write_dbg(struct file *f
return count;
}
static INLINE int stricmp(const char *p1, const char *p2)
{
int c1, c2;
-@@ -1178,7 +1176,6 @@ static INLINE int stricmp(const char *p1, const char *p2)
+@@ -1178,7 +1176,6 @@ static INLINE int stricmp(const char *p1
return *p1 - *p2;
}
static void ptm_setup(struct net_device *dev, int ndev)
{
+ u8 addr[ETH_ALEN];
+
#if defined(CONFIG_IFXMIPS_DSL_CPE_MEI) || defined(CONFIG_IFXMIPS_DSL_CPE_MEI_MODULE)
netif_carrier_off(dev);
#endif
dev->netdev_ops = &g_ptm_netdev_ops;
/* Allow up to 1508 bytes, for RFC4638 */
dev->max_mtu = ETH_DATA_LEN + 8;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0))
netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25);
+#else
+ netif_napi_add_weight(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 25);
+#endif
dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT;
- dev->dev_addr[0] = 0x00;
- dev->dev_addr[1] = 0x20;
- dev->dev_addr[2] = 0xda;
- dev->dev_addr[3] = 0x86;
- dev->dev_addr[4] = 0x23;
- dev->dev_addr[5] = 0x75 + ndev;
+ addr[0] = 0x00;
+ addr[1] = 0x20;
+ addr[2] = 0xda;
+ addr[3] = 0x86;
+ addr[4] = 0x23;
+ addr[5] = 0x75 + ndev;
+ eth_hw_addr_set(dev, addr);
}
static struct net_device_stats *ptm_get_stats(struct net_device *dev)
dev->netdev_ops = &g_ptm_netdev_ops;
/* Allow up to 1508 bytes, for RFC4638 */
dev->max_mtu = ETH_DATA_LEN + 8;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0))
netif_napi_add(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16);
+#else
+ netif_napi_add_weight(dev, &g_ptm_priv_data.itf[ndev].napi, ptm_napi_poll, 16);
+#endif
dev->watchdog_timeo = ETH_WATCHDOG_TIMEOUT;
addr[0] = 0x00;
#endif
/* add MEI CPE debug/printout part */
-@@ -1718,8 +1718,8 @@ static void MEI_MeminfoProcPerDevGet(struct seq_file *s)
+@@ -1718,8 +1718,8 @@ static void MEI_MeminfoProcPerDevGet(str
", CRC = 0x%08X"
#endif
MEI_DRV_CRLF,
#if (MEI_SUPPORT_OPTIMIZED_FW_DL == 1)
--- a/src/drv_mei_cpe_download_vrx.c
+++ b/src/drv_mei_cpe_download_vrx.c
-@@ -3139,9 +3139,9 @@ IFX_int32_t MEI_DEV_IoctlFirmwareDownload(
+@@ -3139,9 +3139,9 @@ IFX_int32_t MEI_DEV_IoctlFirmwareDownloa
{
IFX_int32_t ret = 0;
MEI_DEV_T *pMeiDev = pMeiDynCntrl->pMeiDev;
--- /dev/null
+--- a/src/drv_mei_cpe_linux.c
++++ b/src/drv_mei_cpe_linux.c
+@@ -1873,7 +1873,11 @@ static int mei_seq_single_show(struct se
+
+ static int mei_proc_single_open(struct inode *inode, struct file *file)
+ {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
+ return single_open(file, mei_seq_single_show, PDE_DATA(inode));
++#else
++ return single_open(file, mei_seq_single_show, pde_data(inode));
++#endif
+ }
+
+ static void mei_proc_entry_create(struct proc_dir_entry *parent_node,
+--- a/src/drv_mei_cpe_linux_proc_config.c
++++ b/src/drv_mei_cpe_linux_proc_config.c
+@@ -1036,7 +1036,11 @@ static int mei_seq_single_show(struct se
+
+ static int mei_proc_single_open(struct inode *inode, struct file *file)
+ {
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0))
+ return single_open(file, mei_seq_single_show, PDE_DATA(inode));
++#else
++ return single_open(file, mei_seq_single_show, pde_data(inode));
++#endif
+ }
+
+ #if (LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0))
--- /dev/null
+--- a/src/drv_vmmc_api.h
++++ b/src/drv_vmmc_api.h
+@@ -149,17 +149,6 @@ DECLARE_TRACE_GROUP(VMMC);
+ return code; \
+ }while(0)
+
+-/*******************************************************************************
+-Description:
+- always returns the absolute value of argument given
+-Arguments:
+- x - argument
+-Return:
+- absolute value of x
+-*******************************************************************************/
+-/* define ABS */
+-#define ABS(x) (((x) < 0) ? -(x) : (x))
+-
+ /* regular format macros */
+ /*******************************************************************************
+ Description:
--- /dev/null
+--- a/src/drv_vmmc_init.c
++++ b/src/drv_vmmc_init.c
+@@ -202,11 +202,20 @@ IFX_int32_t VMMC_GetDevice (IFX_uint16_t
+ /**
+ Wrapper for the voice buffer get function that sets the FW as owner.
+ */
+-static IFX_void_t* vmmc_WrapperVoiceBufferGet (IFX_void_t)
++static IFX_void_t* vmmc_WrapperVoiceBufferGet (IFX_size_t size,
++ IFX_int32_t priority)
+ {
+ return IFX_TAPI_VoiceBufferGetWithOwnerId (IFX_TAPI_BUFFER_OWNER_FW);
+ }
+
++/**
++ Wrapper for the voice buffer get function that sets the FW as owner.
++*/
++static IFX_void_t vmmc_WrapperVoiceBufferPut (const IFX_void_t *ptr)
++{
++ IFX_TAPI_VoiceBufferPut ((IFX_void_t *)ptr);
++}
++
+
+ /**
+ Wrapper for the voice buffer free all function freeing all buffers that
+@@ -263,10 +272,8 @@ IFX_int32_t VMMC_ChipAccessInit(VMMC_DEV
+
+ /* Register the buffer handler. */
+ #ifdef USE_BUFFERPOOL
+- ifx_mps_bufman_register((IFX_void_t* (*)(IFX_size_t, IFX_int32_t))
+- vmmc_WrapperVoiceBufferGet,
+- (IFX_void_t (*)(const IFX_void_t*))
+- IFX_TAPI_VoiceBufferPut,
++ ifx_mps_bufman_register(vmmc_WrapperVoiceBufferGet,
++ vmmc_WrapperVoiceBufferPut,
+ sizeof(PACKET), POBX_BUFFER_THRESHOLD);
+ ifx_mps_register_bufman_freeall_callback (vmmc_WrapperVoiceBufferFreeAll);
+ #else