projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cecbf3e
)
Bluetooth: Add appearance to default scan rsp data
author
Michał Narajowski
<
[email protected]
>
Wed, 5 Oct 2016 10:28:26 +0000
(12:28 +0200)
committer
Marcel Holtmann
<
[email protected]
>
Thu, 6 Oct 2016 09:52:29 +0000
(11:52 +0200)
Add appearance value to beginning of scan rsp data for
default advertising instance if the value is not 0.
Signed-off-by: Michał Narajowski <
[email protected]
>
Signed-off-by: Marcel Holtmann <
[email protected]
>
net/bluetooth/hci_request.c
patch
|
blob
|
history
diff --git
a/net/bluetooth/hci_request.c
b/net/bluetooth/hci_request.c
index fd6406df8a073f548e54d4fe3c3a5aff94605178..3c44c54a056f55abcc7b2eff6ba33ac6c26d7534 100644
(file)
--- a/
net/bluetooth/hci_request.c
+++ b/
net/bluetooth/hci_request.c
@@
-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)
{
- 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,