aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-07-09 15:38:35 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:11 -0400
commit47731de789749c9ed3c54751db28fd9c9eeaf019 (patch)
treeca955b8ed9fd7f025729c2e0ac62a1f827610144 /net/bluetooth
parent89746b856c88af9e5019e84615d88e002fb54dc3 (diff)
Bluetooth: Keep code under column 80
Purely a cosmetic change, it doesn't change the code flow. Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/l2cap.c46
1 files changed, 25 insertions, 21 deletions
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c
index 419e2c3306aa..449cbdd4ddbb 100644
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -522,31 +522,35 @@ static void l2cap_conn_start(struct l2cap_conn *conn)
522 } 522 }
523 523
524 if (sk->sk_state == BT_CONNECT) { 524 if (sk->sk_state == BT_CONNECT) {
525 if (l2cap_check_security(sk) && 525 struct l2cap_conn_req req;
526 __l2cap_no_conn_pending(sk)) {
527 struct l2cap_conn_req req;
528 526
529 if (!l2cap_mode_supported(l2cap_pi(sk)->mode, 527 if (!l2cap_check_security(sk) ||
530 conn->feat_mask) 528 !__l2cap_no_conn_pending(sk)) {
531 && l2cap_pi(sk)->conf_state & 529 bh_unlock_sock(sk);
532 L2CAP_CONF_STATE2_DEVICE) { 530 continue;
533 tmp1 = kzalloc(sizeof(struct sock_del_list), 531 }
534 GFP_ATOMIC);
535 tmp1->sk = sk;
536 list_add_tail(&tmp1->list, &del.list);
537 bh_unlock_sock(sk);
538 continue;
539 }
540 532
541 req.scid = cpu_to_le16(l2cap_pi(sk)->scid); 533 if (!l2cap_mode_supported(l2cap_pi(sk)->mode,
542 req.psm = l2cap_pi(sk)->psm; 534 conn->feat_mask)
535 && l2cap_pi(sk)->conf_state &
536 L2CAP_CONF_STATE2_DEVICE) {
537 tmp1 = kzalloc(sizeof(struct sock_del_list),
538 GFP_ATOMIC);
539 tmp1->sk = sk;
540 list_add_tail(&tmp1->list, &del.list);
541 bh_unlock_sock(sk);
542 continue;
543 }
543 544
544 l2cap_pi(sk)->ident = l2cap_get_ident(conn); 545 req.scid = cpu_to_le16(l2cap_pi(sk)->scid);
545 l2cap_pi(sk)->conf_state |= L2CAP_CONF_CONNECT_PEND; 546 req.psm = l2cap_pi(sk)->psm;
547
548 l2cap_pi(sk)->ident = l2cap_get_ident(conn);
549 l2cap_pi(sk)->conf_state |= L2CAP_CONF_CONNECT_PEND;
550
551 l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
552 L2CAP_CONN_REQ, sizeof(req), &req);
546 553
547 l2cap_send_cmd(conn, l2cap_pi(sk)->ident,
548 L2CAP_CONN_REQ, sizeof(req), &req);
549 }
550 } else if (sk->sk_state == BT_CONNECT2) { 554 } else if (sk->sk_state == BT_CONNECT2) {
551 struct l2cap_conn_rsp rsp; 555 struct l2cap_conn_rsp rsp;
552 char buf[128]; 556 char buf[128];