No longer needed. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/22949 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
104 lines
3.1 KiB
Diff
104 lines
3.1 KiB
Diff
--- a/src/linux/ifxos_linux_memory_map_drv.c
|
|
+++ b/src/linux/ifxos_linux_memory_map_drv.c
|
|
@@ -97,8 +97,7 @@ IFX_int32_t IFXOS_Phy2VirtMap(
|
|
}
|
|
|
|
/* remap memory (not cache able): physical --> virtual */
|
|
- pVirtAddr = (IFX_uint8_t *)ioremap_nocache( physicalAddr,
|
|
- addrRangeSize_byte );
|
|
+ pVirtAddr = (IFX_uint8_t *)ioremap(physicalAddr, addrRangeSize_byte);
|
|
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,9 +165,7 @@ IFX_int_t IFXOS_SocketRecvFrom(
|
|
IFXOS_sockAddr_t *pSocAddr)
|
|
{
|
|
struct msghdr msg;
|
|
- struct iovec iov;
|
|
- mm_segment_t old_fs;
|
|
- int ret;
|
|
+ struct kvec iov;
|
|
|
|
IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR);
|
|
IFXOS_RETURN_IF_ARG_LE_ZERO(bufSize_byte, IFX_ERROR);
|
|
@@ -181,26 +179,7 @@ IFX_int_t IFXOS_SocketRecvFrom(
|
|
msg.msg_controllen = 0;
|
|
msg.msg_flags = 0;
|
|
|
|
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0))
|
|
- msg.msg_iov = &iov;
|
|
- msg.msg_iovlen = 1;
|
|
-#else
|
|
- iov_iter_init(&msg.msg_iter, READ, &iov, 1, bufSize_byte);
|
|
-#endif
|
|
-
|
|
- /* Modify address limitation which is used if user space is calling
|
|
- kernel space, otherwise sock_recvmsg() will fail.*/
|
|
- old_fs = get_fs();
|
|
- set_fs(KERNEL_DS);
|
|
-
|
|
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,7,0)
|
|
- ret = sock_recvmsg (socFd, &msg, bufSize_byte, 0);
|
|
-#else
|
|
- ret = sock_recvmsg (socFd, &msg, 0);
|
|
-#endif
|
|
- set_fs(old_fs);
|
|
-
|
|
- return ret;
|
|
+ return kernel_recvmsg (socFd, &msg, &iov, 1, bufSize_byte, 0);
|
|
}
|
|
|
|
/**
|
|
@@ -229,9 +208,7 @@ IFX_int_t IFXOS_SocketSendTo(
|
|
IFXOS_sockAddr_t *pSocAddr)
|
|
{
|
|
struct msghdr msg;
|
|
- struct iovec iov;
|
|
- mm_segment_t old_fs;
|
|
- int ret;
|
|
+ struct kvec iov;
|
|
|
|
IFXOS_RETURN_IF_POINTER_NULL(pBuffer, IFX_ERROR);
|
|
IFXOS_RETURN_IF_ARG_LE_ZERO(bufSize_byte, IFX_ERROR);
|
|
@@ -245,26 +222,7 @@ IFX_int_t IFXOS_SocketSendTo(
|
|
msg.msg_controllen = 0;
|
|
msg.msg_flags = MSG_DONTWAIT;
|
|
|
|
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0))
|
|
- msg.msg_iov = &iov;
|
|
- msg.msg_iovlen = 1;
|
|
-#else
|
|
- iov_iter_init(&msg.msg_iter, WRITE, &iov, 1, bufSize_byte);
|
|
-#endif
|
|
-
|
|
- /* Modify address limitation which is used if user space is calling
|
|
- kernel space, otherwise sock_sendmsg() will fail.*/
|
|
- old_fs = get_fs();
|
|
- set_fs(KERNEL_DS);
|
|
-
|
|
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
|
|
- ret = sock_sendmsg(socFd, &msg, bufSize_byte);
|
|
-#else
|
|
- ret = sock_sendmsg(socFd, &msg);
|
|
-#endif
|
|
- set_fs(old_fs);
|
|
-
|
|
- return ret;
|
|
+ return kernel_sendmsg (socFd, &msg, &iov, 1, bufSize_byte);
|
|
}
|
|
|
|
/**
|
|
--- a/src/linux/ifxos_linux_thread_drv.c
|
|
+++ b/src/linux/ifxos_linux_thread_drv.c
|
|
@@ -154,7 +154,7 @@ IFXOS_STATIC int IFXOS_KernelThreadStart
|
|
retVal = pThrCntrl->pThrFct(&pThrCntrl->thrParams);
|
|
pThrCntrl->thrParams.bRunning = IFX_FALSE;
|
|
|
|
- complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
|
+ kthread_complete_and_exit(&pThrCntrl->thrCompletion, (long)retVal);
|
|
|
|
IFXOS_PRN_USR_DBG_NL( IFXOS, IFXOS_PRN_LEVEL_NORMAL,
|
|
("EXIT - Kernel Thread Startup <%s>" IFXOS_CRLF,
|