Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9db5c629 authored by Marcel Holtmann's avatar Marcel Holtmann
Browse files

Bluetooth: Use command status event for Set IO Capability errors



In case of failure, the Set IO Capability command is suppose to return
command status and not command complete.

Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 56f787c5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2513,8 +2513,8 @@ static int set_io_capability(struct sock *sk, struct hci_dev *hdev, void *data,
	BT_DBG("");

	if (cp->io_capability > SMP_IO_KEYBOARD_DISPLAY)
		return mgmt_cmd_complete(sk, hdev->id, MGMT_OP_SET_IO_CAPABILITY,
					 MGMT_STATUS_INVALID_PARAMS, NULL, 0);
		return mgmt_cmd_status(sk, hdev->id, MGMT_OP_SET_IO_CAPABILITY,
				       MGMT_STATUS_INVALID_PARAMS);

	hci_dev_lock(hdev);