提交 2b9be137 编写于 作者: M Marcel Holtmann 提交者: Gustavo Padovan

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: NMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
上级 91c4e9b1
...@@ -159,6 +159,10 @@ struct hci_dev { ...@@ -159,6 +159,10 @@ struct hci_dev {
__u16 voice_setting; __u16 voice_setting;
__u8 io_capability; __u8 io_capability;
__s8 inq_tx_power; __s8 inq_tx_power;
__u16 devid_source;
__u16 devid_vendor;
__u16 devid_product;
__u16 devid_version;
__u16 pkt_type; __u16 pkt_type;
__u16 esco_type; __u16 esco_type;
......
...@@ -488,6 +488,19 @@ static void create_eir(struct hci_dev *hdev, u8 *data) ...@@ -488,6 +488,19 @@ static void create_eir(struct hci_dev *hdev, u8 *data)
ptr += 3; 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)); memset(uuid16_list, 0, sizeof(uuid16_list));
/* Group all UUID16 types */ /* Group all UUID16 types */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册