summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorMartin Schiller <ms@dev.tdt.de>2024-05-15 10:48:08 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2024-06-08 23:25:35 +0200
commitabf1c4e67dae8d7f73fd3a964192d7ede87fa4f8 (patch)
tree99f792e83d7cf1e4b3f407b9546a0b1a1c302248 /package
parent45eeedbbfc805a26df2c0a0b9c6edca51a4a0895 (diff)
downloadopenwrt-abf1c4e67dae8d7f73fd3a964192d7ede87fa4f8.tar.gz
openwrt-abf1c4e67dae8d7f73fd3a964192d7ede87fa4f8.tar.bz2
openwrt-abf1c4e67dae8d7f73fd3a964192d7ede87fa4f8.zip
kernel: ltq-vdsl-vr9: fix compilation with linux 6.6
This adds some compile fixes for linux 6.6 compatibility. class_create now require only the name instead of the module ownership reference. Also the kernel enabled checks for enum. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Diffstat (limited to 'package')
-rw-r--r--package/kernel/lantiq/ltq-vdsl-vr9/patches/302-kernel-6.6-fixes.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-vdsl-vr9/patches/302-kernel-6.6-fixes.patch b/package/kernel/lantiq/ltq-vdsl-vr9/patches/302-kernel-6.6-fixes.patch
new file mode 100644
index 0000000000..3bf9cefc53
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl-vr9/patches/302-kernel-6.6-fixes.patch
@@ -0,0 +1,54 @@
+--- a/src/common/drv_dsl_cpe_api.c
++++ b/src/common/drv_dsl_cpe_api.c
+@@ -2879,7 +2879,7 @@ DSL_Error_t DSL_DRV_RetxStatisticsGet(
+
+ DSL_CHECK_POINTER(pContext, pData);
+ DSL_CHECK_ERR_CODE();
+- DSL_CHECK_DIRECTION(pData->nDirection);
++ DSL_CHECK_ATU_DIRECTION(pData->nDirection);
+ DSL_CHECK_ERR_CODE();
+
+ DSL_DEBUG(DSL_DBG_MSG,
+--- a/src/common/drv_dsl_cpe_os_linux.c
++++ b/src/common/drv_dsl_cpe_os_linux.c
+@@ -1251,7 +1251,11 @@ int __init DSL_ModuleInit(void)
+
+ DSL_DRV_DevNodeInit();
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+ dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME);
++#else
++ dsl_class = class_create(DRV_DSL_CPE_API_DEV_NAME);
++#endif
+ dsl_devt = MKDEV(DRV_DSL_CPE_API_DEV_MAJOR, 0);
+ device_create(dsl_class, NULL, dsl_devt, NULL, "dsl_cpe_api/0");
+
+--- a/src/device/drv_dsl_cpe_device_vrx.c
++++ b/src/device/drv_dsl_cpe_device_vrx.c
+@@ -2628,7 +2628,7 @@ static DSL_Error_t DSL_DRV_VRX_ChannelSt
+ DSL_CHECK_CHANNEL_RANGE(nChannel);
+ DSL_CHECK_ERR_CODE();
+
+- DSL_CHECK_ATU_DIRECTION(nDirection);
++ DSL_CHECK_DIRECTION(nDirection);
+ DSL_CHECK_ERR_CODE();
+
+ DSL_DEBUG(DSL_DBG_MSG,
+@@ -4644,7 +4644,7 @@ DSL_Error_t DSL_DRV_DEV_FwDownload(
+
+ /* Set VRX device FW mode*/
+ fwModeSelect.firmwareFeatures.nPlatformId = nFwFeatures.nPlatformId;
+- fwModeSelect.firmwareFeatures.eFirmwareXdslModes = nFwFeatures.nFirmwareXdslModes;
++ fwModeSelect.firmwareFeatures.eFirmwareXdslModes = (IOCTL_MEI_firmwareXdslMode_t)nFwFeatures.nFirmwareXdslModes;
+
+ if( DSL_DRV_VRX_InternalFwModeCtrlSet((MEI_DYN_CNTRL_T*)dev, &fwModeSelect) != 0 )
+ {
+@@ -6891,7 +6891,7 @@ DSL_Error_t DSL_DRV_VRX_ChannelStatusGet
+ {
+ DSL_Error_t nErrCode = DSL_SUCCESS;
+
+- DSL_CHECK_ATU_DIRECTION(nDirection);
++ DSL_CHECK_DIRECTION(nDirection);
+ DSL_CHECK_ERR_CODE();
+
+ DSL_CTX_READ_SCALAR(pContext, nErrCode,