From: Marcel Holtmann Date: Fri, 10 Jan 2014 10:07:24 +0000 (-0800) Subject: Bluetooth: Enable Secure Connection during power on if configured X-Git-Tag: v3.15-rc1~113^2~159^2^2~130^2~129 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=a6d0d690e1bd56ce031f38a3144cb9f6ea23456f;p=~emulex%2Finfiniband.git 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. 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 52e398f3712..b3b619a448b 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -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)