diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2008-07-14 14:13:46 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2008-07-14 14:13:46 -0400 |
commit | 9dc0a3afc08d6c20c284994dcd84531787d00ec2 (patch) | |
tree | 16658484ca53d7fbbf60d0a6c12590a5d3043de9 /net/bluetooth | |
parent | ae29319649b80ed9d28d7b4f164e3f5f75020fc8 (diff) |
[Bluetooth] Support the case when headset falls back to SCO link
When trying to establish an eSCO link between two devices then it can
happen that the remote device falls back to a SCO link. Currently this
case is not handled correctly and the message dispatching will break
since it is looking for eSCO packets. So in case the configured link
falls back to SCO overwrite the link type with the correct value.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_event.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 0aba21a03b3c..6bc5a0506c6c 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -1314,8 +1314,16 @@ static inline void hci_sync_conn_complete_evt(struct hci_dev *hdev, struct sk_bu | |||
1314 | hci_dev_lock(hdev); | 1314 | hci_dev_lock(hdev); |
1315 | 1315 | ||
1316 | conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); | 1316 | conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); |
1317 | if (!conn) | 1317 | if (!conn) { |
1318 | goto unlock; | 1318 | if (ev->link_type == ESCO_LINK) |
1319 | goto unlock; | ||
1320 | |||
1321 | conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); | ||
1322 | if (!conn) | ||
1323 | goto unlock; | ||
1324 | |||
1325 | conn->type = SCO_LINK; | ||
1326 | } | ||
1319 | 1327 | ||
1320 | if (!ev->status) { | 1328 | if (!ev->status) { |
1321 | conn->handle = __le16_to_cpu(ev->handle); | 1329 | conn->handle = __le16_to_cpu(ev->handle); |