diff options
Diffstat (limited to 'net/bluetooth/l2cap.c')
-rw-r--r-- | net/bluetooth/l2cap.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index 31514d8faa66..cfb18cd97564 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -1636,16 +1636,15 @@ static inline int l2cap_sar_segment_sdu(struct sock *sk, struct msghdr *msg, siz | |||
1636 | __skb_queue_tail(&sar_queue, skb); | 1636 | __skb_queue_tail(&sar_queue, skb); |
1637 | len -= pi->remote_mps; | 1637 | len -= pi->remote_mps; |
1638 | size += pi->remote_mps; | 1638 | size += pi->remote_mps; |
1639 | control = 0; | ||
1640 | 1639 | ||
1641 | while (len > 0) { | 1640 | while (len > 0) { |
1642 | size_t buflen; | 1641 | size_t buflen; |
1643 | 1642 | ||
1644 | if (len > pi->remote_mps) { | 1643 | if (len > pi->remote_mps) { |
1645 | control |= L2CAP_SDU_CONTINUE; | 1644 | control = L2CAP_SDU_CONTINUE; |
1646 | buflen = pi->remote_mps; | 1645 | buflen = pi->remote_mps; |
1647 | } else { | 1646 | } else { |
1648 | control |= L2CAP_SDU_END; | 1647 | control = L2CAP_SDU_END; |
1649 | buflen = len; | 1648 | buflen = len; |
1650 | } | 1649 | } |
1651 | 1650 | ||
@@ -1658,7 +1657,6 @@ static inline int l2cap_sar_segment_sdu(struct sock *sk, struct msghdr *msg, siz | |||
1658 | __skb_queue_tail(&sar_queue, skb); | 1657 | __skb_queue_tail(&sar_queue, skb); |
1659 | len -= buflen; | 1658 | len -= buflen; |
1660 | size += buflen; | 1659 | size += buflen; |
1661 | control = 0; | ||
1662 | } | 1660 | } |
1663 | skb_queue_splice_tail(&sar_queue, TX_QUEUE(sk)); | 1661 | skb_queue_splice_tail(&sar_queue, TX_QUEUE(sk)); |
1664 | if (sk->sk_send_head == NULL) | 1662 | if (sk->sk_send_head == NULL) |