Bluetooth: Fix incorrect branch in connection complete
When handling auto-connected devices, we should execute the rest of the connection complete when it was previously discovered and it is an ACL connection. Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
committed by
Marcel Holtmann
parent
8731840a34
commit
2d186fcd6d
@@ -2539,17 +2539,18 @@ static void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
|
|||||||
bt_dev_err(hdev, "no memory for new conn");
|
bt_dev_err(hdev, "no memory for new conn");
|
||||||
goto unlock;
|
goto unlock;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if (ev->link_type != SCO_LINK)
|
if (ev->link_type != SCO_LINK)
|
||||||
goto unlock;
|
goto unlock;
|
||||||
|
|
||||||
conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr);
|
conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK,
|
||||||
|
&ev->bdaddr);
|
||||||
if (!conn)
|
if (!conn)
|
||||||
goto unlock;
|
goto unlock;
|
||||||
|
|
||||||
conn->type = SCO_LINK;
|
conn->type = SCO_LINK;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!ev->status) {
|
if (!ev->status) {
|
||||||
conn->handle = __le16_to_cpu(ev->handle);
|
conn->handle = __le16_to_cpu(ev->handle);
|
||||||
|
|||||||
Reference in New Issue
Block a user