]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/bluetooth/hci_event.c
Bluetooth: Add workaround for wrong HCI event in eSCO setup
[mv-sheeva.git] / net / bluetooth / hci_event.c
index 963f9662eaa8fa9611f683e63150678cf3ac268a..15f40ea8d544e3ef68dc4d2be853427a70e2b577 100644 (file)
@@ -866,8 +866,16 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s
        hci_dev_lock(hdev);
 
        conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr);
-       if (!conn)
-               goto unlock;
+       if (!conn) {
+               if (ev->link_type != SCO_LINK)
+                       goto unlock;
+
+               conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr);
+               if (!conn)
+                       goto unlock;
+
+               conn->type = SCO_LINK;
+       }
 
        if (!ev->status) {
                conn->handle = __le16_to_cpu(ev->handle);