Re: [PATCH 01/12] Bluetooth: Add stubs for synchronous HCI request functionality

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

 



Hi Johan,

> Prepare hci_request.c to have code for doing synchronous HCI requests,
> such as LE scanning or advertising changes. The necessary work
> callbacks will be set up in hci_request_setup() and cleaned up in
> hci_request_cleanup().
> 
> Signed-off-by: Johan Hedberg <johan.hedberg@xxxxxxxxx>
> ---
> net/bluetooth/hci_core.c    | 4 ++++
> net/bluetooth/hci_request.c | 8 ++++++++
> net/bluetooth/hci_request.h | 3 +++
> 3 files changed, 15 insertions(+)
> 
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index ea7cad5a161c..955b907f7ed8 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -1604,6 +1604,8 @@ int hci_dev_do_close(struct hci_dev *hdev)
> 
> 	hci_req_sync_unlock(hdev);
> 
> +	hci_request_cleanup(hdev);
> +
> 	hci_dev_put(hdev);
> 	return 0;
> }
> @@ -3156,6 +3158,8 @@ struct hci_dev *hci_alloc_dev(void)
> 
> 	INIT_DELAYED_WORK(&hdev->cmd_timer, hci_cmd_timeout);
> 
> +	hci_request_setup(hdev);
> +
> 	hci_init_sysfs(hdev);
> 	discovery_init(hdev);

so this is an imbalance. It might be intended, but then the naming is confusing. So hci_alloc_dev is called once for the lifetime of the controller and hci_dev_do_close is called every time the transport is shutdown.

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