Commit d4f68526 authored by Johan Hedberg's avatar Johan Hedberg

Bluetooth: mgmt: Fix command status error code values

Error codes in the command status should always be from the set of
values defined for mgmt and never e.g. POSIX error codes.
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 9f8ce967
...@@ -2745,7 +2745,7 @@ int mgmt_index_added(struct hci_dev *hdev) ...@@ -2745,7 +2745,7 @@ int mgmt_index_added(struct hci_dev *hdev)
int mgmt_index_removed(struct hci_dev *hdev) int mgmt_index_removed(struct hci_dev *hdev)
{ {
u8 status = ENODEV; u8 status = MGMT_STATUS_INVALID_PARAMS;
mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status); mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status);
...@@ -2798,7 +2798,7 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered) ...@@ -2798,7 +2798,7 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
update_class(hdev); update_class(hdev);
update_eir(hdev); update_eir(hdev);
} else { } else {
u8 status = ENETDOWN; u8 status = MGMT_STATUS_NOT_POWERED;
mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status); mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment