diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2012-11-07 19:22:59 -0500 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.co.uk> | 2012-11-18 20:03:00 -0500 |
commit | bbaf444a89dd7dd7effd8ed2f4e4ec64da3cc1da (patch) | |
tree | cc265122c83264b509353adad12d6dfe917f27c5 /net/bluetooth/hci_core.c | |
parent | 57527f8d4d71b5167a02fb6713857f55d3974748 (diff) |
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.c | 2 |
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) | |||
1606 | hdev->esco_type = (ESCO_HV1); | 1606 | hdev->esco_type = (ESCO_HV1); |
1607 | hdev->link_mode = (HCI_LM_ACCEPT); | 1607 | hdev->link_mode = (HCI_LM_ACCEPT); |
1608 | hdev->io_capability = 0x03; /* No Input No Output */ | 1608 | hdev->io_capability = 0x03; /* No Input No Output */ |
1609 | hdev->inq_tx_power = HCI_TX_POWER_INVALID; | ||
1610 | hdev->adv_tx_power = HCI_TX_POWER_INVALID; | ||
1609 | 1611 | ||
1610 | hdev->sniff_max_interval = 800; | 1612 | hdev->sniff_max_interval = 800; |
1611 | hdev->sniff_min_interval = 80; | 1613 | hdev->sniff_min_interval = 80; |