Hi Johan, >>> + err = hci_req_run(&req, add_device_complete); >>> + if (err < 0) { >>> + if (err == -ENODATA) { >>> + cmd->cmd_complete(cmd, MGMT_STATUS_SUCCESS); >>> + err = 0; >>> + } >>> + mgmt_pending_remove(cmd); >>> + } >> >> But this command should also work when the controller is powered down. >> Who is doing these checks now? > > That's covered by the ENODATA check. hci_update_background_scan() bails > out without doing anything if the hdev is powered off, leaving the > hci_request empty. we have never done it like that in mgmt commands, or have we? I think a shortcut check with is_powered and leaving the function might be a bit more clearer to understand. Or at least a command that explain this. Since I clearly missed it. Regards Marcel -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html