diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2012-03-11 22:32:12 -0400 |
---|---|---|
committer | Gustavo Padovan <gustavo@padovan.org> | 2012-05-08 23:41:30 -0400 |
commit | 2b9be137b70bef9ec7835d83e225d8b35ba9c7ae (patch) | |
tree | 596f3ca1945aadf68898174dff2150ef80ac134c | |
parent | 91c4e9b1ac595f83681c9a9de691e0f30eeafb44 (diff) |
Bluetooth: Handle EIR tags for Device ID
The Device ID information can be provided via Extended Inquiry Data
as well. If a valid source is present, then include it.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
-rw-r--r-- | include/net/bluetooth/hci_core.h | 4 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index ce09bf1592e2..c8e24a9b176c 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -159,6 +159,10 @@ struct hci_dev { | |||
159 | __u16 voice_setting; | 159 | __u16 voice_setting; |
160 | __u8 io_capability; | 160 | __u8 io_capability; |
161 | __s8 inq_tx_power; | 161 | __s8 inq_tx_power; |
162 | __u16 devid_source; | ||
163 | __u16 devid_vendor; | ||
164 | __u16 devid_product; | ||
165 | __u16 devid_version; | ||
162 | 166 | ||
163 | __u16 pkt_type; | 167 | __u16 pkt_type; |
164 | __u16 esco_type; | 168 | __u16 esco_type; |
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 02b89e299ff8..1da458d9b5ca 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -488,6 +488,19 @@ static void create_eir(struct hci_dev *hdev, u8 *data) | |||
488 | ptr += 3; | 488 | ptr += 3; |
489 | } | 489 | } |
490 | 490 | ||
491 | if (hdev->devid_source > 0) { | ||
492 | ptr[0] = 9; | ||
493 | ptr[1] = EIR_DEVICE_ID; | ||
494 | |||
495 | put_unaligned_le16(hdev->devid_source, ptr + 2); | ||
496 | put_unaligned_le16(hdev->devid_vendor, ptr + 4); | ||
497 | put_unaligned_le16(hdev->devid_product, ptr + 6); | ||
498 | put_unaligned_le16(hdev->devid_version, ptr + 8); | ||
499 | |||
500 | eir_len += 10; | ||
501 | ptr += 10; | ||
502 | } | ||
503 | |||
491 | memset(uuid16_list, 0, sizeof(uuid16_list)); | 504 | memset(uuid16_list, 0, sizeof(uuid16_list)); |
492 | 505 | ||
493 | /* Group all UUID16 types */ | 506 | /* Group all UUID16 types */ |