summaryrefslogtreecommitdiff
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-03-02 05:07:07 +0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-03-02 05:19:24 +0400
commitd4f68526e438dbb7d194b08499a96c733131ad72 (patch)
tree47446595ec96d34c5905e99a951b98792beb9071 /net/bluetooth/mgmt.c
parent9f8ce967caed427f78d00bb6b07d79cb040a88bd (diff)
downloadlinux-d4f68526e438dbb7d194b08499a96c733131ad72.tar.xz
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: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 40b3da3d5e62..bd01e4a4784e 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2745,7 +2745,7 @@ int mgmt_index_added(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);
@@ -2798,7 +2798,7 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
update_class(hdev);
update_eir(hdev);
} else {
- u8 status = ENETDOWN;
+ u8 status = MGMT_STATUS_NOT_POWERED;
mgmt_pending_foreach(0, hdev, cmd_status_rsp, &status);
}