diff options
author | Brian Gix <brian.gix@intel.com> | 2021-10-27 16:58:48 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-10-29 16:51:59 +0200 |
commit | 47db6b42991e6d5645d0938e43085aaf88cdfba4 (patch) | |
tree | a3b4c258f301eda425657ae882da01f8d175f679 /net/bluetooth/hci_sync.c | |
parent | 451d95a98c5a350da2f2c5447cc17115a5b94c8e (diff) | |
download | lwn-47db6b42991e6d5645d0938e43085aaf88cdfba4.tar.gz lwn-47db6b42991e6d5645d0938e43085aaf88cdfba4.zip |
Bluetooth: hci_sync: Convert MGMT_OP_GET_CONN_INFO
Synchronous version of MGMT_OP_GET_CONN_INFO
Implements:
hci_read_rssi_sync
hci_read_tx_power_sync
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.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index 39fdb51c9698..ad819ff4e30d 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -1309,6 +1309,25 @@ int hci_remove_advertising_sync(struct hci_dev *hdev, struct sock *sk, return 0; } +int hci_read_rssi_sync(struct hci_dev *hdev, __le16 handle) +{ + struct hci_cp_read_rssi cp; + + cp.handle = handle; + return __hci_cmd_sync_status(hdev, HCI_OP_READ_RSSI, + sizeof(cp), &cp, HCI_CMD_TIMEOUT); +} + +int hci_read_tx_power_sync(struct hci_dev *hdev, __le16 handle, u8 type) +{ + struct hci_cp_read_tx_power cp; + + cp.handle = handle; + cp.type = type; + return __hci_cmd_sync_status(hdev, HCI_OP_READ_TX_POWER, + sizeof(cp), &cp, HCI_CMD_TIMEOUT); +} + int hci_disable_advertising_sync(struct hci_dev *hdev) { u8 enable = 0x00; |