diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2020-04-03 22:44:04 +0300 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2020-04-05 14:53:11 +0300 |
commit | a479036041d6a1bcf98f72b16a425e8d45e20ae9 (patch) | |
tree | 70fa2579fd3c8253570f1150b2771108b98afd11 /net/bluetooth/hci_core.c | |
parent | fc04590e3d39213a22b7afd46c4bd5d95a6cab1f (diff) | |
download | linux-a479036041d6a1bcf98f72b16a425e8d45e20ae9.tar.xz |
Bluetooth: Add support for Read Local Simple Pairing Options
With the Read Local Simple Pairing Options command it is possible to
retrieve the support for max encryption key size supported by the
controller and also if the controller correctly verifies the ECDH public
key during pairing.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Reviewed-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r-- | net/bluetooth/hci_core.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index ef0ee3a3d9ed..589c4085499c 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -827,6 +827,10 @@ static int hci_init4_req(struct hci_request *req, unsigned long opt) if (hdev->commands[29] & 0x20) hci_req_add(req, HCI_OP_READ_LOCAL_CODECS, 0, NULL); + /* Read local pairing options if the HCI command is supported */ + if (hdev->commands[41] & 0x08) + hci_req_add(req, HCI_OP_READ_LOCAL_PAIRING_OPTS, 0, NULL); + /* Get MWS transport configuration if the HCI command is supported */ if (hdev->commands[30] & 0x08) hci_req_add(req, HCI_OP_GET_MWS_TRANSPORT_CONFIG, 0, NULL); |