summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorNick Pelly <npelly@google.com>2009-09-22 15:19:46 -0700
committerNick Pelly <npelly@google.com>2009-09-22 16:08:44 -0700
commit8da2b92f45a99ba87959b441a522ce5ebb833d96 (patch)
tree073dd13b448878871091001333f4f5a41f2ac21d /net
parent1048e007842da2d6440679e1ca80f45438a6369d (diff)
Bluetooth: Fallback to SCO on error code 0x10 (Connection Accept Timeout).
This is to support the Motorola HF850 carkit which reports the error code 0x10 for an eSCO attempt, even though it advertises eSCO support. Here is the hcidump: 2009-09-22 15:40:24.492391 < HCI Command: Setup Synchronous Connection (0x01|0x0028) plen 17 handle 1 voice setting 0x0060 2009-09-22 15:40:24.493002 > HCI Event: Command Status (0x0f) plen 4 Setup Synchronous Connection (0x01|0x0028) status 0x00 ncmd 1 2009-09-22 15:40:30.594869 > HCI Event: Synchronous Connect Complete (0x2c) plen 17 status 0x10 handle 257 bdaddr 00:50:CD:20:C6:84 type eSCO Error: Connection Accept Timeout Exceeded With this patch we will retry with a SCO connection, which succeeds. Unfortunately the Moto HF850 also takes 5 seconds to return the error for the eSCO attempt, so it will still take 5 seconds to fallback to SCO with this patch. Signed-off-by: Nick Pelly <npelly@google.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index c4795924c99b..ffdd6aa5a643 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1647,7 +1647,8 @@ static inline void hci_sync_conn_complete_evt(struct hci_dev *hdev, struct sk_bu
}
if (conn->out && (ev->status == 0x1a || ev->status == 0x1c ||
- ev->status == 0x1f) && conn->attempt < 2) {
+ ev->status == 0x1f || ev->status == 0x10) &&
+ conn->attempt < 2) {
conn->pkt_type = (hdev->esco_type & SCO_ESCO_MASK) |
(hdev->esco_type & EDR_ESCO_MASK);
hci_setup_sync(conn, conn->link->handle);