Skip to contentSkip to conversation

Bluetooth: Handle EIR tags for Device ID

PATCH Applied Marcel Holtmann 2 participants 2 messages Mar 12, 2012 – Mar 16, 2012

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 1/1 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.

---
 include/net/bluetooth/hci_core.h |    4 ++++
 net/bluetooth/mgmt.c             |   13 +++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)
include/net/bluetooth/hci_core.h +4 -0
index 0db4f80..b7106f9 100644
@@ -159,6 +159,10 @@ struct hci_dev {
 	__u16		voice_setting;
 	__u8		io_capability;
 	__s8		inq_tx_power;
+	__u16		devid_source;
+	__u16		devid_vendor;
+	__u16		devid_product;
+	__u16		devid_version;
 
 	__u16		pkt_type;
 	__u16		esco_type;
net/bluetooth/mgmt.c +13 -0
index 32f6e29..6fb1418 100644
@@ -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 */
Signature · 1 line
1.7.7.6
#1 lore raw

Hi Marcel,

Quoted 8 lines · Marcel Holtmann

The Device ID information can be provided via Extended Inquiry Data as well. If a valid source is present, then include it.

---
 include/net/bluetooth/hci_core.h |    4 ++++
 net/bluetooth/mgmt.c             |   13 +++++++++++++
 2 files changed, 17 insertions(+), 0 deletions(-)

Applied to my bluetooth-next tree. Thanks.

Johan