diff options
author | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-08-03 23:12:09 +0200 |
---|---|---|
committer | codeworkx <daniel.hillenbrand@codeworkx.de> | 2012-08-03 23:12:09 +0200 |
commit | 52215890ef7c4d06fd3323f8315d85f14d637a91 (patch) | |
tree | 2f97aaab909de9fa903ba52224f6f643e2f25cf5 /net/bluetooth_mgmt/mgmt.c | |
parent | 4309a7ffa8aa46ac2fc4090cebc3efeb00dce72f (diff) | |
download | kernel_samsung_smdk4412-52215890ef7c4d06fd3323f8315d85f14d637a91.zip kernel_samsung_smdk4412-52215890ef7c4d06fd3323f8315d85f14d637a91.tar.gz kernel_samsung_smdk4412-52215890ef7c4d06fd3323f8315d85f14d637a91.tar.bz2 |
samsung opensource update4
Change-Id: I9db25f213bb1577c4468873c66b230a0566b6cf2
Diffstat (limited to 'net/bluetooth_mgmt/mgmt.c')
-rw-r--r-- | net/bluetooth_mgmt/mgmt.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/net/bluetooth_mgmt/mgmt.c b/net/bluetooth_mgmt/mgmt.c index dd23eb7..04eaf75 100644 --- a/net/bluetooth_mgmt/mgmt.c +++ b/net/bluetooth_mgmt/mgmt.c @@ -1627,6 +1627,22 @@ static void pairing_complete_cb(struct hci_conn *conn, u8 status) pairing_complete(cmd, status); } +static void le_connect_complete_cb(struct hci_conn *conn, u8 status) +{ + struct pending_cmd *cmd; + + BT_DBG("status %u", status); + + if (!status) + return; + + cmd = find_pairing(conn); + if (!cmd) + BT_DBG("Unable to find a pending command"); + else + pairing_complete(cmd, mgmt_status(status)); +} + static int pair_device(struct sock *sk, u16 index, void *data, u16 len) { struct hci_dev *hdev; @@ -1687,9 +1703,10 @@ static int pair_device(struct sock *sk, u16 index, void *data, u16 len) goto unlock; } - /* For LE, just connecting isn't a proof that the pairing finished */ if (cp->addr.type == MGMT_ADDR_BREDR) conn->connect_cfm_cb = pairing_complete_cb; + else + conn->connect_cfm_cb = le_connect_complete_cb; conn->security_cfm_cb = pairing_complete_cb; conn->disconn_cfm_cb = pairing_complete_cb; |