Commit d09b1b68 authored by David S. Miller's avatar David S. Miller

net/bluetooth/bnep/core.c: Update for new sendmsg args.

parent 506ebdb2
...@@ -97,11 +97,26 @@ static void __bnep_unlink_session(struct bnep_session *s) ...@@ -97,11 +97,26 @@ static void __bnep_unlink_session(struct bnep_session *s)
static int bnep_send(struct bnep_session *s, void *data, size_t len) static int bnep_send(struct bnep_session *s, void *data, size_t len)
{ {
struct kiocb iocb;
struct sock_iocb *si;
struct socket *sock = s->sock; struct socket *sock = s->sock;
struct iovec iv = { data, len }; struct iovec iv = { data, len };
int err;
s->msg.msg_iov = &iv; s->msg.msg_iov = &iv;
s->msg.msg_iovlen = 1; s->msg.msg_iovlen = 1;
return sock->ops->sendmsg(sock, &s->msg, len, NULL); init_sync_kiocb(&iocb, NULL);
si = kiocb_to_siocb(&iocb);
si->scm = NULL;
si->sock = sock;
si->msg = &s->msg;
si->size = len;
err = sock->ops->sendmsg(&iocb, sock, &s->msg, len, NULL);
if (-EIOCBQUEUED == err)
err = wait_on_sync_kiocb(&iocb);
return err;
} }
static int bnep_send_rsp(struct bnep_session *s, u8 ctrl, u16 resp) static int bnep_send_rsp(struct bnep_session *s, u8 ctrl, u16 resp)
...@@ -426,10 +441,22 @@ static inline int bnep_tx_frame(struct bnep_session *s, struct sk_buff *skb) ...@@ -426,10 +441,22 @@ static inline int bnep_tx_frame(struct bnep_session *s, struct sk_buff *skb)
len += skb->len; len += skb->len;
/* FIXME: linearize skb */ /* FIXME: linearize skb */
{
struct kiocb iocb;
struct sock_iocb *si;
s->msg.msg_iov = iv; s->msg.msg_iov = iv;
s->msg.msg_iovlen = il; s->msg.msg_iovlen = il;
len = sock->ops->sendmsg(sock, &s->msg, len, NULL); init_sync_kiocb(&iocb, NULL);
si = kiocb_to_siocb(&iocb);
si->scm = NULL;
si->sock = sock;
si->msg = &s->msg;
si->size = len;
len = sock->ops->sendmsg(&iocb, sock, &s->msg, len, NULL);
if (-EIOCBQUEUED == len)
len = wait_on_sync_kiocb(&iocb);
}
kfree_skb(skb); kfree_skb(skb);
if (len > 0) { if (len > 0) {
......
Markdown is supported
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