aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2013-04-11 12:53:34 -0400
committerGustavo Padovan <gustavo.padovan@collabora.co.uk>2013-04-11 15:34:16 -0400
commitea323c119823b48b0a66e48fb980c252e1605b3f (patch)
tree95fc46478a7d3163e079dfd8b603aeb4006a32e0 /net/bluetooth
parent76a68ba0ae097be72dfa8f918b3139130da769a4 (diff)
Bluetooth: Fix SCO connection reference
This patch fixes decrementing SCO connection reference right after stablishing the SCO connection with defer setup enabled. The dump below shows a disconnection command with handle 0, the connection is still in BT_CONNECT2 state and there isn't a handle associated with it. < HCI Command: Accept Synchronous Connection (0x01|0x0029) plen 21 bdaddr 78:47:1D:B3:72:6C > HCI Event: Command Status (0x0f) plen 4 Accept Synchronous Connection (0x01|0x0029) status 0x00 ncmd 1 < HCI Command: Disconnect (0x01|0x0006) plen 3 handle 0 reason 0x13 Reason: Remote User Terminated Connection > HCI Event: Command Status (0x0f) plen 4 Disconnect (0x01|0x0006) status 0x00 ncmd 1 > HCI Event: Synchronous Connect Complete (0x2c) plen 17 status 0x00 handle 46 bdaddr 78:47:1D:B3:72:6C type eSCO Air mode: CVSD < SCO data: handle 46 flags 0x00 dlen 48 Signed-off-by: Claudio Takahasi <claudio.takahasi@openbossa.org> Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_event.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 2cf28b198b31..f6ea3c734269 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1860,7 +1860,6 @@ static void hci_conn_request_evt(struct hci_dev *hdev, struct sk_buff *skb)
1860 } else { 1860 } else {
1861 conn->state = BT_CONNECT2; 1861 conn->state = BT_CONNECT2;
1862 hci_proto_connect_cfm(conn, 0); 1862 hci_proto_connect_cfm(conn, 0);
1863 hci_conn_drop(conn);
1864 } 1863 }
1865 } else { 1864 } else {
1866 /* Connection rejected */ 1865 /* Connection rejected */