Skip to content

Commit

Permalink
Bluetooth: Fix mgmt_unpair_device command status
Browse files Browse the repository at this point in the history
The default response status to unpair_device should be set as 0 instead
of a generic failure value. When disconnection is not needed (i.e. we
can reply imediately) we should return success and not failure.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Johan Hedberg committed Feb 13, 2012
1 parent bab73cb commit 82eb703
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,6 @@ static int unpair_device(struct sock *sk, u16 index, void *data, u16 len)
memset(&rp, 0, sizeof(rp));
bacpy(&rp.addr.bdaddr, &cp->addr.bdaddr);
rp.addr.type = cp->addr.type;
rp.status = MGMT_STATUS_FAILED;

if (cp->addr.type == MGMT_ADDR_BREDR)
err = hci_remove_link_key(hdev, &cp->addr.bdaddr);
Expand Down

0 comments on commit 82eb703

Please sign in to comment.