From: Gustavo F. Padovan Date: Tue, 21 Jun 2011 17:52:56 +0000 (-0300) Subject: Merge master.kernel.org:/pub/scm/linux/kernel/git/padovan/bluetooth-2.6 X-Git-Tag: MMI-PSA29.97-13-9~18350^2~12^2~42^2~389^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0555891184a5c18df0e2349872e7ecf9701fc5b5;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Merge /linux/kernel/git/padovan/bluetooth-2.6 Conflicts: net/bluetooth/l2cap_core.c --- 0555891184a5c18df0e2349872e7ecf9701fc5b5 diff --cc net/bluetooth/l2cap_core.c index 700d01e3d5ba,56fdd9162da9..ba0b2f47bab8 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@@ -4207,20 -3997,29 +4207,29 @@@ static int l2cap_security_cfm(struct hc l2cap_send_cmd(conn, chan->ident, L2CAP_CONN_REQ, sizeof(req), &req); } else { - l2cap_sock_clear_timer(sk); - l2cap_sock_set_timer(sk, HZ / 10); + __clear_chan_timer(chan); + __set_chan_timer(chan, HZ / 10); } - } else if (sk->sk_state == BT_CONNECT2) { + } else if (chan->state == BT_CONNECT2) { struct l2cap_conn_rsp rsp; - __u16 result; + __u16 res, stat; if (!status) { - l2cap_state_change(chan, BT_CONFIG); - result = L2CAP_CR_SUCCESS; + if (bt_sk(sk)->defer_setup) { + struct sock *parent = bt_sk(sk)->parent; + res = L2CAP_CR_PEND; + stat = L2CAP_CS_AUTHOR_PEND; + parent->sk_data_ready(parent, 0); + } else { - sk->sk_state = BT_CONFIG; ++ l2cap_state_change(chan, BT_CONFIG); + res = L2CAP_CR_SUCCESS; + stat = L2CAP_CS_NO_INFO; + } } else { - sk->sk_state = BT_DISCONN; - l2cap_sock_set_timer(sk, HZ / 10); + l2cap_state_change(chan, BT_DISCONN); + __set_chan_timer(chan, HZ / 10); - result = L2CAP_CR_SEC_BLOCK; + res = L2CAP_CR_SEC_BLOCK; + stat = L2CAP_CS_NO_INFO; } rsp.scid = cpu_to_le16(chan->dcid); @@@ -4362,10 -4161,10 +4371,10 @@@ static int l2cap_debugfs_show(struct se seq_printf(f, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d %d %d\n", batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst), - sk->sk_state, __le16_to_cpu(c->psm), + c->state, __le16_to_cpu(c->psm), c->scid, c->dcid, c->imtu, c->omtu, c->sec_level, c->mode); -- } ++} read_unlock_bh(&chan_list_lock);