Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203847
b: refs/heads/master
c: 0e98958
h: refs/heads/master
i:
  203845: 60c40fc
  203843: d5fb0c6
  203839: 43b93b5
v: v3
  • Loading branch information
Gustavo F. Padovan authored and Marcel Holtmann committed Jul 21, 2010
1 parent b4cb0e3 commit 7aef3d4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 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: 9b108fc0cf4e79c34a7d5626f5c2c4c529ef6d3f
refs/heads/master: 0e98958d4f827f814444757e0376546b462dfe6f
23 changes: 22 additions & 1 deletion trunk/net/bluetooth/l2cap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1314,6 +1314,8 @@ static void l2cap_monitor_timeout(unsigned long arg)
{
struct sock *sk = (void *) arg;

BT_DBG("sk %p", sk);

bh_lock_sock(sk);
if (l2cap_pi(sk)->retry_count >= l2cap_pi(sk)->remote_max_tx) {
l2cap_send_disconn_req(l2cap_pi(sk)->conn, sk, ECONNABORTED);
Expand All @@ -1332,6 +1334,8 @@ static void l2cap_retrans_timeout(unsigned long arg)
{
struct sock *sk = (void *) arg;

BT_DBG("sk %p", sk);

bh_lock_sock(sk);
l2cap_pi(sk)->retry_count = 1;
__mod_monitor_timer();
Expand Down Expand Up @@ -3645,6 +3649,8 @@ static void l2cap_busy_work(struct work_struct *work)
pi->conn_state &= ~L2CAP_CONN_LOCAL_BUSY;
pi->conn_state &= ~L2CAP_CONN_RNR_SENT;

BT_DBG("sk %p, Exit local busy", sk);

set_current_state(TASK_RUNNING);
remove_wait_queue(sk_sleep(sk), &wait);

Expand All @@ -3669,6 +3675,8 @@ static int l2cap_push_rx_skb(struct sock *sk, struct sk_buff *skb, u16 control)
}

/* Busy Condition */
BT_DBG("sk %p, Enter local busy", sk);

pi->conn_state |= L2CAP_CONN_LOCAL_BUSY;
bt_cb(skb)->sar = control >> L2CAP_CTRL_SAR_SHIFT;
__skb_queue_tail(BUSY_QUEUE(sk), skb);
Expand Down Expand Up @@ -3847,7 +3855,8 @@ static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, str
int num_to_ack = (pi->tx_win/6) + 1;
int err = 0;

BT_DBG("sk %p rx_control 0x%4.4x len %d", sk, rx_control, skb->len);
BT_DBG("sk %p len %d tx_seq %d rx_control 0x%4.4x", sk, skb->len, tx_seq,
rx_control);

if (L2CAP_CTRL_FINAL & rx_control &&
l2cap_pi(sk)->conn_state & L2CAP_CONN_WAIT_F) {
Expand Down Expand Up @@ -3892,6 +3901,7 @@ static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, str
pi->buffer_seq = pi->buffer_seq_srej;
pi->conn_state &= ~L2CAP_CONN_SREJ_SENT;
l2cap_send_ack(pi);
BT_DBG("sk %p, Exit SREJ_SENT", sk);
}
} else {
struct srej_list *l;
Expand Down Expand Up @@ -3920,6 +3930,8 @@ static inline int l2cap_data_channel_iframe(struct sock *sk, u16 rx_control, str

pi->conn_state |= L2CAP_CONN_SREJ_SENT;

BT_DBG("sk %p, Enter SREJ", sk);

INIT_LIST_HEAD(SREJ_LIST(sk));
pi->buffer_seq_srej = pi->buffer_seq;

Expand Down Expand Up @@ -3973,6 +3985,9 @@ static inline void l2cap_data_channel_rrframe(struct sock *sk, u16 rx_control)
{
struct l2cap_pinfo *pi = l2cap_pi(sk);

BT_DBG("sk %p, req_seq %d ctrl 0x%4.4x", sk, __get_reqseq(rx_control),
rx_control);

pi->expected_ack_seq = __get_reqseq(rx_control);
l2cap_drop_acked_frames(sk);

Expand Down Expand Up @@ -4018,6 +4033,8 @@ static inline void l2cap_data_channel_rejframe(struct sock *sk, u16 rx_control)
struct l2cap_pinfo *pi = l2cap_pi(sk);
u8 tx_seq = __get_reqseq(rx_control);

BT_DBG("sk %p, req_seq %d ctrl 0x%4.4x", sk, tx_seq, rx_control);

pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY;

pi->expected_ack_seq = tx_seq;
Expand All @@ -4040,6 +4057,8 @@ static inline void l2cap_data_channel_srejframe(struct sock *sk, u16 rx_control)
struct l2cap_pinfo *pi = l2cap_pi(sk);
u8 tx_seq = __get_reqseq(rx_control);

BT_DBG("sk %p, req_seq %d ctrl 0x%4.4x", sk, tx_seq, rx_control);

pi->conn_state &= ~L2CAP_CONN_REMOTE_BUSY;

if (rx_control & L2CAP_CTRL_POLL) {
Expand Down Expand Up @@ -4077,6 +4096,8 @@ static inline void l2cap_data_channel_rnrframe(struct sock *sk, u16 rx_control)
struct l2cap_pinfo *pi = l2cap_pi(sk);
u8 tx_seq = __get_reqseq(rx_control);

BT_DBG("sk %p, req_seq %d ctrl 0x%4.4x", sk, tx_seq, rx_control);

pi->conn_state |= L2CAP_CONN_REMOTE_BUSY;
pi->expected_ack_seq = tx_seq;
l2cap_drop_acked_frames(sk);
Expand Down

0 comments on commit 7aef3d4

Please sign in to comment.