diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2011-12-14 17:47:40 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-12-18 14:42:37 -0500 |
commit | f71d5a255f047b0ae97c5fa3e78c11ef6ef33b90 (patch) | |
tree | b9037ba6b7e6b6c090bb831c49e41e8530206dae /include/net/bluetooth/mgmt.h | |
parent | 7d78525dcf5c6fe5e6e73d22776ed5f960e3153e (diff) |
Bluetooth: Update ordering and opcodes of mgmt messages
This patch updates the ordering and opcodes of mgmt messages to match
the latest API specification.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net/bluetooth/mgmt.h')
-rw-r--r-- | include/net/bluetooth/mgmt.h | 147 |
1 files changed, 81 insertions, 66 deletions
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index bdb0a581149c..2b1059d64541 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
@@ -100,27 +100,40 @@ struct mgmt_cp_set_discoverable { | |||
100 | 100 | ||
101 | #define MGMT_OP_SET_CONNECTABLE 0x0007 | 101 | #define MGMT_OP_SET_CONNECTABLE 0x0007 |
102 | 102 | ||
103 | #define MGMT_OP_SET_FAST_CONNECTABLE 0x001F | 103 | #define MGMT_OP_SET_FAST_CONNECTABLE 0x0008 |
104 | 104 | ||
105 | #define MGMT_OP_SET_PAIRABLE 0x0008 | 105 | #define MGMT_OP_SET_PAIRABLE 0x0009 |
106 | 106 | ||
107 | #define MGMT_OP_ADD_UUID 0x0009 | 107 | #define MGMT_OP_SET_LINK_SECURITY 0x000A |
108 | |||
109 | #define MGMT_OP_SET_SSP 0x000B | ||
110 | |||
111 | #define MGMT_OP_SET_HS 0x000C | ||
112 | |||
113 | #define MGMT_OP_SET_LE 0x000D | ||
114 | |||
115 | #define MGMT_OP_SET_DEV_CLASS 0x000E | ||
116 | struct mgmt_cp_set_dev_class { | ||
117 | __u8 major; | ||
118 | __u8 minor; | ||
119 | } __packed; | ||
120 | |||
121 | #define MGMT_OP_SET_LOCAL_NAME 0x000F | ||
122 | struct mgmt_cp_set_local_name { | ||
123 | __u8 name[MGMT_MAX_NAME_LENGTH]; | ||
124 | } __packed; | ||
125 | |||
126 | #define MGMT_OP_ADD_UUID 0x0010 | ||
108 | struct mgmt_cp_add_uuid { | 127 | struct mgmt_cp_add_uuid { |
109 | __u8 uuid[16]; | 128 | __u8 uuid[16]; |
110 | __u8 svc_hint; | 129 | __u8 svc_hint; |
111 | } __packed; | 130 | } __packed; |
112 | 131 | ||
113 | #define MGMT_OP_REMOVE_UUID 0x000A | 132 | #define MGMT_OP_REMOVE_UUID 0x0011 |
114 | struct mgmt_cp_remove_uuid { | 133 | struct mgmt_cp_remove_uuid { |
115 | __u8 uuid[16]; | 134 | __u8 uuid[16]; |
116 | } __packed; | 135 | } __packed; |
117 | 136 | ||
118 | #define MGMT_OP_SET_DEV_CLASS 0x000B | ||
119 | struct mgmt_cp_set_dev_class { | ||
120 | __u8 major; | ||
121 | __u8 minor; | ||
122 | } __packed; | ||
123 | |||
124 | struct mgmt_link_key_info { | 137 | struct mgmt_link_key_info { |
125 | bdaddr_t bdaddr; | 138 | bdaddr_t bdaddr; |
126 | u8 type; | 139 | u8 type; |
@@ -128,14 +141,14 @@ struct mgmt_link_key_info { | |||
128 | u8 pin_len; | 141 | u8 pin_len; |
129 | } __packed; | 142 | } __packed; |
130 | 143 | ||
131 | #define MGMT_OP_LOAD_LINK_KEYS 0x000D | 144 | #define MGMT_OP_LOAD_LINK_KEYS 0x0012 |
132 | struct mgmt_cp_load_link_keys { | 145 | struct mgmt_cp_load_link_keys { |
133 | __u8 debug_keys; | 146 | __u8 debug_keys; |
134 | __le16 key_count; | 147 | __le16 key_count; |
135 | struct mgmt_link_key_info keys[0]; | 148 | struct mgmt_link_key_info keys[0]; |
136 | } __packed; | 149 | } __packed; |
137 | 150 | ||
138 | #define MGMT_OP_REMOVE_KEYS 0x000E | 151 | #define MGMT_OP_REMOVE_KEYS 0x0013 |
139 | struct mgmt_cp_remove_keys { | 152 | struct mgmt_cp_remove_keys { |
140 | bdaddr_t bdaddr; | 153 | bdaddr_t bdaddr; |
141 | __u8 disconnect; | 154 | __u8 disconnect; |
@@ -145,7 +158,7 @@ struct mgmt_rp_remove_keys { | |||
145 | __u8 status; | 158 | __u8 status; |
146 | }; | 159 | }; |
147 | 160 | ||
148 | #define MGMT_OP_DISCONNECT 0x000F | 161 | #define MGMT_OP_DISCONNECT 0x0014 |
149 | struct mgmt_cp_disconnect { | 162 | struct mgmt_cp_disconnect { |
150 | bdaddr_t bdaddr; | 163 | bdaddr_t bdaddr; |
151 | } __packed; | 164 | } __packed; |
@@ -164,13 +177,13 @@ struct mgmt_addr_info { | |||
164 | __u8 type; | 177 | __u8 type; |
165 | } __packed; | 178 | } __packed; |
166 | 179 | ||
167 | #define MGMT_OP_GET_CONNECTIONS 0x0010 | 180 | #define MGMT_OP_GET_CONNECTIONS 0x0015 |
168 | struct mgmt_rp_get_connections { | 181 | struct mgmt_rp_get_connections { |
169 | __le16 conn_count; | 182 | __le16 conn_count; |
170 | struct mgmt_addr_info addr[0]; | 183 | struct mgmt_addr_info addr[0]; |
171 | } __packed; | 184 | } __packed; |
172 | 185 | ||
173 | #define MGMT_OP_PIN_CODE_REPLY 0x0011 | 186 | #define MGMT_OP_PIN_CODE_REPLY 0x0016 |
174 | struct mgmt_cp_pin_code_reply { | 187 | struct mgmt_cp_pin_code_reply { |
175 | bdaddr_t bdaddr; | 188 | bdaddr_t bdaddr; |
176 | __u8 pin_len; | 189 | __u8 pin_len; |
@@ -181,17 +194,17 @@ struct mgmt_rp_pin_code_reply { | |||
181 | uint8_t status; | 194 | uint8_t status; |
182 | } __packed; | 195 | } __packed; |
183 | 196 | ||
184 | #define MGMT_OP_PIN_CODE_NEG_REPLY 0x0012 | 197 | #define MGMT_OP_PIN_CODE_NEG_REPLY 0x0017 |
185 | struct mgmt_cp_pin_code_neg_reply { | 198 | struct mgmt_cp_pin_code_neg_reply { |
186 | bdaddr_t bdaddr; | 199 | bdaddr_t bdaddr; |
187 | } __packed; | 200 | } __packed; |
188 | 201 | ||
189 | #define MGMT_OP_SET_IO_CAPABILITY 0x0013 | 202 | #define MGMT_OP_SET_IO_CAPABILITY 0x0018 |
190 | struct mgmt_cp_set_io_capability { | 203 | struct mgmt_cp_set_io_capability { |
191 | __u8 io_capability; | 204 | __u8 io_capability; |
192 | } __packed; | 205 | } __packed; |
193 | 206 | ||
194 | #define MGMT_OP_PAIR_DEVICE 0x0014 | 207 | #define MGMT_OP_PAIR_DEVICE 0x0019 |
195 | struct mgmt_cp_pair_device { | 208 | struct mgmt_cp_pair_device { |
196 | struct mgmt_addr_info addr; | 209 | struct mgmt_addr_info addr; |
197 | __u8 io_cap; | 210 | __u8 io_cap; |
@@ -201,7 +214,7 @@ struct mgmt_rp_pair_device { | |||
201 | __u8 status; | 214 | __u8 status; |
202 | } __packed; | 215 | } __packed; |
203 | 216 | ||
204 | #define MGMT_OP_USER_CONFIRM_REPLY 0x0015 | 217 | #define MGMT_OP_USER_CONFIRM_REPLY 0x001A |
205 | struct mgmt_cp_user_confirm_reply { | 218 | struct mgmt_cp_user_confirm_reply { |
206 | bdaddr_t bdaddr; | 219 | bdaddr_t bdaddr; |
207 | } __packed; | 220 | } __packed; |
@@ -210,59 +223,61 @@ struct mgmt_rp_user_confirm_reply { | |||
210 | __u8 status; | 223 | __u8 status; |
211 | } __packed; | 224 | } __packed; |
212 | 225 | ||
213 | #define MGMT_OP_USER_CONFIRM_NEG_REPLY 0x0016 | 226 | #define MGMT_OP_USER_CONFIRM_NEG_REPLY 0x001B |
227 | struct mgmt_cp_user_confirm_neg_reply { | ||
228 | bdaddr_t bdaddr; | ||
229 | } __packed; | ||
214 | 230 | ||
215 | #define MGMT_OP_SET_LOCAL_NAME 0x0017 | 231 | #define MGMT_OP_USER_PASSKEY_REPLY 0x001C |
216 | struct mgmt_cp_set_local_name { | 232 | struct mgmt_cp_user_passkey_reply { |
217 | __u8 name[MGMT_MAX_NAME_LENGTH]; | 233 | bdaddr_t bdaddr; |
234 | __le32 passkey; | ||
235 | } __packed; | ||
236 | struct mgmt_rp_user_passkey_reply { | ||
237 | bdaddr_t bdaddr; | ||
238 | __u8 status; | ||
239 | } __packed; | ||
240 | |||
241 | #define MGMT_OP_USER_PASSKEY_NEG_REPLY 0x001D | ||
242 | struct mgmt_cp_user_passkey_neg_reply { | ||
243 | bdaddr_t bdaddr; | ||
218 | } __packed; | 244 | } __packed; |
219 | 245 | ||
220 | #define MGMT_OP_READ_LOCAL_OOB_DATA 0x0018 | 246 | #define MGMT_OP_READ_LOCAL_OOB_DATA 0x001E |
221 | struct mgmt_rp_read_local_oob_data { | 247 | struct mgmt_rp_read_local_oob_data { |
222 | __u8 hash[16]; | 248 | __u8 hash[16]; |
223 | __u8 randomizer[16]; | 249 | __u8 randomizer[16]; |
224 | } __packed; | 250 | } __packed; |
225 | 251 | ||
226 | #define MGMT_OP_ADD_REMOTE_OOB_DATA 0x0019 | 252 | #define MGMT_OP_ADD_REMOTE_OOB_DATA 0x001F |
227 | struct mgmt_cp_add_remote_oob_data { | 253 | struct mgmt_cp_add_remote_oob_data { |
228 | bdaddr_t bdaddr; | 254 | bdaddr_t bdaddr; |
229 | __u8 hash[16]; | 255 | __u8 hash[16]; |
230 | __u8 randomizer[16]; | 256 | __u8 randomizer[16]; |
231 | } __packed; | 257 | } __packed; |
232 | 258 | ||
233 | #define MGMT_OP_REMOVE_REMOTE_OOB_DATA 0x001A | 259 | #define MGMT_OP_REMOVE_REMOTE_OOB_DATA 0x0020 |
234 | struct mgmt_cp_remove_remote_oob_data { | 260 | struct mgmt_cp_remove_remote_oob_data { |
235 | bdaddr_t bdaddr; | 261 | bdaddr_t bdaddr; |
236 | } __packed; | 262 | } __packed; |
237 | 263 | ||
238 | #define MGMT_OP_START_DISCOVERY 0x001B | 264 | #define MGMT_OP_START_DISCOVERY 0x0021 |
239 | struct mgmt_cp_start_discovery { | 265 | struct mgmt_cp_start_discovery { |
240 | __u8 type; | 266 | __u8 type; |
241 | } __packed; | 267 | } __packed; |
242 | 268 | ||
243 | #define MGMT_OP_STOP_DISCOVERY 0x001C | 269 | #define MGMT_OP_STOP_DISCOVERY 0x0022 |
244 | 270 | ||
245 | #define MGMT_OP_BLOCK_DEVICE 0x001D | 271 | #define MGMT_OP_BLOCK_DEVICE 0x0023 |
246 | struct mgmt_cp_block_device { | 272 | struct mgmt_cp_block_device { |
247 | bdaddr_t bdaddr; | 273 | bdaddr_t bdaddr; |
248 | } __packed; | 274 | } __packed; |
249 | 275 | ||
250 | #define MGMT_OP_UNBLOCK_DEVICE 0x001E | 276 | #define MGMT_OP_UNBLOCK_DEVICE 0x0024 |
251 | struct mgmt_cp_unblock_device { | 277 | struct mgmt_cp_unblock_device { |
252 | bdaddr_t bdaddr; | 278 | bdaddr_t bdaddr; |
253 | } __packed; | 279 | } __packed; |
254 | 280 | ||
255 | #define MGMT_OP_USER_PASSKEY_REPLY 0x0020 | ||
256 | struct mgmt_cp_user_passkey_reply { | ||
257 | bdaddr_t bdaddr; | ||
258 | __le32 passkey; | ||
259 | } __packed; | ||
260 | |||
261 | #define MGMT_OP_USER_PASSKEY_NEG_REPLY 0x0021 | ||
262 | struct mgmt_cp_user_passkey_neg_reply { | ||
263 | bdaddr_t bdaddr; | ||
264 | } __packed; | ||
265 | |||
266 | #define MGMT_EV_CMD_COMPLETE 0x0001 | 281 | #define MGMT_EV_CMD_COMPLETE 0x0001 |
267 | struct mgmt_ev_cmd_complete { | 282 | struct mgmt_ev_cmd_complete { |
268 | __le16 opcode; | 283 | __le16 opcode; |
@@ -286,53 +301,58 @@ struct mgmt_ev_controller_error { | |||
286 | 301 | ||
287 | #define MGMT_EV_NEW_SETTINGS 0x0006 | 302 | #define MGMT_EV_NEW_SETTINGS 0x0006 |
288 | 303 | ||
289 | #define MGMT_EV_DISCOVERABLE 0x0007 | 304 | #define MGMT_EV_CLASS_OF_DEV_CHANGED 0x0007 |
290 | 305 | struct mgmt_ev_class_of_dev_changed { | |
291 | #define MGMT_EV_CONNECTABLE 0x0008 | 306 | __u8 dev_class[3]; |
307 | }; | ||
292 | 308 | ||
293 | #define MGMT_EV_PAIRABLE 0x0009 | 309 | #define MGMT_EV_LOCAL_NAME_CHANGED 0x0008 |
310 | struct mgmt_ev_local_name_changed { | ||
311 | __u8 name[MGMT_MAX_NAME_LENGTH]; | ||
312 | __u8 short_name[MGMT_MAX_SHORT_NAME_LENGTH]; | ||
313 | } __packed; | ||
294 | 314 | ||
295 | #define MGMT_EV_NEW_LINK_KEY 0x000A | 315 | #define MGMT_EV_NEW_LINK_KEY 0x0009 |
296 | struct mgmt_ev_new_link_key { | 316 | struct mgmt_ev_new_link_key { |
297 | __u8 store_hint; | 317 | __u8 store_hint; |
298 | struct mgmt_link_key_info key; | 318 | struct mgmt_link_key_info key; |
299 | } __packed; | 319 | } __packed; |
300 | 320 | ||
301 | #define MGMT_EV_CONNECTED 0x000B | 321 | #define MGMT_EV_CONNECTED 0x000A |
302 | 322 | ||
303 | #define MGMT_EV_DISCONNECTED 0x000C | 323 | #define MGMT_EV_DISCONNECTED 0x000B |
304 | 324 | ||
305 | #define MGMT_EV_CONNECT_FAILED 0x000D | 325 | #define MGMT_EV_CONNECT_FAILED 0x000C |
306 | struct mgmt_ev_connect_failed { | 326 | struct mgmt_ev_connect_failed { |
307 | struct mgmt_addr_info addr; | 327 | struct mgmt_addr_info addr; |
308 | __u8 status; | 328 | __u8 status; |
309 | } __packed; | 329 | } __packed; |
310 | 330 | ||
311 | #define MGMT_EV_PIN_CODE_REQUEST 0x000E | 331 | #define MGMT_EV_PIN_CODE_REQUEST 0x000D |
312 | struct mgmt_ev_pin_code_request { | 332 | struct mgmt_ev_pin_code_request { |
313 | bdaddr_t bdaddr; | 333 | bdaddr_t bdaddr; |
314 | __u8 secure; | 334 | __u8 secure; |
315 | } __packed; | 335 | } __packed; |
316 | 336 | ||
317 | #define MGMT_EV_USER_CONFIRM_REQUEST 0x000F | 337 | #define MGMT_EV_USER_CONFIRM_REQUEST 0x000E |
318 | struct mgmt_ev_user_confirm_request { | 338 | struct mgmt_ev_user_confirm_request { |
319 | bdaddr_t bdaddr; | 339 | bdaddr_t bdaddr; |
320 | __u8 confirm_hint; | 340 | __u8 confirm_hint; |
321 | __le32 value; | 341 | __le32 value; |
322 | } __packed; | 342 | } __packed; |
323 | 343 | ||
344 | #define MGMT_EV_USER_PASSKEY_REQUEST 0x000F | ||
345 | struct mgmt_ev_user_passkey_request { | ||
346 | bdaddr_t bdaddr; | ||
347 | } __packed; | ||
348 | |||
324 | #define MGMT_EV_AUTH_FAILED 0x0010 | 349 | #define MGMT_EV_AUTH_FAILED 0x0010 |
325 | struct mgmt_ev_auth_failed { | 350 | struct mgmt_ev_auth_failed { |
326 | bdaddr_t bdaddr; | 351 | bdaddr_t bdaddr; |
327 | __u8 status; | 352 | __u8 status; |
328 | } __packed; | 353 | } __packed; |
329 | 354 | ||
330 | #define MGMT_EV_LOCAL_NAME_CHANGED 0x0011 | 355 | #define MGMT_EV_DEVICE_FOUND 0x0011 |
331 | struct mgmt_ev_local_name_changed { | ||
332 | __u8 name[MGMT_MAX_NAME_LENGTH]; | ||
333 | } __packed; | ||
334 | |||
335 | #define MGMT_EV_DEVICE_FOUND 0x0012 | ||
336 | struct mgmt_ev_device_found { | 356 | struct mgmt_ev_device_found { |
337 | struct mgmt_addr_info addr; | 357 | struct mgmt_addr_info addr; |
338 | __u8 dev_class[3]; | 358 | __u8 dev_class[3]; |
@@ -340,25 +360,20 @@ struct mgmt_ev_device_found { | |||
340 | __u8 eir[HCI_MAX_EIR_LENGTH]; | 360 | __u8 eir[HCI_MAX_EIR_LENGTH]; |
341 | } __packed; | 361 | } __packed; |
342 | 362 | ||
343 | #define MGMT_EV_REMOTE_NAME 0x0013 | 363 | #define MGMT_EV_REMOTE_NAME 0x0012 |
344 | struct mgmt_ev_remote_name { | 364 | struct mgmt_ev_remote_name { |
345 | bdaddr_t bdaddr; | 365 | bdaddr_t bdaddr; |
346 | __u8 name[MGMT_MAX_NAME_LENGTH]; | 366 | __u8 name[MGMT_MAX_NAME_LENGTH]; |
347 | } __packed; | 367 | } __packed; |
348 | 368 | ||
349 | #define MGMT_EV_DISCOVERING 0x0014 | 369 | #define MGMT_EV_DISCOVERING 0x0013 |
350 | 370 | ||
351 | #define MGMT_EV_DEVICE_BLOCKED 0x0015 | 371 | #define MGMT_EV_DEVICE_BLOCKED 0x0014 |
352 | struct mgmt_ev_device_blocked { | 372 | struct mgmt_ev_device_blocked { |
353 | bdaddr_t bdaddr; | 373 | bdaddr_t bdaddr; |
354 | } __packed; | 374 | } __packed; |
355 | 375 | ||
356 | #define MGMT_EV_DEVICE_UNBLOCKED 0x0016 | 376 | #define MGMT_EV_DEVICE_UNBLOCKED 0x0015 |
357 | struct mgmt_ev_device_unblocked { | 377 | struct mgmt_ev_device_unblocked { |
358 | bdaddr_t bdaddr; | 378 | bdaddr_t bdaddr; |
359 | } __packed; | 379 | } __packed; |
360 | |||
361 | #define MGMT_EV_USER_PASSKEY_REQUEST 0x0017 | ||
362 | struct mgmt_ev_user_passkey_request { | ||
363 | bdaddr_t bdaddr; | ||
364 | } __packed; | ||