summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2011-06-17 22:46:26 -0300
committerJaikumar Ganesh <jaikumar@google.com>2011-07-11 11:59:24 -0700
commit16af3daa4a1edc1dd4ccecb47a6ea6a2b2cc26f8 (patch)
treeeac7803781708e2f0ebd755a91d27b00c636701e /net
parentb4742a13395028d0e5bae2d540c99cc2f0e6cfe1 (diff)
Bluetooth: Fix crash when setting a LE socket to ready
We should not try to do any other type of configuration for LE links when they become ready. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/l2cap_core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index 73c6576f41b..be06c269a96 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -919,11 +919,11 @@ static void l2cap_conn_ready(struct l2cap_conn *conn)
bh_lock_sock(sk);
- if (conn->hcon->type == LE_LINK)
+ if (conn->hcon->type == LE_LINK) {
if (smp_conn_security(conn, chan->sec_level))
l2cap_chan_ready(sk);
- if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
+ } else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) {
__clear_chan_timer(chan);
l2cap_state_change(chan, BT_CONNECTED);
sk->sk_state_change(sk);