aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-01-04 05:08:51 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-07 22:40:05 -0500
commit2aeb9a1ae0e34fb46cb78b82f827a6a54ab65111 (patch)
tree3b308a5687cedc350cd562ec0ea7b1bf73e184ff /include/net/bluetooth
parentc542a06c29acbf4ea0024884a198065a10613147 (diff)
Bluetooth: Implement UUID handling through the management interface
This patch adds methods to the management interface for userspace to notify the kernel of which services have been registered for specific adapters. This information is needed for setting the appropriate Class of Device value as well as the Extended Inquiry Response value. This patch doesn't actually implement setting of these values but just provides the storage of the UUIDs so the needed functionality can be built on top of it. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/hci_core.h10
-rw-r--r--include/net/bluetooth/mgmt.h12
2 files changed, 22 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index ba3dbe3188ed..8ee0b8bac77c 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -66,6 +66,12 @@ struct bdaddr_list {
66 struct list_head list; 66 struct list_head list;
67 bdaddr_t bdaddr; 67 bdaddr_t bdaddr;
68}; 68};
69
70struct bt_uuid {
71 struct list_head list;
72 u8 uuid[16];
73};
74
69#define NUM_REASSEMBLY 4 75#define NUM_REASSEMBLY 4
70struct hci_dev { 76struct hci_dev {
71 struct list_head list; 77 struct list_head list;
@@ -139,6 +145,8 @@ struct hci_dev {
139 struct hci_conn_hash conn_hash; 145 struct hci_conn_hash conn_hash;
140 struct list_head blacklist; 146 struct list_head blacklist;
141 147
148 struct list_head uuids;
149
142 struct hci_dev_stats stat; 150 struct hci_dev_stats stat;
143 151
144 struct sk_buff_head driver_init; 152 struct sk_buff_head driver_init;
@@ -441,6 +449,8 @@ int hci_inquiry(void __user *arg);
441struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr); 449struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr);
442int hci_blacklist_clear(struct hci_dev *hdev); 450int hci_blacklist_clear(struct hci_dev *hdev);
443 451
452int hci_uuids_clear(struct hci_dev *hdev);
453
444void hci_del_off_timer(struct hci_dev *hdev); 454void hci_del_off_timer(struct hci_dev *hdev);
445 455
446void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); 456void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb);
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index a554802291ed..c118ad3af332 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -72,6 +72,18 @@ struct mgmt_mode {
72 72
73#define MGMT_OP_SET_PAIRABLE 0x0008 73#define MGMT_OP_SET_PAIRABLE 0x0008
74 74
75#define MGMT_OP_ADD_UUID 0x0009
76struct mgmt_cp_add_uuid {
77 __le16 index;
78 __u8 uuid[16];
79} __packed;
80
81#define MGMT_OP_REMOVE_UUID 0x000A
82struct mgmt_cp_remove_uuid {
83 __le16 index;
84 __u8 uuid[16];
85} __packed;
86
75#define MGMT_EV_CMD_COMPLETE 0x0001 87#define MGMT_EV_CMD_COMPLETE 0x0001
76struct mgmt_ev_cmd_complete { 88struct mgmt_ev_cmd_complete {
77 __le16 opcode; 89 __le16 opcode;