diff options
author | Jan Hoffmann <jan@3e8.eu> | 2022-05-03 15:26:29 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2022-10-22 19:44:45 +0200 |
commit | e4c76e6fa34b52bdbe3e7601a4ef43525fc0999b (patch) | |
tree | d0c78a53c8a17c75716e3a01b9cc2c3903d91126 /package | |
parent | d374e0346ecedf21b808c07260b31ae3a90f4653 (diff) | |
download | upstream-e4c76e6fa34b52bdbe3e7601a4ef43525fc0999b.tar.gz upstream-e4c76e6fa34b52bdbe3e7601a4ef43525fc0999b.tar.bz2 upstream-e4c76e6fa34b52bdbe3e7601a4ef43525fc0999b.zip |
ltq-ifxos: add compatibility with kernel 5.15
set_fs is no longer supported since kernel 5.13 for mips.
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Diffstat (limited to 'package')
-rw-r--r-- | package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch index 0fc2c2c5e6..45059890e1 100644 --- a/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch +++ b/package/kernel/lantiq/ltq-ifxos/patches/100-compat.patch @@ -22,3 +22,71 @@ if (pVirtAddr == IFX_NULL) { IFXOS_PRN_USR_ERR_NL( IFXOS, IFXOS_PRN_LEVEL_ERR, +--- a/src/linux/ifxos_linux_socket_drv.c ++++ b/src/linux/ifxos_linux_socket_drv.c +@@ -165,8 +165,12 @@ IFX_int_t IFXOS_SocketRecvFrom( + IFXOS_sockAddr_t *pSocAddr) + { + struct msghdr msg; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0) + struct iovec iov; + mm_segment_t old_fs; ++#else ++ struct kvec iov; ++#endif + int ret; + + IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR); +@@ -181,6 +185,8 @@ IFX_int_t IFXOS_SocketRecvFrom( + msg.msg_controllen = 0; + msg.msg_flags = 0; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0) ++ + #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)) + msg.msg_iov = &iov; + msg.msg_iovlen = 1; +@@ -200,6 +206,10 @@ IFX_int_t IFXOS_SocketRecvFrom( + #endif + set_fs(old_fs); + ++#else ++ ret = kernel_recvmsg (socFd, &msg, &iov, 1, bufSize_byte, 0); ++#endif ++ + return ret; + } + +@@ -229,8 +239,12 @@ IFX_int_t IFXOS_SocketSendTo( + IFXOS_sockAddr_t *pSocAddr) + { + struct msghdr msg; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0) + struct iovec iov; + mm_segment_t old_fs; ++#else ++ struct kvec iov; ++#endif + int ret; + + IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR); +@@ -245,6 +259,8 @@ IFX_int_t IFXOS_SocketSendTo( + msg.msg_controllen = 0; + msg.msg_flags = MSG_DONTWAIT; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5,13,0) ++ + #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)) + msg.msg_iov = &iov; + msg.msg_iovlen = 1; +@@ -264,6 +280,10 @@ IFX_int_t IFXOS_SocketSendTo( + #endif + set_fs(old_fs); + ++#else ++ ret = kernel_sendmsg(socFd, &msg, &iov, 1, bufSize_byte); ++#endif ++ + return ret; + } + |