aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorMichał Narajowski <michal.narajowski@codecoup.pl>2016-09-18 06:50:03 -0400
committerMarcel Holtmann <marcel@holtmann.org>2016-09-19 14:19:34 -0400
commitc4960ecf2b09210930964ef2c05ce2590802ccf4 (patch)
tree9e9b497d8ddcf7f2aed5b1ada5735d40837429ef /include/net/bluetooth
parent7c295c4801b2de24fc25687eb0cb73cf0c99d114 (diff)
Bluetooth: Add support for appearance in scan rsp
This patch enables prepending appearance value to scan response data. It also adds support for setting appearance value through mgmt command. If currently advertised instance has apperance flag set it is expired immediately. Signed-off-by: Michał Narajowski <michal.narajowski@codecoup.pl> Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/hci_core.h1
-rw-r--r--include/net/bluetooth/mgmt.h6
2 files changed, 7 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index a48f71d73dc8..f00bf667ec33 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -211,6 +211,7 @@ struct hci_dev {
211 __u8 dev_name[HCI_MAX_NAME_LENGTH]; 211 __u8 dev_name[HCI_MAX_NAME_LENGTH];
212 __u8 short_name[HCI_MAX_SHORT_NAME_LENGTH]; 212 __u8 short_name[HCI_MAX_SHORT_NAME_LENGTH];
213 __u8 eir[HCI_MAX_EIR_LENGTH]; 213 __u8 eir[HCI_MAX_EIR_LENGTH];
214 __u16 appearance;
214 __u8 dev_class[3]; 215 __u8 dev_class[3];
215 __u8 major_class; 216 __u8 major_class;
216 __u8 minor_class; 217 __u8 minor_class;
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 611b243713ea..72a456bbbcd5 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -598,6 +598,12 @@ struct mgmt_rp_read_ext_info {
598 __u8 eir[0]; 598 __u8 eir[0];
599} __packed; 599} __packed;
600 600
601#define MGMT_OP_SET_APPEARANCE 0x0043
602struct mgmt_cp_set_appearance {
603 __u16 appearance;
604} __packed;
605#define MGMT_SET_APPEARANCE_SIZE 2
606
601#define MGMT_EV_CMD_COMPLETE 0x0001 607#define MGMT_EV_CMD_COMPLETE 0x0001
602struct mgmt_ev_cmd_complete { 608struct mgmt_ev_cmd_complete {
603 __le16 opcode; 609 __le16 opcode;