aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/mgmt.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 0e5a316fafbf..664dbc4eccbe 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -4717,10 +4717,16 @@ static int get_conn_info(struct sock *sk, struct hci_dev *hdev, void *data,
4717 hci_req_add(&req, HCI_OP_READ_RSSI, sizeof(req_rssi_cp), 4717 hci_req_add(&req, HCI_OP_READ_RSSI, sizeof(req_rssi_cp),
4718 &req_rssi_cp); 4718 &req_rssi_cp);
4719 4719
4720 req_txp_cp.handle = cpu_to_le16(conn->handle); 4720 /* For LE links TX power does not change thus we don't need to
4721 req_txp_cp.type = 0x00; 4721 * query for it once value is known.
4722 hci_req_add(&req, HCI_OP_READ_TX_POWER, 4722 */
4723 sizeof(req_txp_cp), &req_txp_cp); 4723 if (!bdaddr_type_is_le(cp->addr.type) ||
4724 conn->tx_power == HCI_TX_POWER_INVALID) {
4725 req_txp_cp.handle = cpu_to_le16(conn->handle);
4726 req_txp_cp.type = 0x00;
4727 hci_req_add(&req, HCI_OP_READ_TX_POWER,
4728 sizeof(req_txp_cp), &req_txp_cp);
4729 }
4724 4730
4725 err = hci_req_run(&req, conn_info_refresh_complete); 4731 err = hci_req_run(&req, conn_info_refresh_complete);
4726 if (err < 0) 4732 if (err < 0)