aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_sock.c
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-05-16 15:11:44 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2012-05-16 15:11:44 -0400
commit08e6d907fe606b751adddce54ad8f51e0950bc3f (patch)
tree1a987f519b1ea706a61cd23d7eeea038dfe81b7a /net/bluetooth/l2cap_sock.c
parentd34c34fb2592bd5231a153ad1676c3ded175410a (diff)
parent671267bf3aac3dae0555730b07ef29c042e325b2 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth
Diffstat (limited to 'net/bluetooth/l2cap_sock.c')
-rw-r--r--net/bluetooth/l2cap_sock.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/bluetooth/l2cap_sock.c b/net/bluetooth/l2cap_sock.c
index 6bf8ff75d95f..b7bc7b981ee2 100644
--- a/net/bluetooth/l2cap_sock.c
+++ b/net/bluetooth/l2cap_sock.c
@@ -596,10 +596,14 @@ static int l2cap_sock_setsockopt(struct socket *sock, int level, int optname, ch
596 sk->sk_state = BT_CONFIG; 596 sk->sk_state = BT_CONFIG;
597 chan->state = BT_CONFIG; 597 chan->state = BT_CONFIG;
598 598
599 /* or for ACL link, under defer_setup time */ 599 /* or for ACL link */
600 } else if (sk->sk_state == BT_CONNECT2 && 600 } else if ((sk->sk_state == BT_CONNECT2 &&
601 bt_sk(sk)->defer_setup) { 601 bt_sk(sk)->defer_setup) ||
602 err = l2cap_chan_check_security(chan); 602 sk->sk_state == BT_CONNECTED) {
603 if (!l2cap_chan_check_security(chan))
604 bt_sk(sk)->suspended = true;
605 else
606 sk->sk_state_change(sk);
603 } else { 607 } else {
604 err = -EINVAL; 608 err = -EINVAL;
605 } 609 }