projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eac83dc
)
Bluetooth: Enable Secure Connection during power on if configured
author
Marcel Holtmann
<
[email protected]
>
Fri, 10 Jan 2014 10:07:24 +0000
(
02:07
-0800)
committer
Johan Hedberg
<
[email protected]
>
Thu, 13 Feb 2014 07:51:32 +0000
(09:51 +0200)
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 <
[email protected]
>
Signed-off-by: Johan Hedberg <
[email protected]
>
net/bluetooth/hci_core.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/hci_core.c
b/net/bluetooth/hci_core.c
index 52e398f371299f9064e9fd689ea81b65a9653a24..b3b619a448b549f31c807da386d84acaac98e6aa 100644
(file)
--- 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)