diff options
author | Jakub Pawlowski <jpawlowski@google.com> | 2015-08-07 20:22:54 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-08-10 21:36:13 +0200 |
commit | 28a667c9c279df5a6467842ee2b3b73ddf874732 (patch) | |
tree | a9f51b33ae0be4412cabea681a7369234707a4d3 /net/bluetooth/mgmt.c | |
parent | f75113a26008980ca13834fb6573145523596776 (diff) | |
download | linux-28a667c9c279df5a6467842ee2b3b73ddf874732.tar.bz2 |
Bluetooth: advertisement handling in new connect procedure
Currently, when trying to connect to already paired device that just
rotated its RPA MAC address, old address would be used and connection
would fail. In order to fix that, kernel must scan and receive
advertisement with fresh RPA before connecting.
This path makes sure that after advertisement is received from device that
we try to connect to, it is properly handled in check_pending_le_conn and
trigger connect attempt.
It also modifies hci_le_connect to make sure that connect attempt will be
properly continued.
Signed-off-by: Jakub Pawlowski <jpawlowski@google.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 35418bbe6b15..5f5d7851f5bf 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -6107,6 +6107,12 @@ static int hci_conn_params_set(struct hci_request *req, bdaddr_t *addr, switch (auto_connect) { case HCI_AUTO_CONN_DISABLED: case HCI_AUTO_CONN_LINK_LOSS: + /* If auto connect is being disabled when we're trying to + * connect to device, keep connecting. + */ + if (params->explicit_connect) + list_add(¶ms->action, &hdev->pend_le_conns); + __hci_update_background_scan(req); break; case HCI_AUTO_CONN_REPORT: |