Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314403
b: refs/heads/master
c: c9e3d5e
h: refs/heads/master
i:
  314401: 88a81a4
  314399: 45dffa2
v: v3
  • Loading branch information
Mat Martineau authored and Johan Hedberg committed Jun 5, 2012
1 parent 07a89f1 commit bce0b7e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 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: fcd289df8892268ec0783588e0d7e0346fd6a1cd
refs/heads/master: c9e3d5e00408c96f82b88a8de5d54f7a1343b110
22 changes: 15 additions & 7 deletions trunk/net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,15 +920,23 @@ static void l2cap_send_sframe(struct l2cap_chan *chan,
l2cap_do_send(chan, skb);
}

static inline void l2cap_send_rr_or_rnr(struct l2cap_chan *chan, u32 control)
static void l2cap_send_rr_or_rnr(struct l2cap_chan *chan, bool poll)
{
if (test_bit(CONN_LOCAL_BUSY, &chan->conn_state)) {
control |= __set_ctrl_super(chan, L2CAP_SUPER_RNR);
set_bit(CONN_RNR_SENT, &chan->conn_state);
} else
control |= __set_ctrl_super(chan, L2CAP_SUPER_RR);
struct l2cap_ctrl control;

BT_DBG("chan %p, poll %d", chan, poll);

memset(&control, 0, sizeof(control));
control.sframe = 1;
control.poll = poll;

control |= __set_reqseq(chan, chan->buffer_seq);
if (test_bit(CONN_LOCAL_BUSY, &chan->conn_state))
control.super = L2CAP_SUPER_RNR;
else
control.super = L2CAP_SUPER_RR;

control.reqseq = chan->buffer_seq;
l2cap_send_sframe(chan, &control);
}

static inline int __l2cap_no_conn_pending(struct l2cap_chan *chan)
Expand Down

0 comments on commit bce0b7e

Please sign in to comment.