Commit f6f97291 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

net: convert to rtdm_get_iov_flatlen()

parent 90bf4a43
......@@ -473,7 +473,7 @@ ssize_t rt_udp_recvmsg(struct rtdm_fd *fd, struct user_msghdr *u_msg, int msg_fl
__rtskb_pull(skb, sizeof(struct udphdr));
flags = msg->msg_flags & ~MSG_TRUNC;
len = rt_iovec_len(iov, msg->msg_iovlen);
len = rtdm_get_iov_flatlen(iov, msg->msg_iovlen);
/* iterate over all IP fragments */
do {
......@@ -624,7 +624,7 @@ ssize_t rt_udp_sendmsg(struct rtdm_fd *fd, const struct user_msghdr *msg, int ms
if (err)
return err;
len = rt_iovec_len(iov, msg->msg_iovlen);
len = rtdm_get_iov_flatlen(iov, msg->msg_iovlen);
if ((len < 0) || (len > 0xFFFF-sizeof(struct iphdr)-sizeof(struct udphdr))) {
err = -EMSGSIZE;
goto out;
......
......@@ -380,7 +380,7 @@ rt_packet_recvmsg(struct rtdm_fd *fd, struct user_msghdr *u_msg, int msg_flags)
/* The data must not be longer than the available buffer size */
copy_len = rtskb->len;
len = rt_iovec_len(iov, msg->msg_iovlen);
len = rtdm_get_iov_flatlen(iov, msg->msg_iovlen);
if (len < 0) {
copy_len = len;
goto out;
......@@ -483,7 +483,7 @@ rt_packet_sendmsg(struct rtdm_fd *fd, const struct user_msghdr *msg, int msg_fla
goto abort;
}
len = rt_iovec_len(iov, msg->msg_iovlen);
len = rtdm_get_iov_flatlen(iov, msg->msg_iovlen);
rtskb = alloc_rtskb(rtdev->hard_header_len + len, &sock->skb_pool);
if (rtskb == NULL) {
ret = -ENOBUFS;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment