diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2010-10-04 21:28:14 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2010-10-04 21:28:14 +0200 |
commit | 73c8e7ac377f0f6ea0df6396b96cb9e8a11eb070 (patch) | |
tree | 8405899d02d263e4409e996a269b6833c4c45463 | |
parent | 195cb7501bcbee2f3be5006c5e5f5a15e50c9599 (diff) | |
download | bluez-73c8e7ac377f0f6ea0df6396b96cb9e8a11eb070.tar.gz |
Make link key removal HCI command asynchronous
-rw-r--r-- | plugins/hciops.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/hciops.c b/plugins/hciops.c index f5d2a328e..bb3750268 100644 --- a/plugins/hciops.c +++ b/plugins/hciops.c @@ -1066,14 +1066,19 @@ static int hciops_disconnect(int index, uint16_t handle) static int hciops_remove_bonding(int index, bdaddr_t *bdaddr) { + delete_stored_link_key_cp cp; int dd, err; dd = hci_open_dev(index); if (dd < 0) return -errno; + memset(&cp, 0, sizeof(cp)); + bacpy(&cp.bdaddr, bdaddr); + /* Delete the link key from the Bluetooth chip */ - if (hci_delete_stored_link_key(dd, bdaddr, 0, HCI_REQ_TIMEOUT) < 0) + if (hci_send_cmd(dd, OGF_HOST_CTL, OCF_DELETE_STORED_LINK_KEY, + DELETE_STORED_LINK_KEY_CP_SIZE, &cp) < 0) err = -errno; else err = 0; |