Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314400
b: refs/heads/master
c: 6383872
h: refs/heads/master
v: v3
  • Loading branch information
Mat Martineau authored and Johan Hedberg committed Jun 5, 2012
1 parent 45dffa2 commit 84d0ffa
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 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: bed68bde7ebdb591cc67921261307626c8f37936
refs/heads/master: 63838725c6478102894cfb88feb2a9b1c331855d
32 changes: 30 additions & 2 deletions trunk/net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4504,8 +4504,36 @@ void l2cap_chan_busy(struct l2cap_chan *chan, int busy)

static int l2cap_rx_queued_iframes(struct l2cap_chan *chan)
{
/* Placeholder */
return 0;
int err = 0;
/* Pass sequential frames to l2cap_reassemble_sdu()
* until a gap is encountered.
*/

BT_DBG("chan %p", chan);

while (!test_bit(CONN_LOCAL_BUSY, &chan->conn_state)) {
struct sk_buff *skb;
BT_DBG("Searching for skb with txseq %d (queue len %d)",
chan->buffer_seq, skb_queue_len(&chan->srej_q));

skb = l2cap_ertm_seq_in_queue(&chan->srej_q, chan->buffer_seq);

if (!skb)
break;

skb_unlink(skb, &chan->srej_q);
chan->buffer_seq = __next_seq(chan, chan->buffer_seq);
err = l2cap_reassemble_sdu(chan, skb, &bt_cb(skb)->control);
if (err)
break;
}

if (skb_queue_empty(&chan->srej_q)) {
chan->rx_state = L2CAP_RX_STATE_RECV;
l2cap_send_ack(chan);
}

return err;
}

static void l2cap_handle_srej(struct l2cap_chan *chan,
Expand Down

0 comments on commit 84d0ffa

Please sign in to comment.