diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2012-02-06 08:03:59 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-13 10:01:35 -0500 |
commit | cf4cd00915c659dc7b496c454bee36bb6b833fd1 (patch) | |
tree | 71dab8e537f308fa63451304422912c7cd7032f5 | |
parent | 343fb14549a736b348b08e702057487a7ec44d5d (diff) |
Bluetooth: Change chan_ready param from sk to chan
Change is needed to remove dependency on sk when possible
before introducing l2cap channel lock.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r-- | net/bluetooth/l2cap_core.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index 09cd8601ea81..80fbfcf0674d 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c | |||
@@ -907,9 +907,9 @@ clean: | |||
907 | release_sock(parent); | 907 | release_sock(parent); |
908 | } | 908 | } |
909 | 909 | ||
910 | static void l2cap_chan_ready(struct sock *sk) | 910 | static void l2cap_chan_ready(struct l2cap_chan *chan) |
911 | { | 911 | { |
912 | struct l2cap_chan *chan = l2cap_pi(sk)->chan; | 912 | struct sock *sk = chan->sk; |
913 | struct sock *parent = bt_sk(sk)->parent; | 913 | struct sock *parent = bt_sk(sk)->parent; |
914 | 914 | ||
915 | BT_DBG("sk %p, parent %p", sk, parent); | 915 | BT_DBG("sk %p, parent %p", sk, parent); |
@@ -945,7 +945,7 @@ static void l2cap_conn_ready(struct l2cap_conn *conn) | |||
945 | 945 | ||
946 | if (conn->hcon->type == LE_LINK) { | 946 | if (conn->hcon->type == LE_LINK) { |
947 | if (smp_conn_security(conn, chan->sec_level)) | 947 | if (smp_conn_security(conn, chan->sec_level)) |
948 | l2cap_chan_ready(sk); | 948 | l2cap_chan_ready(chan); |
949 | 949 | ||
950 | } else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { | 950 | } else if (chan->chan_type != L2CAP_CHAN_CONN_ORIENTED) { |
951 | __clear_chan_timer(chan); | 951 | __clear_chan_timer(chan); |
@@ -2874,7 +2874,7 @@ static inline int l2cap_config_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr | |||
2874 | if (chan->mode == L2CAP_MODE_ERTM) | 2874 | if (chan->mode == L2CAP_MODE_ERTM) |
2875 | l2cap_ertm_init(chan); | 2875 | l2cap_ertm_init(chan); |
2876 | 2876 | ||
2877 | l2cap_chan_ready(sk); | 2877 | l2cap_chan_ready(chan); |
2878 | goto unlock; | 2878 | goto unlock; |
2879 | } | 2879 | } |
2880 | 2880 | ||
@@ -3005,7 +3005,7 @@ static inline int l2cap_config_rsp(struct l2cap_conn *conn, struct l2cap_cmd_hdr | |||
3005 | if (chan->mode == L2CAP_MODE_ERTM) | 3005 | if (chan->mode == L2CAP_MODE_ERTM) |
3006 | l2cap_ertm_init(chan); | 3006 | l2cap_ertm_init(chan); |
3007 | 3007 | ||
3008 | l2cap_chan_ready(sk); | 3008 | l2cap_chan_ready(chan); |
3009 | } | 3009 | } |
3010 | 3010 | ||
3011 | done: | 3011 | done: |
@@ -4524,7 +4524,7 @@ int l2cap_security_cfm(struct hci_conn *hcon, u8 status, u8 encrypt) | |||
4524 | if (chan->scid == L2CAP_CID_LE_DATA) { | 4524 | if (chan->scid == L2CAP_CID_LE_DATA) { |
4525 | if (!status && encrypt) { | 4525 | if (!status && encrypt) { |
4526 | chan->sec_level = hcon->sec_level; | 4526 | chan->sec_level = hcon->sec_level; |
4527 | l2cap_chan_ready(sk); | 4527 | l2cap_chan_ready(chan); |
4528 | } | 4528 | } |
4529 | 4529 | ||
4530 | bh_unlock_sock(sk); | 4530 | bh_unlock_sock(sk); |