Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314395
b: refs/heads/master
c: 61aa4f5
h: refs/heads/master
i:
  314393: 3522ee1
  314391: 86ba0c6
v: v3
  • Loading branch information
Mat Martineau authored and Johan Hedberg committed Jun 5, 2012
1 parent d0f562d commit 3e020ce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 40 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: 0a0aba42b8daba55e4d2bdfc3c8ca7d7d827b723
refs/heads/master: 61aa4f5b9f43b21668aec51da2df3e9ed5f4226d
45 changes: 6 additions & 39 deletions trunk/net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -4318,48 +4318,15 @@ static int l2cap_reassemble_sdu(struct l2cap_chan *chan, struct sk_buff *skb,
return err;
}

static void l2cap_ertm_enter_local_busy(struct l2cap_chan *chan)
{
BT_DBG("chan %p, Enter local busy", chan);

set_bit(CONN_LOCAL_BUSY, &chan->conn_state);
l2cap_seq_list_clear(&chan->srej_list);

__set_ack_timer(chan);
}

static void l2cap_ertm_exit_local_busy(struct l2cap_chan *chan)
void l2cap_chan_busy(struct l2cap_chan *chan, int busy)
{
u32 control;

if (!test_bit(CONN_RNR_SENT, &chan->conn_state))
goto done;

control = __set_reqseq(chan, chan->buffer_seq);
control |= __set_ctrl_poll(chan);
control |= __set_ctrl_super(chan, L2CAP_SUPER_RR);
chan->retry_count = 1;

__clear_retrans_timer(chan);
__set_monitor_timer(chan);

set_bit(CONN_WAIT_F, &chan->conn_state);

done:
clear_bit(CONN_LOCAL_BUSY, &chan->conn_state);
clear_bit(CONN_RNR_SENT, &chan->conn_state);
u8 event;

BT_DBG("chan %p, Exit local busy", chan);
}
if (chan->mode != L2CAP_MODE_ERTM)
return;

void l2cap_chan_busy(struct l2cap_chan *chan, int busy)
{
if (chan->mode == L2CAP_MODE_ERTM) {
if (busy)
l2cap_ertm_enter_local_busy(chan);
else
l2cap_ertm_exit_local_busy(chan);
}
event = busy ? L2CAP_EV_LOCAL_BUSY_DETECTED : L2CAP_EV_LOCAL_BUSY_CLEAR;
l2cap_tx(chan, 0, 0, event);
}

static u8 l2cap_classify_txseq(struct l2cap_chan *chan, u16 txseq)
Expand Down

0 comments on commit 3e020ce

Please sign in to comment.