Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306881
b: refs/heads/master
c: 088ce08
h: refs/heads/master
i:
  306879: 0116536
v: v3
  • Loading branch information
Mikel Astiz authored and Gustavo Padovan committed May 9, 2012
1 parent 068bae4 commit 7e3e415
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: abc5de8f4e68ea785e32b91e456f467d2a2fb7db
refs/heads/master: 088ce088ec115ee4bc89549b07b182e65dce9235
10 changes: 4 additions & 6 deletions trunk/net/bluetooth/sco.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,28 +233,26 @@ static inline int sco_send_frame(struct sock *sk, struct msghdr *msg, int len)
{
struct sco_conn *conn = sco_pi(sk)->conn;
struct sk_buff *skb;
int err, count;
int err;

/* Check outgoing MTU */
if (len > conn->mtu)
return -EINVAL;

BT_DBG("sk %p len %d", sk, len);

count = min_t(unsigned int, conn->mtu, len);
skb = bt_skb_send_alloc(sk, count,
msg->msg_flags & MSG_DONTWAIT, &err);
skb = bt_skb_send_alloc(sk, len, msg->msg_flags & MSG_DONTWAIT, &err);
if (!skb)
return err;

if (memcpy_fromiovec(skb_put(skb, count), msg->msg_iov, count)) {
if (memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len)) {
kfree_skb(skb);
return -EFAULT;
}

hci_send_sco(conn->hcon, skb);

return count;
return len;
}

static inline void sco_recv_frame(struct sco_conn *conn, struct sk_buff *skb)
Expand Down

0 comments on commit 7e3e415

Please sign in to comment.