diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-07-13 00:29:22 +0200 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-07-13 08:49:58 +0300 |
commit | 4d6c705bbd9e845bcfbe119bb017a5653c0d9efb (patch) | |
tree | 06850acd6f5f54045614e5c2c5fb3afc6897171b /net/bluetooth | |
parent | 0da71f1bf90f259debf50aaaa547e2cc31b5cf67 (diff) | |
download | blackbird-op-linux-4d6c705bbd9e845bcfbe119bb017a5653c0d9efb.tar.gz blackbird-op-linux-4d6c705bbd9e845bcfbe119bb017a5653c0d9efb.zip |
Bluetooth: Enable LE Long Term Key Request event only when supported
The support for LE encryption is optional and with that also the
LE Long Term Key Request event. If encryption is not supported, then
do not bother enabling this event.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index ff150e3c7ad1..188bfd3d7c43 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -1644,7 +1644,10 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt) u8 events[8]; memset(events, 0, sizeof(events)); - events[0] = 0x1f; + events[0] = 0x0f; + + if (hdev->le_features[0] & HCI_LE_ENCRYPTION) + events[0] |= 0x10; /* LE Long Term Key Request */ /* If controller supports the Connection Parameters Request * Link Layer Procedure, enable the corresponding event. |