Skip to contentSkip to conversation

Bluetooth: Enable Secure Connection during power on if configured

PATCH Superseded Marcel Holtmann 1 participant 1 message Jan 10, 2014

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH v2 9/13 Bluetooth: Enable Secure Connection during power on if configured

If support for Secure Connection has been configured, then make sure to send the appropiate HCI command to enable it when powering on the controller.

---
 net/bluetooth/hci_core.c | 8 ++++++++
 1 file changed, 8 insertions(+)
net/bluetooth/hci_core.c +8 -0
index 52e398f37129..b3b619a448b5 100644
@@ -1363,6 +1363,14 @@ static void hci_init4_req(struct hci_request *req, unsigned long opt)
 	/* Check for Synchronization Train support */
 	if (lmp_sync_train_capable(hdev))
 		hci_req_add(req, HCI_OP_READ_SYNC_TRAIN_PARAMS, 0, NULL);
+
+	/* Enable Secure Connections if supported and configured */
+	if (lmp_sc_capable(hdev) &&
+	    test_bit(HCI_SC_ENABLED, &hdev->dev_flags)) {
+		u8 support = 0x01;
+		hci_req_add(req, HCI_OP_WRITE_SC_SUPPORT,
+			    sizeof(support), &support);
+	}
 }
 
 static int __hci_init(struct hci_dev *hdev)
Signature · 1 line
1.8.4.2