diff options
author | David S. Miller <davem@davemloft.net> | 2009-06-11 08:47:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-11 08:47:43 -0400 |
commit | bb400801c2f40bbd9a688818323ad09abfc4e581 (patch) | |
tree | bf23baef0cdc7590b73a53e6b1e88565ba455cf1 /include | |
parent | 130aa61a77b8518f1ea618e1b7d214d60b405f10 (diff) | |
parent | 611b30f74b5d8ca036a9923b3bf6e0ee10a21a53 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 6 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 2 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 71 |
3 files changed, 52 insertions, 27 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 144d1d5dd82f..968166a45f86 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -81,12 +81,6 @@ enum { | |||
81 | BT_CLOSED | 81 | BT_CLOSED |
82 | }; | 82 | }; |
83 | 83 | ||
84 | /* Endianness conversions */ | ||
85 | #define htobs(a) __cpu_to_le16(a) | ||
86 | #define htobl(a) __cpu_to_le32(a) | ||
87 | #define btohs(a) __le16_to_cpu(a) | ||
88 | #define btohl(a) __le32_to_cpu(a) | ||
89 | |||
90 | /* BD Address */ | 84 | /* BD Address */ |
91 | typedef struct { | 85 | typedef struct { |
92 | __u8 b[6]; | 86 | __u8 b[6]; |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 73aead222b32..c4ca4228b083 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -137,6 +137,8 @@ struct hci_dev { | |||
137 | struct device *parent; | 137 | struct device *parent; |
138 | struct device dev; | 138 | struct device dev; |
139 | 139 | ||
140 | struct rfkill *rfkill; | ||
141 | |||
140 | struct module *owner; | 142 | struct module *owner; |
141 | 143 | ||
142 | int (*open)(struct hci_dev *hdev); | 144 | int (*open)(struct hci_dev *hdev); |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index f566aa1f0a4c..e919fca1072a 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -26,8 +26,13 @@ | |||
26 | #define __L2CAP_H | 26 | #define __L2CAP_H |
27 | 27 | ||
28 | /* L2CAP defaults */ | 28 | /* L2CAP defaults */ |
29 | #define L2CAP_DEFAULT_MTU 672 | 29 | #define L2CAP_DEFAULT_MTU 672 |
30 | #define L2CAP_DEFAULT_FLUSH_TO 0xFFFF | 30 | #define L2CAP_DEFAULT_FLUSH_TO 0xffff |
31 | #define L2CAP_DEFAULT_RX_WINDOW 1 | ||
32 | #define L2CAP_DEFAULT_MAX_RECEIVE 1 | ||
33 | #define L2CAP_DEFAULT_RETRANS_TO 300 /* 300 milliseconds */ | ||
34 | #define L2CAP_DEFAULT_MONITOR_TO 1000 /* 1 second */ | ||
35 | #define L2CAP_DEFAULT_MAX_RX_APDU 0xfff7 | ||
31 | 36 | ||
32 | #define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ | 37 | #define L2CAP_CONN_TIMEOUT (40000) /* 40 seconds */ |
33 | #define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ | 38 | #define L2CAP_INFO_TIMEOUT (4000) /* 4 seconds */ |
@@ -64,17 +69,29 @@ struct l2cap_conninfo { | |||
64 | #define L2CAP_LM_SECURE 0x0020 | 69 | #define L2CAP_LM_SECURE 0x0020 |
65 | 70 | ||
66 | /* L2CAP command codes */ | 71 | /* L2CAP command codes */ |
67 | #define L2CAP_COMMAND_REJ 0x01 | 72 | #define L2CAP_COMMAND_REJ 0x01 |
68 | #define L2CAP_CONN_REQ 0x02 | 73 | #define L2CAP_CONN_REQ 0x02 |
69 | #define L2CAP_CONN_RSP 0x03 | 74 | #define L2CAP_CONN_RSP 0x03 |
70 | #define L2CAP_CONF_REQ 0x04 | 75 | #define L2CAP_CONF_REQ 0x04 |
71 | #define L2CAP_CONF_RSP 0x05 | 76 | #define L2CAP_CONF_RSP 0x05 |
72 | #define L2CAP_DISCONN_REQ 0x06 | 77 | #define L2CAP_DISCONN_REQ 0x06 |
73 | #define L2CAP_DISCONN_RSP 0x07 | 78 | #define L2CAP_DISCONN_RSP 0x07 |
74 | #define L2CAP_ECHO_REQ 0x08 | 79 | #define L2CAP_ECHO_REQ 0x08 |
75 | #define L2CAP_ECHO_RSP 0x09 | 80 | #define L2CAP_ECHO_RSP 0x09 |
76 | #define L2CAP_INFO_REQ 0x0a | 81 | #define L2CAP_INFO_REQ 0x0a |
77 | #define L2CAP_INFO_RSP 0x0b | 82 | #define L2CAP_INFO_RSP 0x0b |
83 | |||
84 | /* L2CAP feature mask */ | ||
85 | #define L2CAP_FEAT_FLOWCTL 0x00000001 | ||
86 | #define L2CAP_FEAT_RETRANS 0x00000002 | ||
87 | #define L2CAP_FEAT_ERTM 0x00000008 | ||
88 | #define L2CAP_FEAT_STREAMING 0x00000010 | ||
89 | #define L2CAP_FEAT_FCS 0x00000020 | ||
90 | #define L2CAP_FEAT_FIXED_CHAN 0x00000080 | ||
91 | |||
92 | /* L2CAP checksum option */ | ||
93 | #define L2CAP_FCS_NONE 0x00 | ||
94 | #define L2CAP_FCS_CRC16 0x01 | ||
78 | 95 | ||
79 | /* L2CAP structures */ | 96 | /* L2CAP structures */ |
80 | struct l2cap_hdr { | 97 | struct l2cap_hdr { |
@@ -106,17 +123,23 @@ struct l2cap_conn_rsp { | |||
106 | __le16 status; | 123 | __le16 status; |
107 | } __attribute__ ((packed)); | 124 | } __attribute__ ((packed)); |
108 | 125 | ||
126 | /* channel indentifier */ | ||
127 | #define L2CAP_CID_SIGNALING 0x0001 | ||
128 | #define L2CAP_CID_CONN_LESS 0x0002 | ||
129 | #define L2CAP_CID_DYN_START 0x0040 | ||
130 | #define L2CAP_CID_DYN_END 0xffff | ||
131 | |||
109 | /* connect result */ | 132 | /* connect result */ |
110 | #define L2CAP_CR_SUCCESS 0x0000 | 133 | #define L2CAP_CR_SUCCESS 0x0000 |
111 | #define L2CAP_CR_PEND 0x0001 | 134 | #define L2CAP_CR_PEND 0x0001 |
112 | #define L2CAP_CR_BAD_PSM 0x0002 | 135 | #define L2CAP_CR_BAD_PSM 0x0002 |
113 | #define L2CAP_CR_SEC_BLOCK 0x0003 | 136 | #define L2CAP_CR_SEC_BLOCK 0x0003 |
114 | #define L2CAP_CR_NO_MEM 0x0004 | 137 | #define L2CAP_CR_NO_MEM 0x0004 |
115 | 138 | ||
116 | /* connect status */ | 139 | /* connect status */ |
117 | #define L2CAP_CS_NO_INFO 0x0000 | 140 | #define L2CAP_CS_NO_INFO 0x0000 |
118 | #define L2CAP_CS_AUTHEN_PEND 0x0001 | 141 | #define L2CAP_CS_AUTHEN_PEND 0x0001 |
119 | #define L2CAP_CS_AUTHOR_PEND 0x0002 | 142 | #define L2CAP_CS_AUTHOR_PEND 0x0002 |
120 | 143 | ||
121 | struct l2cap_conf_req { | 144 | struct l2cap_conf_req { |
122 | __le16 dcid; | 145 | __le16 dcid; |
@@ -143,10 +166,14 @@ struct l2cap_conf_opt { | |||
143 | } __attribute__ ((packed)); | 166 | } __attribute__ ((packed)); |
144 | #define L2CAP_CONF_OPT_SIZE 2 | 167 | #define L2CAP_CONF_OPT_SIZE 2 |
145 | 168 | ||
169 | #define L2CAP_CONF_HINT 0x80 | ||
170 | #define L2CAP_CONF_MASK 0x7f | ||
171 | |||
146 | #define L2CAP_CONF_MTU 0x01 | 172 | #define L2CAP_CONF_MTU 0x01 |
147 | #define L2CAP_CONF_FLUSH_TO 0x02 | 173 | #define L2CAP_CONF_FLUSH_TO 0x02 |
148 | #define L2CAP_CONF_QOS 0x03 | 174 | #define L2CAP_CONF_QOS 0x03 |
149 | #define L2CAP_CONF_RFC 0x04 | 175 | #define L2CAP_CONF_RFC 0x04 |
176 | #define L2CAP_CONF_FCS 0x05 | ||
150 | 177 | ||
151 | #define L2CAP_CONF_MAX_SIZE 22 | 178 | #define L2CAP_CONF_MAX_SIZE 22 |
152 | 179 | ||
@@ -162,6 +189,8 @@ struct l2cap_conf_rfc { | |||
162 | #define L2CAP_MODE_BASIC 0x00 | 189 | #define L2CAP_MODE_BASIC 0x00 |
163 | #define L2CAP_MODE_RETRANS 0x01 | 190 | #define L2CAP_MODE_RETRANS 0x01 |
164 | #define L2CAP_MODE_FLOWCTL 0x02 | 191 | #define L2CAP_MODE_FLOWCTL 0x02 |
192 | #define L2CAP_MODE_ERTM 0x03 | ||
193 | #define L2CAP_MODE_STREAM 0x04 | ||
165 | 194 | ||
166 | struct l2cap_disconn_req { | 195 | struct l2cap_disconn_req { |
167 | __le16 dcid; | 196 | __le16 dcid; |