diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-22 11:58:37 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-23 13:06:58 +0200 |
commit | 47990ea09d393da8fb6cf284f4dba704c3661973 (patch) | |
tree | 60cdfa2ffaacebc6a715262147237a6f35ddae7d /net/bluetooth/hci_event.c | |
parent | 2e0052e4cf78e3e205e92d82ee572ed726e315d6 (diff) | |
download | talos-op-linux-47990ea09d393da8fb6cf284f4dba704c3661973.tar.gz talos-op-linux-47990ea09d393da8fb6cf284f4dba704c3661973.zip |
Bluetooth: mgmt: Make Set Link Security callable while powered off
This patch makes it possible to change the Link Security setting while
powered off and have it automatically enabled when powering on a device.
To track the desired state once powered on a new HCI_LINK_SECURITY flag
is added.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 2a5d05c05e35..5fb1ee516d3a 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -594,6 +594,12 @@ static void hci_setup(struct hci_dev *hdev) sizeof(cp), &cp); } + if (test_bit(HCI_LINK_SECURITY, &hdev->dev_flags)) { + u8 enable = 1; + hci_send_cmd(hdev, HCI_OP_WRITE_AUTH_ENABLE, + sizeof(enable), &enable); + } + if (hdev->features[4] & LMP_LE) hci_set_le_support(hdev); } |