diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-05-28 05:27:53 +0400 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-06-05 07:34:11 +0400 |
commit | 54a59aa2b562872781d6a8fc89f300d360941691 (patch) | |
tree | b2414b9803565ee9e252ccfefb54c98af762ab43 /net/bluetooth/l2cap_core.c | |
parent | c0df7f6e06e1aeccee39c801af7f78cadeb9f345 (diff) | |
download | linux-54a59aa2b562872781d6a8fc89f300d360941691.tar.xz |
Bluetooth: Add l2cap_chan->ops->ready()
This move socket specific code to l2cap_sock.c.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r-- | net/bluetooth/l2cap_core.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 1f4c72074154..5947eb1c1bee 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -931,26 +931,14 @@ static void l2cap_send_conn_req(struct l2cap_chan *chan) static void l2cap_chan_ready(struct l2cap_chan *chan) { - struct sock *sk = chan->sk; - struct sock *parent; - - lock_sock(sk); - - parent = bt_sk(sk)->parent; - - BT_DBG("sk %p, parent %p", sk, parent); - /* This clears all conf flags, including CONF_NOT_COMPLETE */ chan->conf_state = 0; __clear_chan_timer(chan); - __l2cap_state_change(chan, BT_CONNECTED); - sk->sk_state_change(sk); + chan->state = BT_CONNECTED; - if (parent) - parent->sk_data_ready(parent, 0); - - release_sock(sk); + if (chan->ops->ready) + chan->ops->ready(chan); } static void l2cap_do_start(struct l2cap_chan *chan) |