summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg2012-11-08 01:22:59 +0100
committerGustavo Padovan2012-11-19 02:03:00 +0100
commitbbaf444a89dd7dd7effd8ed2f4e4ec64da3cc1da (patch)
treecc265122c83264b509353adad12d6dfe917f27c5 /net/bluetooth/hci_core.c
parentath9k_hw: Program filter coefficients correctly (diff)
downloadkernel-qcow2-linux-bbaf444a89dd7dd7effd8ed2f4e4ec64da3cc1da.tar.gz
kernel-qcow2-linux-bbaf444a89dd7dd7effd8ed2f4e4ec64da3cc1da.tar.xz
kernel-qcow2-linux-bbaf444a89dd7dd7effd8ed2f4e4ec64da3cc1da.zip
Bluetooth: Use proper invalid value for tx_power
The core specification defines 127 as the "not available" value (well, "reserved" for BR/EDR and "not available" for LE - but essentially the same). Therefore, instead of testing for 0 (which is in fact a valid value) we should be using this invalid value to test if the tx_power is available. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 515d0c394f35..9713a2917ddc 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1606,6 +1606,8 @@ struct hci_dev *hci_alloc_dev(void)
hdev->esco_type = (ESCO_HV1);
hdev->link_mode = (HCI_LM_ACCEPT);
hdev->io_capability = 0x03; /* No Input No Output */
+ hdev->inq_tx_power = HCI_TX_POWER_INVALID;
+ hdev->adv_tx_power = HCI_TX_POWER_INVALID;
hdev->sniff_max_interval = 800;
hdev->sniff_min_interval = 80;