diff options
author | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2013-10-15 19:24:48 -0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2013-10-15 16:42:44 -0700 |
commit | 5ec1bbe549d939ff1ef88e2cc22b2c3b95d76401 (patch) | |
tree | 877df523bdb1b892675bee1f5aa9bb939a811e5c /net/bluetooth/l2cap_core.c | |
parent | 8d836d71e2223b8961b21112bb4ce89ef8231682 (diff) | |
download | linux-5ec1bbe549d939ff1ef88e2cc22b2c3b95d76401.tar.bz2 |
Bluetooth: Add chan->ops->set_shutdown()
We need to remove all direct access of struct sock from L2CAP core.
This change is pretty simple and just add a new L2CAP channel callback to
do the work in the L2CAP socket side.
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 | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index c6334fc86d1d..634781a60d3f 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -4241,7 +4241,6 @@ static inline int l2cap_disconnect_req(struct l2cap_conn *conn, struct l2cap_disconn_rsp rsp; u16 dcid, scid; struct l2cap_chan *chan; - struct sock *sk; if (cmd_len != sizeof(*req)) return -EPROTO; @@ -4261,15 +4260,11 @@ static inline int l2cap_disconnect_req(struct l2cap_conn *conn, l2cap_chan_lock(chan); - sk = chan->sk; - rsp.dcid = cpu_to_le16(chan->scid); rsp.scid = cpu_to_le16(chan->dcid); l2cap_send_cmd(conn, cmd->ident, L2CAP_DISCONN_RSP, sizeof(rsp), &rsp); - lock_sock(sk); - sk->sk_shutdown = SHUTDOWN_MASK; - release_sock(sk); + chan->ops->set_shutdown(chan); l2cap_chan_hold(chan); l2cap_chan_del(chan, ECONNRESET); |