aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/hci_core.h
diff options
context:
space:
mode:
authorDaniel Winkler <danielwinkler@google.com>2020-12-03 12:12:51 -0800
committerJohan Hedberg <johan.hedberg@intel.com>2020-12-07 17:01:38 +0200
commit7c395ea521e6c8d77f643be61bf2f0f3a1f5b3e8 (patch)
tree5e3d791afeb45da4d0b44830849253eb1ad2219a /include/net/bluetooth/hci_core.h
parentBluetooth: Use intervals and tx power from mgmt cmds (diff)
downloadlinux-dev-7c395ea521e6c8d77f643be61bf2f0f3a1f5b3e8.tar.xz
linux-dev-7c395ea521e6c8d77f643be61bf2f0f3a1f5b3e8.zip
Bluetooth: Query LE tx power on startup
Queries tx power via HCI_LE_Read_Transmit_Power command when the hci device is initialized, and stores resulting min/max LE power in hdev struct. If command isn't available (< BT5 support), min/max values both default to HCI_TX_POWER_INVALID. This patch is manually verified by ensuring BT5 devices correctly query and receive controller tx power range. Reviewed-by: Sonny Sasaka <sonnysasaka@chromium.org> Signed-off-by: Daniel Winkler <danielwinkler@google.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'include/net/bluetooth/hci_core.h')
-rw-r--r--include/net/bluetooth/hci_core.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 88988d4fd347..677a8c50b2ad 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -384,6 +384,8 @@ struct hci_dev {
__u16 def_page_timeout;
__u16 def_multi_adv_rotation_duration;
__u16 def_le_autoconnect_timeout;
+ __s8 min_le_tx_power;
+ __s8 max_le_tx_power;
__u16 pkt_type;
__u16 esco_type;