Skip to content

Commit

Permalink
Bluetooth: Fix incorrect branch in connection complete
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Abhishek Pandit-Subedi authored and Marcel Holtmann committed Mar 23, 2020
1 parent 8731840 commit 2d186fc
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions net/bluetooth/hci_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -2539,16 +2539,17 @@ static void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
bt_dev_err(hdev, "no memory for new conn");
goto unlock;
}
}

if (ev->link_type != SCO_LINK)
goto unlock;
} else {
if (ev->link_type != SCO_LINK)
goto unlock;

conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr);
if (!conn)
goto unlock;
conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK,
&ev->bdaddr);
if (!conn)
goto unlock;

conn->type = SCO_LINK;
conn->type = SCO_LINK;
}
}

if (!ev->status) {
Expand Down

0 comments on commit 2d186fc

Please sign in to comment.