diff options
author | Amit Pundir <amit.pundir@linaro.org> | 2015-10-15 00:49:50 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2015-12-08 12:38:59 +0530 |
commit | 5ded6d4746d34daa12f9bae6a91a58e518672597 (patch) | |
tree | 9381547f05b23f55e5bfa0fdf7b4099f9ee0d155 | |
parent | 0f0069ef1f58a2867005fe6328bd120938c30ea1 (diff) |
HACK: net: PPPoPNS and PPPoLAC build fixes for 4.1
Fix couple of sendmsg() calls to align with mainline
commit 1b784140474e: "net: Remove iocb argument from
sendmsg and recvmsg".
Another mainline commit c0371da6047a "put iov_iter into msghdr",
added iov_iter and removed direct access to scatter/gather
array elements in msghdr. It broke PPPoLAC and PPPoPNS.
Lets restore the direct access to scatter/gather array in
msghdr for the time being.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
-rw-r--r-- | drivers/net/ppp/pppolac.c | 2 | ||||
-rw-r--r-- | drivers/net/ppp/pppopns.c | 2 | ||||
-rw-r--r-- | include/linux/socket.h | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/ppp/pppolac.c b/drivers/net/ppp/pppolac.c index a5d3d634fd9a..a178c863f7cf 100644 --- a/drivers/net/ppp/pppolac.c +++ b/drivers/net/ppp/pppolac.c @@ -211,7 +211,7 @@ static void pppolac_xmit_core(struct work_struct *delivery_work) .msg_iovlen = 1, .msg_flags = MSG_NOSIGNAL | MSG_DONTWAIT, }; - sk_udp->sk_prot->sendmsg(NULL, sk_udp, &msg, skb->len); + sk_udp->sk_prot->sendmsg(sk_udp, &msg, skb->len); kfree_skb(skb); } set_fs(old_fs); diff --git a/drivers/net/ppp/pppopns.c b/drivers/net/ppp/pppopns.c index dc15f978c922..55f485a39b88 100644 --- a/drivers/net/ppp/pppopns.c +++ b/drivers/net/ppp/pppopns.c @@ -194,7 +194,7 @@ static void pppopns_xmit_core(struct work_struct *delivery_work) .msg_iovlen = 1, .msg_flags = MSG_NOSIGNAL | MSG_DONTWAIT, }; - sk_raw->sk_prot->sendmsg(NULL, sk_raw, &msg, skb->len); + sk_raw->sk_prot->sendmsg(sk_raw, &msg, skb->len); kfree_skb(skb); } set_fs(old_fs); diff --git a/include/linux/socket.h b/include/linux/socket.h index 5bf59c8493b7..18a8337c8959 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -47,6 +47,10 @@ struct linger { struct msghdr { void *msg_name; /* ptr to socket address structure */ int msg_namelen; /* size of socket address structure */ +#if defined(CONFIG_PPPOLAC) || defined(CONFIG_PPPOPNS) + struct iovec *msg_iov; /* scatter/gather array */ + __kernel_size_t msg_iovlen; /* # elements in msg_iov */ +#endif struct iov_iter msg_iter; /* data */ void *msg_control; /* ancillary data */ __kernel_size_t msg_controllen; /* ancillary data buffer length */ |