aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2010-12-07 17:21:05 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2010-12-07 19:59:54 -0500
commitc02178d22b3ef2d18c38c96151600ee1c7ed94f0 (patch)
treea375c07e3977dcf295edb65bf404820e8af305c9 /include/net
parentff2109f5f94ff75f45e0c8d2d1d56fefdf20733f (diff)
Bluetooth: Add Bluetooth Management interface definitions
Add initial definitions for the new Bluetooth Management interface to the bluetooth headers. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/bluetooth/hci.h4
-rw-r--r--include/net/bluetooth/hci_core.h1
-rw-r--r--include/net/bluetooth/mgmt.h46
3 files changed, 51 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index f3c5ed6d7bda..29a7a8ca0438 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -934,9 +934,13 @@ static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb)
934struct sockaddr_hci { 934struct sockaddr_hci {
935 sa_family_t hci_family; 935 sa_family_t hci_family;
936 unsigned short hci_dev; 936 unsigned short hci_dev;
937 unsigned short hci_channel;
937}; 938};
938#define HCI_DEV_NONE 0xffff 939#define HCI_DEV_NONE 0xffff
939 940
941#define HCI_CHANNEL_RAW 0
942#define HCI_CHANNEL_CONTROL 1
943
940struct hci_filter { 944struct hci_filter {
941 unsigned long type_mask; 945 unsigned long type_mask;
942 unsigned long event_mask[2]; 946 unsigned long event_mask[2];
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 9c08625617a1..3e3435945980 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -668,6 +668,7 @@ struct hci_pinfo {
668 struct hci_dev *hdev; 668 struct hci_dev *hdev;
669 struct hci_filter filter; 669 struct hci_filter filter;
670 __u32 cmsg_mask; 670 __u32 cmsg_mask;
671 unsigned short channel;
671}; 672};
672 673
673/* HCI security filter */ 674/* HCI security filter */
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
new file mode 100644
index 000000000000..95974daa725e
--- /dev/null
+++ b/include/net/bluetooth/mgmt.h
@@ -0,0 +1,46 @@
1/*
2 BlueZ - Bluetooth protocol stack for Linux
3
4 Copyright (C) 2010 Nokia Corporation
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License version 2 as
8 published by the Free Software Foundation;
9
10 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
13 IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY
14 CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES
15 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
19 ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS,
20 COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS
21 SOFTWARE IS DISCLAIMED.
22*/
23
24struct mgmt_hdr {
25 __le16 opcode;
26 __le16 len;
27} __packed;
28#define MGMT_HDR_SIZE 4
29
30#define MGMT_EV_CMD_COMPLETE 0x0001
31struct mgmt_ev_cmd_complete {
32 __le16 opcode;
33 __u8 data[0];
34} __packed;
35
36#define MGMT_EV_CMD_STATUS 0x0002
37struct mgmt_ev_cmd_status {
38 __u8 status;
39 __le16 opcode;
40} __packed;
41
42#define MGMT_EV_CONTROLLER_ERROR 0x0003
43struct mgmt_ev_controller_error {
44 __le16 index;
45 __u8 error_code;
46} __packed;