Skip to content

Commit 2d186fc

Browse files
apanditholtmann
authored andcommitted
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>
1 parent 8731840 commit 2d186fc

1 file changed

Lines changed: 9 additions & 8 deletions

File tree

‎net/bluetooth/hci_event.c‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2539,16 +2539,17 @@ static void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
25392539
bt_dev_err(hdev, "no memory for new conn");
25402540
goto unlock;
25412541
}
2542-
}
2543-
2544-
if (ev->link_type != SCO_LINK)
2545-
goto unlock;
2542+
} else {
2543+
if (ev->link_type != SCO_LINK)
2544+
goto unlock;
25462545

2547-
conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr);
2548-
if (!conn)
2549-
goto unlock;
2546+
conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK,
2547+
&ev->bdaddr);
2548+
if (!conn)
2549+
goto unlock;
25502550

2551-
conn->type = SCO_LINK;
2551+
conn->type = SCO_LINK;
2552+
}
25522553
}
25532554

25542555
if (!ev->status) {

0 commit comments

Comments
 (0)