Bluetooth: mgmt: Fix return value of add/remove_uuid
authorJohan Hedberg <johan.hedberg@intel.com>
Thu, 23 Feb 2012 13:57:46 +0000 (15:57 +0200)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 23 Feb 2012 15:01:49 +0000 (17:01 +0200)
The Add/Remove UUID commands should return the device class instead of
an empty parameter list.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c

index 4e4889490635556cd256eb3a7f03584d36c87904..000abc07bc1e17cb9d36cc2708b216c3fd3afefd 100644 (file)
@@ -1367,7 +1367,7 @@ static int add_uuid(struct sock *sk, u16 index, void *data, u16 len)
        if (err < 0)
                goto failed;
 
-       err = cmd_complete(sk, index, MGMT_OP_ADD_UUID, 0, NULL, 0);
+       err = cmd_complete(sk, index, MGMT_OP_ADD_UUID, 0, hdev->dev_class, 3);
 
 failed:
        hci_dev_unlock(hdev);
@@ -1428,7 +1428,8 @@ static int remove_uuid(struct sock *sk, u16 index, void *data, u16 len)
        if (err < 0)
                goto unlock;
 
-       err = cmd_complete(sk, index, MGMT_OP_REMOVE_UUID, 0, NULL, 0);
+       err = cmd_complete(sk, index, MGMT_OP_REMOVE_UUID, 0,
+                                                       hdev->dev_class, 3);
 
 unlock:
        hci_dev_unlock(hdev);