Bluetooth: Fallback to SCO on error code 0x10 (Connection Accept Timeout).
authorNick Pelly <npelly@google.com>
Tue, 22 Sep 2009 22:19:46 +0000 (15:19 -0700)
committerArve Hjønnevåg <arve@android.com>
Mon, 8 Feb 2010 23:35:59 +0000 (15:35 -0800)
commitdf28bc9c1957170dbf796063853a4a1aee1af6ac
tree7a5c5b6f3d40e1f44df7c4abe3290e44ad81d1cc
parent43a3de3be869aa4417817b94b7dde35267951418
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>
net/bluetooth/hci_event.c