Bluetooth: Fix not setting the chan state
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>
Mon, 20 Jun 2011 21:53:18 +0000 (18:53 -0300)
committerGustavo F. Padovan <padovan@profusion.mobi>
Tue, 21 Jun 2011 17:55:04 +0000 (14:55 -0300)
When the connection is ready we should set the connection
to CONNECTED so userspace can use it.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/l2cap_core.c

index ba0b2f47bab84b5964a9c8b6133485e04c07462a..9ec9c8c5eb5ec637189cc2303cf332926061e85b 100644 (file)
@@ -895,7 +895,7 @@ static void l2cap_chan_ready(struct sock *sk)
        chan->conf_state = 0;
        __clear_chan_timer(chan);
 
-       sk->sk_state = BT_CONNECTED;
+       l2cap_state_change(chan, BT_CONNECTED);
        sk->sk_state_change(sk);
 
        if (parent)