aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/bluetooth/hci_sync.c
diff options
context:
space:
mode:
authorBrian Gix <brian.gix@intel.com>2021-10-27 16:58:58 -0700
committerMarcel Holtmann <marcel@holtmann.org>2021-10-29 16:52:00 +0200
commit3244845c6307fa6f4fa2eabe5259d2c93c837dce (patch)
tree8fdced5e37147eda3c20ec7c3cdb9eccec2bff4c /net/bluetooth/hci_sync.c
parentBluetooth: hci_sync: Convert adv_expire (diff)
downloadwireguard-linux-3244845c6307fa6f4fa2eabe5259d2c93c837dce.tar.xz
wireguard-linux-3244845c6307fa6f4fa2eabe5259d2c93c837dce.zip
Bluetooth: hci_sync: Convert MGMT_OP_SSP
mgmt-tester paths: Set SSP on - Success 2 Set Device ID - SSP off and Power on Signed-off-by: Brian Gix <brian.gix@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_sync.c')
-rw-r--r--net/bluetooth/hci_sync.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 47beabe48257..8b63b4e5c96a 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -2142,7 +2142,7 @@ int hci_write_sc_support_sync(struct hci_dev *hdev, u8 val)
return err;
}
-static int hci_write_ssp_mode_sync(struct hci_dev *hdev, u8 mode)
+int hci_write_ssp_mode_sync(struct hci_dev *hdev, u8 mode)
{
int err;
@@ -2150,6 +2150,11 @@ static int hci_write_ssp_mode_sync(struct hci_dev *hdev, u8 mode)
lmp_host_ssp_capable(hdev))
return 0;
+ if (!mode && hci_dev_test_flag(hdev, HCI_USE_DEBUG_KEYS)) {
+ __hci_cmd_sync_status(hdev, HCI_OP_WRITE_SSP_DEBUG_MODE,
+ sizeof(mode), &mode, HCI_CMD_TIMEOUT);
+ }
+
err = __hci_cmd_sync_status(hdev, HCI_OP_WRITE_SSP_MODE,
sizeof(mode), &mode, HCI_CMD_TIMEOUT);
if (err)