diff options
-rw-r--r-- | include/net/bluetooth/hci.h | 3 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 2 | ||||
-rw-r--r-- | net/bluetooth/hci_event.c | 2 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 2 |
4 files changed, 8 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 6c414f4302fe..344fea0a7244 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -319,6 +319,9 @@ enum { | |||
319 | #define HCI_FLOW_CTL_MODE_PACKET_BASED 0x00 | 319 | #define HCI_FLOW_CTL_MODE_PACKET_BASED 0x00 |
320 | #define HCI_FLOW_CTL_MODE_BLOCK_BASED 0x01 | 320 | #define HCI_FLOW_CTL_MODE_BLOCK_BASED 0x01 |
321 | 321 | ||
322 | /* The core spec defines 127 as the "not available" value */ | ||
323 | #define HCI_TX_POWER_INVALID 127 | ||
324 | |||
322 | /* Extended Inquiry Response field types */ | 325 | /* Extended Inquiry Response field types */ |
323 | #define EIR_FLAGS 0x01 /* flags */ | 326 | #define EIR_FLAGS 0x01 /* flags */ |
324 | #define EIR_UUID16_SOME 0x02 /* 16-bit UUID, more available */ | 327 | #define EIR_UUID16_SOME 0x02 /* 16-bit UUID, more available */ |
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; |
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index c08ac7c03711..09c65712e8cc 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c | |||
@@ -202,6 +202,8 @@ static void hci_cc_reset(struct hci_dev *hdev, struct sk_buff *skb) | |||
202 | BIT(HCI_PERIODIC_INQ)); | 202 | BIT(HCI_PERIODIC_INQ)); |
203 | 203 | ||
204 | hdev->discovery.state = DISCOVERY_STOPPED; | 204 | hdev->discovery.state = DISCOVERY_STOPPED; |
205 | hdev->inq_tx_power = HCI_TX_POWER_INVALID; | ||
206 | hdev->adv_tx_power = HCI_TX_POWER_INVALID; | ||
205 | } | 207 | } |
206 | 208 | ||
207 | static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb) | 209 | static void hci_cc_write_local_name(struct hci_dev *hdev, struct sk_buff *skb) |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index a1a62baaaafb..dedbb1d8b2d2 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -484,7 +484,7 @@ static void create_eir(struct hci_dev *hdev, u8 *data) | |||
484 | ptr += (name_len + 2); | 484 | ptr += (name_len + 2); |
485 | } | 485 | } |
486 | 486 | ||
487 | if (hdev->inq_tx_power) { | 487 | if (hdev->inq_tx_power != HCI_TX_POWER_INVALID) { |
488 | ptr[0] = 2; | 488 | ptr[0] = 2; |
489 | ptr[1] = EIR_TX_POWER; | 489 | ptr[1] = EIR_TX_POWER; |
490 | ptr[2] = (u8) hdev->inq_tx_power; | 490 | ptr[2] = (u8) hdev->inq_tx_power; |