diff options
-rw-r--r-- | net/bluetooth/mgmt.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index ce0272c6f71f..b84c0923ec62 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -3635,12 +3635,19 @@ static int remove_remote_oob_data(struct sock *sk, struct hci_dev *hdev, | |||
3635 | 3635 | ||
3636 | hci_dev_lock(hdev); | 3636 | hci_dev_lock(hdev); |
3637 | 3637 | ||
3638 | if (!bacmp(&cp->addr.bdaddr, BDADDR_ANY)) { | ||
3639 | hci_remote_oob_data_clear(hdev); | ||
3640 | status = MGMT_STATUS_SUCCESS; | ||
3641 | goto done; | ||
3642 | } | ||
3643 | |||
3638 | err = hci_remove_remote_oob_data(hdev, &cp->addr.bdaddr); | 3644 | err = hci_remove_remote_oob_data(hdev, &cp->addr.bdaddr); |
3639 | if (err < 0) | 3645 | if (err < 0) |
3640 | status = MGMT_STATUS_INVALID_PARAMS; | 3646 | status = MGMT_STATUS_INVALID_PARAMS; |
3641 | else | 3647 | else |
3642 | status = MGMT_STATUS_SUCCESS; | 3648 | status = MGMT_STATUS_SUCCESS; |
3643 | 3649 | ||
3650 | done: | ||
3644 | err = cmd_complete(sk, hdev->id, MGMT_OP_REMOVE_REMOTE_OOB_DATA, | 3651 | err = cmd_complete(sk, hdev->id, MGMT_OP_REMOVE_REMOTE_OOB_DATA, |
3645 | status, &cp->addr, sizeof(cp->addr)); | 3652 | status, &cp->addr, sizeof(cp->addr)); |
3646 | 3653 | ||