hci_dev_lock(hdev);
+ hdev->major_class = cp->major;
+ hdev->minor_class = cp->minor;
+
if (!hdev_is_powered(hdev)) {
- err = cmd_status(sk, index, MGMT_OP_SET_DEV_CLASS,
- MGMT_STATUS_NOT_POWERED);
+ err = cmd_complete(sk, index, MGMT_OP_SET_DEV_CLASS, 0,
+ hdev->dev_class, 3);
goto unlock;
}
- hdev->major_class = cp->major;
- hdev->minor_class = cp->minor;
-
if (test_and_clear_bit(HCI_SERVICE_CACHE, &hdev->dev_flags)) {
hci_dev_unlock(hdev);
cancel_delayed_work_sync(&hdev->service_cache);