diff options
author | David S. Miller <davem@davemloft.net> | 2018-10-04 06:00:17 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-04 06:00:17 +0200 |
commit | 6f41617bf23a17d9cb7cc6ca8161534f05f80293 (patch) | |
tree | 2844d8d197a61b0603e31f09613e3272635dd1cc /net/bluetooth/mgmt.c | |
parent | Merge branch '10GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirshe... (diff) | |
parent | Merge gitolite.kernel.org:/pub/scm/linux/kernel/git/davem/net (diff) | |
download | linux-6f41617bf23a17d9cb7cc6ca8161534f05f80293.tar.xz linux-6f41617bf23a17d9cb7cc6ca8161534f05f80293.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Minor conflict in net/core/rtnetlink.c, David Ahern's bug fix in 'net'
overlapped the renaming of a netlink attribute in net-next.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 3bdc8f3ca259..ccce954f8146 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -2434,9 +2434,8 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data, /* LE address type */ addr_type = le_addr_type(cp->addr.type); - hci_remove_irk(hdev, &cp->addr.bdaddr, addr_type); - - err = hci_remove_ltk(hdev, &cp->addr.bdaddr, addr_type); + /* Abort any ongoing SMP pairing. Removes ltk and irk if they exist. */ + err = smp_cancel_and_remove_pairing(hdev, &cp->addr.bdaddr, addr_type); if (err < 0) { err = mgmt_cmd_complete(sk, hdev->id, MGMT_OP_UNPAIR_DEVICE, MGMT_STATUS_NOT_PAIRED, &rp, @@ -2450,8 +2449,6 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data, goto done; } - /* Abort any ongoing SMP pairing */ - smp_cancel_pairing(conn); /* Defer clearing up the connection parameters until closing to * give a chance of keeping them if a repairing happens. |