All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: Skip unconfigured init procedure for raw-only devices
@ 2014-07-06 11:43 Marcel Holtmann
  2014-07-06 12:03 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Marcel Holtmann @ 2014-07-06 11:43 UTC (permalink / raw)
  To: linux-bluetooth

When the driver sets HCI_QUIRK_RAW_DEVICE, the controller will be set
as unconfigured. However running the unconfigured init procecure is
not useful since raw-only devices are not allowed to change its
configuration. This change skips the init procedure and just allows
user channel operation for this device.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index b1d423efa109..fc7abd3c012d 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1813,6 +1813,9 @@ static int __hci_unconf_init(struct hci_dev *hdev)
 {
 	int err;
 
+	if (test_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks))
+		return 0;
+
 	err = __hci_req_sync(hdev, hci_init0_req, 0, HCI_INIT_TIMEOUT);
 	if (err < 0)
 		return err;
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Bluetooth: Skip unconfigured init procedure for raw-only devices
  2014-07-06 11:43 [PATCH] Bluetooth: Skip unconfigured init procedure for raw-only devices Marcel Holtmann
@ 2014-07-06 12:03 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2014-07-06 12:03 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

On Sun, Jul 06, 2014, Marcel Holtmann wrote:
> When the driver sets HCI_QUIRK_RAW_DEVICE, the controller will be set
> as unconfigured. However running the unconfigured init procecure is
> not useful since raw-only devices are not allowed to change its
> configuration. This change skips the init procedure and just allows
> user channel operation for this device.
> 
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
>  net/bluetooth/hci_core.c | 3 +++
>  1 file changed, 3 insertions(+)

Applied to bluetooth-next. Thanks.

Johan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-06 12:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-06 11:43 [PATCH] Bluetooth: Skip unconfigured init procedure for raw-only devices Marcel Holtmann
2014-07-06 12:03 ` Johan Hedberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.