Re: [PATCH 4/4] Bluetooth: Fix Add Device to wait for HCI before sending cmd_complete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux