Bluetooth: Query LE tx power on startup
authorDaniel Winkler <danielwinkler@google.com>
Thu, 3 Dec 2020 20:12:51 +0000 (12:12 -0800)
committerJohan Hedberg <johan.hedberg@intel.com>
Mon, 7 Dec 2020 15:01:38 +0000 (17:01 +0200)
commit7c395ea521e6c8d77f643be61bf2f0f3a1f5b3e8
tree5e3d791afeb45da4d0b44830849253eb1ad2219a
parent9bf9f4b6301ffbd51674e1168f8eeed214d2cf99
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>
include/net/bluetooth/hci.h
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c