Skip to contentSkip to conversation

Bluetooth: Skip unconfigured init procedure for raw-only devices

PATCH Applied Marcel Holtmann 2 participants 2 messages Jul 6, 2014

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 net/bluetooth/hci_core.c | 3 +++
 1 file changed, 3 insertions(+)
net/bluetooth/hci_core.c +3 -0
index b1d423efa109..fc7abd3c012d 100644
@@ -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;
Signature · 1 line
1.9.3
#1 lore raw

Hi Marcel,

Quoted 10 lines · Marcel Holtmann

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.

---
 net/bluetooth/hci_core.c | 3 +++
 1 file changed, 3 insertions(+)

Applied to bluetooth-next. Thanks.

Johan