|
@@ -3418,6 +3418,27 @@ new_settings:
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
+int mgmt_set_powered_failed(struct hci_dev *hdev, int err)
|
|
|
+{
|
|
|
+ struct pending_cmd *cmd;
|
|
|
+ u8 status;
|
|
|
+
|
|
|
+ cmd = mgmt_pending_find(MGMT_OP_SET_POWERED, hdev);
|
|
|
+ if (!cmd)
|
|
|
+ return -ENOENT;
|
|
|
+
|
|
|
+ if (err == -ERFKILL)
|
|
|
+ status = MGMT_STATUS_RFKILLED;
|
|
|
+ else
|
|
|
+ status = MGMT_STATUS_FAILED;
|
|
|
+
|
|
|
+ err = cmd_status(cmd->sk, hdev->id, MGMT_OP_SET_POWERED, status);
|
|
|
+
|
|
|
+ mgmt_pending_remove(cmd);
|
|
|
+
|
|
|
+ return err;
|
|
|
+}
|
|
|
+
|
|
|
int mgmt_discoverable(struct hci_dev *hdev, u8 discoverable)
|
|
|
{
|
|
|
struct cmd_lookup match = { NULL, hdev };
|