Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth

+17 -11
+3
drivers/bluetooth/btusb.c
··· 100 100 /* Canyon CN-BTU1 with HID interfaces */ 101 101 { USB_DEVICE(0x0c10, 0x0000) }, 102 102 103 + /* Broadcom BCM20702A0 */ 104 + { USB_DEVICE(0x413c, 0x8197) }, 105 + 103 106 { } /* Terminating entry */ 104 107 }; 105 108
+5 -2
include/net/bluetooth/l2cap.h
··· 39 39 #define L2CAP_DEFAULT_ACK_TO 200 40 40 #define L2CAP_LE_DEFAULT_MTU 23 41 41 42 - #define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ 43 - #define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ 42 + #define L2CAP_DISC_TIMEOUT (100) 43 + #define L2CAP_DISC_REJ_TIMEOUT (5000) /* 5 seconds */ 44 + #define L2CAP_ENC_TIMEOUT (5000) /* 5 seconds */ 45 + #define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ 46 + #define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ 44 47 45 48 /* L2CAP socket address */ 46 49 struct sockaddr_l2 {
+1 -1
net/bluetooth/hci_conn.c
··· 673 673 goto encrypt; 674 674 675 675 auth: 676 - if (test_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) 676 + if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &conn->pend)) 677 677 return 0; 678 678 679 679 if (!hci_conn_auth(conn, sec_level, auth_type))
+8 -8
net/bluetooth/l2cap_core.c
··· 251 251 252 252 if (sock_owned_by_user(sk)) { 253 253 /* sk is owned by user. Try again later */ 254 - __set_chan_timer(chan, HZ / 5); 254 + __set_chan_timer(chan, L2CAP_DISC_TIMEOUT); 255 255 bh_unlock_sock(sk); 256 256 chan_put(chan); 257 257 return; ··· 2488 2488 if (sock_owned_by_user(sk)) { 2489 2489 l2cap_state_change(chan, BT_DISCONN); 2490 2490 __clear_chan_timer(chan); 2491 - __set_chan_timer(chan, HZ / 5); 2491 + __set_chan_timer(chan, L2CAP_DISC_TIMEOUT); 2492 2492 break; 2493 2493 } 2494 2494 ··· 2661 2661 2662 2662 default: 2663 2663 sk->sk_err = ECONNRESET; 2664 - __set_chan_timer(chan, HZ * 5); 2664 + __set_chan_timer(chan, L2CAP_DISC_REJ_TIMEOUT); 2665 2665 l2cap_send_disconn_req(conn, chan, ECONNRESET); 2666 2666 goto done; 2667 2667 } ··· 2718 2718 if (sock_owned_by_user(sk)) { 2719 2719 l2cap_state_change(chan, BT_DISCONN); 2720 2720 __clear_chan_timer(chan); 2721 - __set_chan_timer(chan, HZ / 5); 2721 + __set_chan_timer(chan, L2CAP_DISC_TIMEOUT); 2722 2722 bh_unlock_sock(sk); 2723 2723 return 0; 2724 2724 } ··· 2752 2752 if (sock_owned_by_user(sk)) { 2753 2753 l2cap_state_change(chan,BT_DISCONN); 2754 2754 __clear_chan_timer(chan); 2755 - __set_chan_timer(chan, HZ / 5); 2755 + __set_chan_timer(chan, L2CAP_DISC_TIMEOUT); 2756 2756 bh_unlock_sock(sk); 2757 2757 return 0; 2758 2758 } ··· 3998 3998 if (encrypt == 0x00) { 3999 3999 if (chan->sec_level == BT_SECURITY_MEDIUM) { 4000 4000 __clear_chan_timer(chan); 4001 - __set_chan_timer(chan, HZ * 5); 4001 + __set_chan_timer(chan, L2CAP_ENC_TIMEOUT); 4002 4002 } else if (chan->sec_level == BT_SECURITY_HIGH) 4003 4003 l2cap_chan_close(chan, ECONNREFUSED); 4004 4004 } else { ··· 4066 4066 L2CAP_CONN_REQ, sizeof(req), &req); 4067 4067 } else { 4068 4068 __clear_chan_timer(chan); 4069 - __set_chan_timer(chan, HZ / 10); 4069 + __set_chan_timer(chan, L2CAP_DISC_TIMEOUT); 4070 4070 } 4071 4071 } else if (chan->state == BT_CONNECT2) { 4072 4072 struct l2cap_conn_rsp rsp; ··· 4086 4086 } 4087 4087 } else { 4088 4088 l2cap_state_change(chan, BT_DISCONN); 4089 - __set_chan_timer(chan, HZ / 10); 4089 + __set_chan_timer(chan, L2CAP_DISC_TIMEOUT); 4090 4090 res = L2CAP_CR_SEC_BLOCK; 4091 4091 stat = L2CAP_CS_NO_INFO; 4092 4092 }