Skip to content
Commit 1b0336bb authored by Marcel Holtmann's avatar Marcel Holtmann
Browse files

Bluetooth: Don't use hci_acl_connect_cancel() for incoming connections



The connection setup phase takes around 2 seconds or longer and in
that time it is possible that the need for an ACL connection is no
longer present. If that happens then, the connection attempt will
be canceled.

This only applies to outgoing connections, but currently it can also
be triggered by incoming connection. Don't call hci_acl_connect_cancel()
on incoming connection since these have to be either accepted or rejected
in this state. Once they are successfully connected they need to be
fully disconnected anyway.

Also remove the wrong hci_acl_disconn() call for SCO and eSCO links
since at this stage they can't be disconnected either, because the
connection handle is still unknown.

Based on a report by Johan Hedberg <johan.hedberg@nokia.com>

Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Tested-by: default avatarJohan Hedberg <johan.hedberg@nokia.com>
parent 384943ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment