summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-12-05 16:20:15 +0100
committerJohan Hedberg <johan.hedberg@intel.com>2014-12-05 18:17:49 +0200
commit5a34bd5f5d8119def4feb1d2b4e3906b71059416 (patch)
tree31597703fc9c18fa6e73f79715ddb0a698fdfa35 /net
parent4efbb2ce8b6f693ce9607c28082f542a70eb5934 (diff)
downloadop-kernel-dev-5a34bd5f5d8119def4feb1d2b4e3906b71059416.zip
op-kernel-dev-5a34bd5f5d8119def4feb1d2b4e3906b71059416.tar.gz
Bluetooth: Enable events for P-256 Public Key and DHKey commands
When the LE Read Local P-256 Public Key command is supported, then enable its corresponding complete event. And when the LE Generate DHKey command is supported, enable its corresponding complete event as well. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_core.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index c1d5726..93f92a0 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1743,6 +1743,20 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt)
* Report
*/
+ /* If the controller supports the LE Read Local P-256
+ * Public Key command, enable the corresponding event.
+ */
+ if (hdev->commands[34] & 0x02)
+ events[0] |= 0x80; /* LE Read Local P-256
+ * Public Key Complete
+ */
+
+ /* If the controller supports the LE Generate DHKey
+ * command, enable the corresponding event.
+ */
+ if (hdev->commands[34] & 0x04)
+ events[1] |= 0x01; /* LE Generate DHKey Complete */
+
hci_req_add(req, HCI_OP_LE_SET_EVENT_MASK, sizeof(events),
events);
OpenPOWER on IntegriCloud