summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-03-11 19:32:12 -0700
committerGustavo Padovan <gustavo@padovan.org>2012-05-09 00:41:30 -0300
commit2b9be137b70bef9ec7835d83e225d8b35ba9c7ae (patch)
tree596f3ca1945aadf68898174dff2150ef80ac134c /net/bluetooth/mgmt.c
parent91c4e9b1ac595f83681c9a9de691e0f30eeafb44 (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>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 02b89e299ff..1da458d9b5c 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)
ptr += 3;
}
+ if (hdev->devid_source > 0) {
+ ptr[0] = 9;
+ ptr[1] = EIR_DEVICE_ID;
+
+ put_unaligned_le16(hdev->devid_source, ptr + 2);
+ put_unaligned_le16(hdev->devid_vendor, ptr + 4);
+ put_unaligned_le16(hdev->devid_product, ptr + 6);
+ put_unaligned_le16(hdev->devid_version, ptr + 8);
+
+ eir_len += 10;
+ ptr += 10;
+ }
+
memset(uuid16_list, 0, sizeof(uuid16_list));
/* Group all UUID16 types */