From: Marcel Holtmann Date: Sun, 6 Jul 2014 11:43:20 +0000 (+0200) Subject: Bluetooth: Skip unconfigured init procedure for raw-only devices X-Git-Tag: v3.17-rc1~106^2~12^2~41^2~115 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=cc78b44ba2231d6a92707407cd199b2e05fe3528;p=linux-block.git Bluetooth: Skip unconfigured init procedure for raw-only devices 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 Signed-off-by: Johan Hedberg --- 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;