Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278586
b: refs/heads/master
c: 47c15e2
h: refs/heads/master
v: v3
  • Loading branch information
Brian Gix authored and Gustavo F. Padovan committed Nov 21, 2011
1 parent d973f16 commit 713c73f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0df4c185ed84d914fa2671fa5f4cec2f8dee2d2e
refs/heads/master: 47c15e2b332dd51048170915ad8c4ab4b47e3bf2
24 changes: 24 additions & 0 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1587,6 +1587,30 @@ static int user_pairing_resp(struct sock *sk, u16 index, bdaddr_t *bdaddr,
goto done;
}

/*
* Check for an existing ACL link, if present pair via
* HCI commands.
*
* If no ACL link is present, check for an LE link and if
* present, pair via the SMP engine.
*
* If neither ACL nor LE links are present, fail with error.
*/
conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, bdaddr);
if (!conn) {
conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, bdaddr);
if (!conn) {
err = cmd_status(sk, index, mgmt_op,
MGMT_STATUS_NOT_CONNECTED);
goto done;
}

/* Continue with pairing via SMP */

err = cmd_status(sk, index, mgmt_op, MGMT_STATUS_SUCCESS);
goto done;
}

cmd = mgmt_pending_add(sk, mgmt_op, hdev, bdaddr, sizeof(*bdaddr));
if (!cmd) {
err = -ENOMEM;
Expand Down

0 comments on commit 713c73f

Please sign in to comment.