Commit 7ddb30c7 authored by Michał Narajowski's avatar Michał Narajowski Committed by Marcel Holtmann

Bluetooth: Add appearance to default scan rsp data

Add appearance value to beginning of scan rsp data for
default advertising instance if the value is not 0.
Signed-off-by: default avatarMichał Narajowski <michal.narajowski@codecoup.pl>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent cecbf3e9
...@@ -1022,7 +1022,16 @@ static u8 append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len) ...@@ -1022,7 +1022,16 @@ static u8 append_local_name(struct hci_dev *hdev, u8 *ptr, u8 ad_len)
static u8 create_default_scan_rsp_data(struct hci_dev *hdev, u8 *ptr) static u8 create_default_scan_rsp_data(struct hci_dev *hdev, u8 *ptr)
{ {
return append_local_name(hdev, ptr, 0); u8 scan_rsp_len = 0;
if (hdev->appearance) {
ptr[0] = 3;
ptr[1] = EIR_APPEARANCE;
put_unaligned_le16(hdev->appearance, ptr + 2);
scan_rsp_len += 4;
}
return append_local_name(hdev, ptr + scan_rsp_len, scan_rsp_len);
} }
static u8 create_instance_scan_rsp_data(struct hci_dev *hdev, u8 instance, static u8 create_instance_scan_rsp_data(struct hci_dev *hdev, u8 instance,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment