diff options
Diffstat (limited to 'include/net/bluetooth/hci.h')
-rw-r--r-- | include/net/bluetooth/hci.h | 187 |
1 files changed, 95 insertions, 92 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index fc0c502d9fd1..bcbdd6d4e6dd 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -100,6 +100,9 @@ enum { | |||
100 | #define HCISETACLMTU _IOW('H', 227, int) | 100 | #define HCISETACLMTU _IOW('H', 227, int) |
101 | #define HCISETSCOMTU _IOW('H', 228, int) | 101 | #define HCISETSCOMTU _IOW('H', 228, int) |
102 | 102 | ||
103 | #define HCIBLOCKADDR _IOW('H', 230, int) | ||
104 | #define HCIUNBLOCKADDR _IOW('H', 231, int) | ||
105 | |||
103 | #define HCIINQUIRY _IOR('H', 240, int) | 106 | #define HCIINQUIRY _IOR('H', 240, int) |
104 | 107 | ||
105 | /* HCI timeouts */ | 108 | /* HCI timeouts */ |
@@ -227,7 +230,7 @@ struct hci_cp_inquiry { | |||
227 | __u8 lap[3]; | 230 | __u8 lap[3]; |
228 | __u8 length; | 231 | __u8 length; |
229 | __u8 num_rsp; | 232 | __u8 num_rsp; |
230 | } __attribute__ ((packed)); | 233 | } __packed; |
231 | 234 | ||
232 | #define HCI_OP_INQUIRY_CANCEL 0x0402 | 235 | #define HCI_OP_INQUIRY_CANCEL 0x0402 |
233 | 236 | ||
@@ -241,81 +244,81 @@ struct hci_cp_create_conn { | |||
241 | __u8 pscan_mode; | 244 | __u8 pscan_mode; |
242 | __le16 clock_offset; | 245 | __le16 clock_offset; |
243 | __u8 role_switch; | 246 | __u8 role_switch; |
244 | } __attribute__ ((packed)); | 247 | } __packed; |
245 | 248 | ||
246 | #define HCI_OP_DISCONNECT 0x0406 | 249 | #define HCI_OP_DISCONNECT 0x0406 |
247 | struct hci_cp_disconnect { | 250 | struct hci_cp_disconnect { |
248 | __le16 handle; | 251 | __le16 handle; |
249 | __u8 reason; | 252 | __u8 reason; |
250 | } __attribute__ ((packed)); | 253 | } __packed; |
251 | 254 | ||
252 | #define HCI_OP_ADD_SCO 0x0407 | 255 | #define HCI_OP_ADD_SCO 0x0407 |
253 | struct hci_cp_add_sco { | 256 | struct hci_cp_add_sco { |
254 | __le16 handle; | 257 | __le16 handle; |
255 | __le16 pkt_type; | 258 | __le16 pkt_type; |
256 | } __attribute__ ((packed)); | 259 | } __packed; |
257 | 260 | ||
258 | #define HCI_OP_CREATE_CONN_CANCEL 0x0408 | 261 | #define HCI_OP_CREATE_CONN_CANCEL 0x0408 |
259 | struct hci_cp_create_conn_cancel { | 262 | struct hci_cp_create_conn_cancel { |
260 | bdaddr_t bdaddr; | 263 | bdaddr_t bdaddr; |
261 | } __attribute__ ((packed)); | 264 | } __packed; |
262 | 265 | ||
263 | #define HCI_OP_ACCEPT_CONN_REQ 0x0409 | 266 | #define HCI_OP_ACCEPT_CONN_REQ 0x0409 |
264 | struct hci_cp_accept_conn_req { | 267 | struct hci_cp_accept_conn_req { |
265 | bdaddr_t bdaddr; | 268 | bdaddr_t bdaddr; |
266 | __u8 role; | 269 | __u8 role; |
267 | } __attribute__ ((packed)); | 270 | } __packed; |
268 | 271 | ||
269 | #define HCI_OP_REJECT_CONN_REQ 0x040a | 272 | #define HCI_OP_REJECT_CONN_REQ 0x040a |
270 | struct hci_cp_reject_conn_req { | 273 | struct hci_cp_reject_conn_req { |
271 | bdaddr_t bdaddr; | 274 | bdaddr_t bdaddr; |
272 | __u8 reason; | 275 | __u8 reason; |
273 | } __attribute__ ((packed)); | 276 | } __packed; |
274 | 277 | ||
275 | #define HCI_OP_LINK_KEY_REPLY 0x040b | 278 | #define HCI_OP_LINK_KEY_REPLY 0x040b |
276 | struct hci_cp_link_key_reply { | 279 | struct hci_cp_link_key_reply { |
277 | bdaddr_t bdaddr; | 280 | bdaddr_t bdaddr; |
278 | __u8 link_key[16]; | 281 | __u8 link_key[16]; |
279 | } __attribute__ ((packed)); | 282 | } __packed; |
280 | 283 | ||
281 | #define HCI_OP_LINK_KEY_NEG_REPLY 0x040c | 284 | #define HCI_OP_LINK_KEY_NEG_REPLY 0x040c |
282 | struct hci_cp_link_key_neg_reply { | 285 | struct hci_cp_link_key_neg_reply { |
283 | bdaddr_t bdaddr; | 286 | bdaddr_t bdaddr; |
284 | } __attribute__ ((packed)); | 287 | } __packed; |
285 | 288 | ||
286 | #define HCI_OP_PIN_CODE_REPLY 0x040d | 289 | #define HCI_OP_PIN_CODE_REPLY 0x040d |
287 | struct hci_cp_pin_code_reply { | 290 | struct hci_cp_pin_code_reply { |
288 | bdaddr_t bdaddr; | 291 | bdaddr_t bdaddr; |
289 | __u8 pin_len; | 292 | __u8 pin_len; |
290 | __u8 pin_code[16]; | 293 | __u8 pin_code[16]; |
291 | } __attribute__ ((packed)); | 294 | } __packed; |
292 | 295 | ||
293 | #define HCI_OP_PIN_CODE_NEG_REPLY 0x040e | 296 | #define HCI_OP_PIN_CODE_NEG_REPLY 0x040e |
294 | struct hci_cp_pin_code_neg_reply { | 297 | struct hci_cp_pin_code_neg_reply { |
295 | bdaddr_t bdaddr; | 298 | bdaddr_t bdaddr; |
296 | } __attribute__ ((packed)); | 299 | } __packed; |
297 | 300 | ||
298 | #define HCI_OP_CHANGE_CONN_PTYPE 0x040f | 301 | #define HCI_OP_CHANGE_CONN_PTYPE 0x040f |
299 | struct hci_cp_change_conn_ptype { | 302 | struct hci_cp_change_conn_ptype { |
300 | __le16 handle; | 303 | __le16 handle; |
301 | __le16 pkt_type; | 304 | __le16 pkt_type; |
302 | } __attribute__ ((packed)); | 305 | } __packed; |
303 | 306 | ||
304 | #define HCI_OP_AUTH_REQUESTED 0x0411 | 307 | #define HCI_OP_AUTH_REQUESTED 0x0411 |
305 | struct hci_cp_auth_requested { | 308 | struct hci_cp_auth_requested { |
306 | __le16 handle; | 309 | __le16 handle; |
307 | } __attribute__ ((packed)); | 310 | } __packed; |
308 | 311 | ||
309 | #define HCI_OP_SET_CONN_ENCRYPT 0x0413 | 312 | #define HCI_OP_SET_CONN_ENCRYPT 0x0413 |
310 | struct hci_cp_set_conn_encrypt { | 313 | struct hci_cp_set_conn_encrypt { |
311 | __le16 handle; | 314 | __le16 handle; |
312 | __u8 encrypt; | 315 | __u8 encrypt; |
313 | } __attribute__ ((packed)); | 316 | } __packed; |
314 | 317 | ||
315 | #define HCI_OP_CHANGE_CONN_LINK_KEY 0x0415 | 318 | #define HCI_OP_CHANGE_CONN_LINK_KEY 0x0415 |
316 | struct hci_cp_change_conn_link_key { | 319 | struct hci_cp_change_conn_link_key { |
317 | __le16 handle; | 320 | __le16 handle; |
318 | } __attribute__ ((packed)); | 321 | } __packed; |
319 | 322 | ||
320 | #define HCI_OP_REMOTE_NAME_REQ 0x0419 | 323 | #define HCI_OP_REMOTE_NAME_REQ 0x0419 |
321 | struct hci_cp_remote_name_req { | 324 | struct hci_cp_remote_name_req { |
@@ -323,28 +326,28 @@ struct hci_cp_remote_name_req { | |||
323 | __u8 pscan_rep_mode; | 326 | __u8 pscan_rep_mode; |
324 | __u8 pscan_mode; | 327 | __u8 pscan_mode; |
325 | __le16 clock_offset; | 328 | __le16 clock_offset; |
326 | } __attribute__ ((packed)); | 329 | } __packed; |
327 | 330 | ||
328 | #define HCI_OP_REMOTE_NAME_REQ_CANCEL 0x041a | 331 | #define HCI_OP_REMOTE_NAME_REQ_CANCEL 0x041a |
329 | struct hci_cp_remote_name_req_cancel { | 332 | struct hci_cp_remote_name_req_cancel { |
330 | bdaddr_t bdaddr; | 333 | bdaddr_t bdaddr; |
331 | } __attribute__ ((packed)); | 334 | } __packed; |
332 | 335 | ||
333 | #define HCI_OP_READ_REMOTE_FEATURES 0x041b | 336 | #define HCI_OP_READ_REMOTE_FEATURES 0x041b |
334 | struct hci_cp_read_remote_features { | 337 | struct hci_cp_read_remote_features { |
335 | __le16 handle; | 338 | __le16 handle; |
336 | } __attribute__ ((packed)); | 339 | } __packed; |
337 | 340 | ||
338 | #define HCI_OP_READ_REMOTE_EXT_FEATURES 0x041c | 341 | #define HCI_OP_READ_REMOTE_EXT_FEATURES 0x041c |
339 | struct hci_cp_read_remote_ext_features { | 342 | struct hci_cp_read_remote_ext_features { |
340 | __le16 handle; | 343 | __le16 handle; |
341 | __u8 page; | 344 | __u8 page; |
342 | } __attribute__ ((packed)); | 345 | } __packed; |
343 | 346 | ||
344 | #define HCI_OP_READ_REMOTE_VERSION 0x041d | 347 | #define HCI_OP_READ_REMOTE_VERSION 0x041d |
345 | struct hci_cp_read_remote_version { | 348 | struct hci_cp_read_remote_version { |
346 | __le16 handle; | 349 | __le16 handle; |
347 | } __attribute__ ((packed)); | 350 | } __packed; |
348 | 351 | ||
349 | #define HCI_OP_SETUP_SYNC_CONN 0x0428 | 352 | #define HCI_OP_SETUP_SYNC_CONN 0x0428 |
350 | struct hci_cp_setup_sync_conn { | 353 | struct hci_cp_setup_sync_conn { |
@@ -355,7 +358,7 @@ struct hci_cp_setup_sync_conn { | |||
355 | __le16 voice_setting; | 358 | __le16 voice_setting; |
356 | __u8 retrans_effort; | 359 | __u8 retrans_effort; |
357 | __le16 pkt_type; | 360 | __le16 pkt_type; |
358 | } __attribute__ ((packed)); | 361 | } __packed; |
359 | 362 | ||
360 | #define HCI_OP_ACCEPT_SYNC_CONN_REQ 0x0429 | 363 | #define HCI_OP_ACCEPT_SYNC_CONN_REQ 0x0429 |
361 | struct hci_cp_accept_sync_conn_req { | 364 | struct hci_cp_accept_sync_conn_req { |
@@ -366,13 +369,13 @@ struct hci_cp_accept_sync_conn_req { | |||
366 | __le16 content_format; | 369 | __le16 content_format; |
367 | __u8 retrans_effort; | 370 | __u8 retrans_effort; |
368 | __le16 pkt_type; | 371 | __le16 pkt_type; |
369 | } __attribute__ ((packed)); | 372 | } __packed; |
370 | 373 | ||
371 | #define HCI_OP_REJECT_SYNC_CONN_REQ 0x042a | 374 | #define HCI_OP_REJECT_SYNC_CONN_REQ 0x042a |
372 | struct hci_cp_reject_sync_conn_req { | 375 | struct hci_cp_reject_sync_conn_req { |
373 | bdaddr_t bdaddr; | 376 | bdaddr_t bdaddr; |
374 | __u8 reason; | 377 | __u8 reason; |
375 | } __attribute__ ((packed)); | 378 | } __packed; |
376 | 379 | ||
377 | #define HCI_OP_SNIFF_MODE 0x0803 | 380 | #define HCI_OP_SNIFF_MODE 0x0803 |
378 | struct hci_cp_sniff_mode { | 381 | struct hci_cp_sniff_mode { |
@@ -381,59 +384,59 @@ struct hci_cp_sniff_mode { | |||
381 | __le16 min_interval; | 384 | __le16 min_interval; |
382 | __le16 attempt; | 385 | __le16 attempt; |
383 | __le16 timeout; | 386 | __le16 timeout; |
384 | } __attribute__ ((packed)); | 387 | } __packed; |
385 | 388 | ||
386 | #define HCI_OP_EXIT_SNIFF_MODE 0x0804 | 389 | #define HCI_OP_EXIT_SNIFF_MODE 0x0804 |
387 | struct hci_cp_exit_sniff_mode { | 390 | struct hci_cp_exit_sniff_mode { |
388 | __le16 handle; | 391 | __le16 handle; |
389 | } __attribute__ ((packed)); | 392 | } __packed; |
390 | 393 | ||
391 | #define HCI_OP_ROLE_DISCOVERY 0x0809 | 394 | #define HCI_OP_ROLE_DISCOVERY 0x0809 |
392 | struct hci_cp_role_discovery { | 395 | struct hci_cp_role_discovery { |
393 | __le16 handle; | 396 | __le16 handle; |
394 | } __attribute__ ((packed)); | 397 | } __packed; |
395 | struct hci_rp_role_discovery { | 398 | struct hci_rp_role_discovery { |
396 | __u8 status; | 399 | __u8 status; |
397 | __le16 handle; | 400 | __le16 handle; |
398 | __u8 role; | 401 | __u8 role; |
399 | } __attribute__ ((packed)); | 402 | } __packed; |
400 | 403 | ||
401 | #define HCI_OP_SWITCH_ROLE 0x080b | 404 | #define HCI_OP_SWITCH_ROLE 0x080b |
402 | struct hci_cp_switch_role { | 405 | struct hci_cp_switch_role { |
403 | bdaddr_t bdaddr; | 406 | bdaddr_t bdaddr; |
404 | __u8 role; | 407 | __u8 role; |
405 | } __attribute__ ((packed)); | 408 | } __packed; |
406 | 409 | ||
407 | #define HCI_OP_READ_LINK_POLICY 0x080c | 410 | #define HCI_OP_READ_LINK_POLICY 0x080c |
408 | struct hci_cp_read_link_policy { | 411 | struct hci_cp_read_link_policy { |
409 | __le16 handle; | 412 | __le16 handle; |
410 | } __attribute__ ((packed)); | 413 | } __packed; |
411 | struct hci_rp_read_link_policy { | 414 | struct hci_rp_read_link_policy { |
412 | __u8 status; | 415 | __u8 status; |
413 | __le16 handle; | 416 | __le16 handle; |
414 | __le16 policy; | 417 | __le16 policy; |
415 | } __attribute__ ((packed)); | 418 | } __packed; |
416 | 419 | ||
417 | #define HCI_OP_WRITE_LINK_POLICY 0x080d | 420 | #define HCI_OP_WRITE_LINK_POLICY 0x080d |
418 | struct hci_cp_write_link_policy { | 421 | struct hci_cp_write_link_policy { |
419 | __le16 handle; | 422 | __le16 handle; |
420 | __le16 policy; | 423 | __le16 policy; |
421 | } __attribute__ ((packed)); | 424 | } __packed; |
422 | struct hci_rp_write_link_policy { | 425 | struct hci_rp_write_link_policy { |
423 | __u8 status; | 426 | __u8 status; |
424 | __le16 handle; | 427 | __le16 handle; |
425 | } __attribute__ ((packed)); | 428 | } __packed; |
426 | 429 | ||
427 | #define HCI_OP_READ_DEF_LINK_POLICY 0x080e | 430 | #define HCI_OP_READ_DEF_LINK_POLICY 0x080e |
428 | struct hci_rp_read_def_link_policy { | 431 | struct hci_rp_read_def_link_policy { |
429 | __u8 status; | 432 | __u8 status; |
430 | __le16 policy; | 433 | __le16 policy; |
431 | } __attribute__ ((packed)); | 434 | } __packed; |
432 | 435 | ||
433 | #define HCI_OP_WRITE_DEF_LINK_POLICY 0x080f | 436 | #define HCI_OP_WRITE_DEF_LINK_POLICY 0x080f |
434 | struct hci_cp_write_def_link_policy { | 437 | struct hci_cp_write_def_link_policy { |
435 | __le16 policy; | 438 | __le16 policy; |
436 | } __attribute__ ((packed)); | 439 | } __packed; |
437 | 440 | ||
438 | #define HCI_OP_SNIFF_SUBRATE 0x0811 | 441 | #define HCI_OP_SNIFF_SUBRATE 0x0811 |
439 | struct hci_cp_sniff_subrate { | 442 | struct hci_cp_sniff_subrate { |
@@ -441,12 +444,12 @@ struct hci_cp_sniff_subrate { | |||
441 | __le16 max_latency; | 444 | __le16 max_latency; |
442 | __le16 min_remote_timeout; | 445 | __le16 min_remote_timeout; |
443 | __le16 min_local_timeout; | 446 | __le16 min_local_timeout; |
444 | } __attribute__ ((packed)); | 447 | } __packed; |
445 | 448 | ||
446 | #define HCI_OP_SET_EVENT_MASK 0x0c01 | 449 | #define HCI_OP_SET_EVENT_MASK 0x0c01 |
447 | struct hci_cp_set_event_mask { | 450 | struct hci_cp_set_event_mask { |
448 | __u8 mask[8]; | 451 | __u8 mask[8]; |
449 | } __attribute__ ((packed)); | 452 | } __packed; |
450 | 453 | ||
451 | #define HCI_OP_RESET 0x0c03 | 454 | #define HCI_OP_RESET 0x0c03 |
452 | 455 | ||
@@ -455,7 +458,7 @@ struct hci_cp_set_event_flt { | |||
455 | __u8 flt_type; | 458 | __u8 flt_type; |
456 | __u8 cond_type; | 459 | __u8 cond_type; |
457 | __u8 condition[0]; | 460 | __u8 condition[0]; |
458 | } __attribute__ ((packed)); | 461 | } __packed; |
459 | 462 | ||
460 | /* Filter types */ | 463 | /* Filter types */ |
461 | #define HCI_FLT_CLEAR_ALL 0x00 | 464 | #define HCI_FLT_CLEAR_ALL 0x00 |
@@ -474,13 +477,13 @@ struct hci_cp_set_event_flt { | |||
474 | #define HCI_OP_WRITE_LOCAL_NAME 0x0c13 | 477 | #define HCI_OP_WRITE_LOCAL_NAME 0x0c13 |
475 | struct hci_cp_write_local_name { | 478 | struct hci_cp_write_local_name { |
476 | __u8 name[248]; | 479 | __u8 name[248]; |
477 | } __attribute__ ((packed)); | 480 | } __packed; |
478 | 481 | ||
479 | #define HCI_OP_READ_LOCAL_NAME 0x0c14 | 482 | #define HCI_OP_READ_LOCAL_NAME 0x0c14 |
480 | struct hci_rp_read_local_name { | 483 | struct hci_rp_read_local_name { |
481 | __u8 status; | 484 | __u8 status; |
482 | __u8 name[248]; | 485 | __u8 name[248]; |
483 | } __attribute__ ((packed)); | 486 | } __packed; |
484 | 487 | ||
485 | #define HCI_OP_WRITE_CA_TIMEOUT 0x0c16 | 488 | #define HCI_OP_WRITE_CA_TIMEOUT 0x0c16 |
486 | 489 | ||
@@ -508,23 +511,23 @@ struct hci_rp_read_local_name { | |||
508 | struct hci_rp_read_class_of_dev { | 511 | struct hci_rp_read_class_of_dev { |
509 | __u8 status; | 512 | __u8 status; |
510 | __u8 dev_class[3]; | 513 | __u8 dev_class[3]; |
511 | } __attribute__ ((packed)); | 514 | } __packed; |
512 | 515 | ||
513 | #define HCI_OP_WRITE_CLASS_OF_DEV 0x0c24 | 516 | #define HCI_OP_WRITE_CLASS_OF_DEV 0x0c24 |
514 | struct hci_cp_write_class_of_dev { | 517 | struct hci_cp_write_class_of_dev { |
515 | __u8 dev_class[3]; | 518 | __u8 dev_class[3]; |
516 | } __attribute__ ((packed)); | 519 | } __packed; |
517 | 520 | ||
518 | #define HCI_OP_READ_VOICE_SETTING 0x0c25 | 521 | #define HCI_OP_READ_VOICE_SETTING 0x0c25 |
519 | struct hci_rp_read_voice_setting { | 522 | struct hci_rp_read_voice_setting { |
520 | __u8 status; | 523 | __u8 status; |
521 | __le16 voice_setting; | 524 | __le16 voice_setting; |
522 | } __attribute__ ((packed)); | 525 | } __packed; |
523 | 526 | ||
524 | #define HCI_OP_WRITE_VOICE_SETTING 0x0c26 | 527 | #define HCI_OP_WRITE_VOICE_SETTING 0x0c26 |
525 | struct hci_cp_write_voice_setting { | 528 | struct hci_cp_write_voice_setting { |
526 | __le16 voice_setting; | 529 | __le16 voice_setting; |
527 | } __attribute__ ((packed)); | 530 | } __packed; |
528 | 531 | ||
529 | #define HCI_OP_HOST_BUFFER_SIZE 0x0c33 | 532 | #define HCI_OP_HOST_BUFFER_SIZE 0x0c33 |
530 | struct hci_cp_host_buffer_size { | 533 | struct hci_cp_host_buffer_size { |
@@ -532,18 +535,18 @@ struct hci_cp_host_buffer_size { | |||
532 | __u8 sco_mtu; | 535 | __u8 sco_mtu; |
533 | __le16 acl_max_pkt; | 536 | __le16 acl_max_pkt; |
534 | __le16 sco_max_pkt; | 537 | __le16 sco_max_pkt; |
535 | } __attribute__ ((packed)); | 538 | } __packed; |
536 | 539 | ||
537 | #define HCI_OP_READ_SSP_MODE 0x0c55 | 540 | #define HCI_OP_READ_SSP_MODE 0x0c55 |
538 | struct hci_rp_read_ssp_mode { | 541 | struct hci_rp_read_ssp_mode { |
539 | __u8 status; | 542 | __u8 status; |
540 | __u8 mode; | 543 | __u8 mode; |
541 | } __attribute__ ((packed)); | 544 | } __packed; |
542 | 545 | ||
543 | #define HCI_OP_WRITE_SSP_MODE 0x0c56 | 546 | #define HCI_OP_WRITE_SSP_MODE 0x0c56 |
544 | struct hci_cp_write_ssp_mode { | 547 | struct hci_cp_write_ssp_mode { |
545 | __u8 mode; | 548 | __u8 mode; |
546 | } __attribute__ ((packed)); | 549 | } __packed; |
547 | 550 | ||
548 | #define HCI_OP_READ_LOCAL_VERSION 0x1001 | 551 | #define HCI_OP_READ_LOCAL_VERSION 0x1001 |
549 | struct hci_rp_read_local_version { | 552 | struct hci_rp_read_local_version { |
@@ -553,19 +556,19 @@ struct hci_rp_read_local_version { | |||
553 | __u8 lmp_ver; | 556 | __u8 lmp_ver; |
554 | __le16 manufacturer; | 557 | __le16 manufacturer; |
555 | __le16 lmp_subver; | 558 | __le16 lmp_subver; |
556 | } __attribute__ ((packed)); | 559 | } __packed; |
557 | 560 | ||
558 | #define HCI_OP_READ_LOCAL_COMMANDS 0x1002 | 561 | #define HCI_OP_READ_LOCAL_COMMANDS 0x1002 |
559 | struct hci_rp_read_local_commands { | 562 | struct hci_rp_read_local_commands { |
560 | __u8 status; | 563 | __u8 status; |
561 | __u8 commands[64]; | 564 | __u8 commands[64]; |
562 | } __attribute__ ((packed)); | 565 | } __packed; |
563 | 566 | ||
564 | #define HCI_OP_READ_LOCAL_FEATURES 0x1003 | 567 | #define HCI_OP_READ_LOCAL_FEATURES 0x1003 |
565 | struct hci_rp_read_local_features { | 568 | struct hci_rp_read_local_features { |
566 | __u8 status; | 569 | __u8 status; |
567 | __u8 features[8]; | 570 | __u8 features[8]; |
568 | } __attribute__ ((packed)); | 571 | } __packed; |
569 | 572 | ||
570 | #define HCI_OP_READ_LOCAL_EXT_FEATURES 0x1004 | 573 | #define HCI_OP_READ_LOCAL_EXT_FEATURES 0x1004 |
571 | struct hci_rp_read_local_ext_features { | 574 | struct hci_rp_read_local_ext_features { |
@@ -573,7 +576,7 @@ struct hci_rp_read_local_ext_features { | |||
573 | __u8 page; | 576 | __u8 page; |
574 | __u8 max_page; | 577 | __u8 max_page; |
575 | __u8 features[8]; | 578 | __u8 features[8]; |
576 | } __attribute__ ((packed)); | 579 | } __packed; |
577 | 580 | ||
578 | #define HCI_OP_READ_BUFFER_SIZE 0x1005 | 581 | #define HCI_OP_READ_BUFFER_SIZE 0x1005 |
579 | struct hci_rp_read_buffer_size { | 582 | struct hci_rp_read_buffer_size { |
@@ -582,13 +585,13 @@ struct hci_rp_read_buffer_size { | |||
582 | __u8 sco_mtu; | 585 | __u8 sco_mtu; |
583 | __le16 acl_max_pkt; | 586 | __le16 acl_max_pkt; |
584 | __le16 sco_max_pkt; | 587 | __le16 sco_max_pkt; |
585 | } __attribute__ ((packed)); | 588 | } __packed; |
586 | 589 | ||
587 | #define HCI_OP_READ_BD_ADDR 0x1009 | 590 | #define HCI_OP_READ_BD_ADDR 0x1009 |
588 | struct hci_rp_read_bd_addr { | 591 | struct hci_rp_read_bd_addr { |
589 | __u8 status; | 592 | __u8 status; |
590 | bdaddr_t bdaddr; | 593 | bdaddr_t bdaddr; |
591 | } __attribute__ ((packed)); | 594 | } __packed; |
592 | 595 | ||
593 | /* ---- HCI Events ---- */ | 596 | /* ---- HCI Events ---- */ |
594 | #define HCI_EV_INQUIRY_COMPLETE 0x01 | 597 | #define HCI_EV_INQUIRY_COMPLETE 0x01 |
@@ -601,7 +604,7 @@ struct inquiry_info { | |||
601 | __u8 pscan_mode; | 604 | __u8 pscan_mode; |
602 | __u8 dev_class[3]; | 605 | __u8 dev_class[3]; |
603 | __le16 clock_offset; | 606 | __le16 clock_offset; |
604 | } __attribute__ ((packed)); | 607 | } __packed; |
605 | 608 | ||
606 | #define HCI_EV_CONN_COMPLETE 0x03 | 609 | #define HCI_EV_CONN_COMPLETE 0x03 |
607 | struct hci_ev_conn_complete { | 610 | struct hci_ev_conn_complete { |
@@ -610,54 +613,54 @@ struct hci_ev_conn_complete { | |||
610 | bdaddr_t bdaddr; | 613 | bdaddr_t bdaddr; |
611 | __u8 link_type; | 614 | __u8 link_type; |
612 | __u8 encr_mode; | 615 | __u8 encr_mode; |
613 | } __attribute__ ((packed)); | 616 | } __packed; |
614 | 617 | ||
615 | #define HCI_EV_CONN_REQUEST 0x04 | 618 | #define HCI_EV_CONN_REQUEST 0x04 |
616 | struct hci_ev_conn_request { | 619 | struct hci_ev_conn_request { |
617 | bdaddr_t bdaddr; | 620 | bdaddr_t bdaddr; |
618 | __u8 dev_class[3]; | 621 | __u8 dev_class[3]; |
619 | __u8 link_type; | 622 | __u8 link_type; |
620 | } __attribute__ ((packed)); | 623 | } __packed; |
621 | 624 | ||
622 | #define HCI_EV_DISCONN_COMPLETE 0x05 | 625 | #define HCI_EV_DISCONN_COMPLETE 0x05 |
623 | struct hci_ev_disconn_complete { | 626 | struct hci_ev_disconn_complete { |
624 | __u8 status; | 627 | __u8 status; |
625 | __le16 handle; | 628 | __le16 handle; |
626 | __u8 reason; | 629 | __u8 reason; |
627 | } __attribute__ ((packed)); | 630 | } __packed; |
628 | 631 | ||
629 | #define HCI_EV_AUTH_COMPLETE 0x06 | 632 | #define HCI_EV_AUTH_COMPLETE 0x06 |
630 | struct hci_ev_auth_complete { | 633 | struct hci_ev_auth_complete { |
631 | __u8 status; | 634 | __u8 status; |
632 | __le16 handle; | 635 | __le16 handle; |
633 | } __attribute__ ((packed)); | 636 | } __packed; |
634 | 637 | ||
635 | #define HCI_EV_REMOTE_NAME 0x07 | 638 | #define HCI_EV_REMOTE_NAME 0x07 |
636 | struct hci_ev_remote_name { | 639 | struct hci_ev_remote_name { |
637 | __u8 status; | 640 | __u8 status; |
638 | bdaddr_t bdaddr; | 641 | bdaddr_t bdaddr; |
639 | __u8 name[248]; | 642 | __u8 name[248]; |
640 | } __attribute__ ((packed)); | 643 | } __packed; |
641 | 644 | ||
642 | #define HCI_EV_ENCRYPT_CHANGE 0x08 | 645 | #define HCI_EV_ENCRYPT_CHANGE 0x08 |
643 | struct hci_ev_encrypt_change { | 646 | struct hci_ev_encrypt_change { |
644 | __u8 status; | 647 | __u8 status; |
645 | __le16 handle; | 648 | __le16 handle; |
646 | __u8 encrypt; | 649 | __u8 encrypt; |
647 | } __attribute__ ((packed)); | 650 | } __packed; |
648 | 651 | ||
649 | #define HCI_EV_CHANGE_LINK_KEY_COMPLETE 0x09 | 652 | #define HCI_EV_CHANGE_LINK_KEY_COMPLETE 0x09 |
650 | struct hci_ev_change_link_key_complete { | 653 | struct hci_ev_change_link_key_complete { |
651 | __u8 status; | 654 | __u8 status; |
652 | __le16 handle; | 655 | __le16 handle; |
653 | } __attribute__ ((packed)); | 656 | } __packed; |
654 | 657 | ||
655 | #define HCI_EV_REMOTE_FEATURES 0x0b | 658 | #define HCI_EV_REMOTE_FEATURES 0x0b |
656 | struct hci_ev_remote_features { | 659 | struct hci_ev_remote_features { |
657 | __u8 status; | 660 | __u8 status; |
658 | __le16 handle; | 661 | __le16 handle; |
659 | __u8 features[8]; | 662 | __u8 features[8]; |
660 | } __attribute__ ((packed)); | 663 | } __packed; |
661 | 664 | ||
662 | #define HCI_EV_REMOTE_VERSION 0x0c | 665 | #define HCI_EV_REMOTE_VERSION 0x0c |
663 | struct hci_ev_remote_version { | 666 | struct hci_ev_remote_version { |
@@ -666,7 +669,7 @@ struct hci_ev_remote_version { | |||
666 | __u8 lmp_ver; | 669 | __u8 lmp_ver; |
667 | __le16 manufacturer; | 670 | __le16 manufacturer; |
668 | __le16 lmp_subver; | 671 | __le16 lmp_subver; |
669 | } __attribute__ ((packed)); | 672 | } __packed; |
670 | 673 | ||
671 | #define HCI_EV_QOS_SETUP_COMPLETE 0x0d | 674 | #define HCI_EV_QOS_SETUP_COMPLETE 0x0d |
672 | struct hci_qos { | 675 | struct hci_qos { |
@@ -675,38 +678,38 @@ struct hci_qos { | |||
675 | __u32 peak_bandwidth; | 678 | __u32 peak_bandwidth; |
676 | __u32 latency; | 679 | __u32 latency; |
677 | __u32 delay_variation; | 680 | __u32 delay_variation; |
678 | } __attribute__ ((packed)); | 681 | } __packed; |
679 | struct hci_ev_qos_setup_complete { | 682 | struct hci_ev_qos_setup_complete { |
680 | __u8 status; | 683 | __u8 status; |
681 | __le16 handle; | 684 | __le16 handle; |
682 | struct hci_qos qos; | 685 | struct hci_qos qos; |
683 | } __attribute__ ((packed)); | 686 | } __packed; |
684 | 687 | ||
685 | #define HCI_EV_CMD_COMPLETE 0x0e | 688 | #define HCI_EV_CMD_COMPLETE 0x0e |
686 | struct hci_ev_cmd_complete { | 689 | struct hci_ev_cmd_complete { |
687 | __u8 ncmd; | 690 | __u8 ncmd; |
688 | __le16 opcode; | 691 | __le16 opcode; |
689 | } __attribute__ ((packed)); | 692 | } __packed; |
690 | 693 | ||
691 | #define HCI_EV_CMD_STATUS 0x0f | 694 | #define HCI_EV_CMD_STATUS 0x0f |
692 | struct hci_ev_cmd_status { | 695 | struct hci_ev_cmd_status { |
693 | __u8 status; | 696 | __u8 status; |
694 | __u8 ncmd; | 697 | __u8 ncmd; |
695 | __le16 opcode; | 698 | __le16 opcode; |
696 | } __attribute__ ((packed)); | 699 | } __packed; |
697 | 700 | ||
698 | #define HCI_EV_ROLE_CHANGE 0x12 | 701 | #define HCI_EV_ROLE_CHANGE 0x12 |
699 | struct hci_ev_role_change { | 702 | struct hci_ev_role_change { |
700 | __u8 status; | 703 | __u8 status; |
701 | bdaddr_t bdaddr; | 704 | bdaddr_t bdaddr; |
702 | __u8 role; | 705 | __u8 role; |
703 | } __attribute__ ((packed)); | 706 | } __packed; |
704 | 707 | ||
705 | #define HCI_EV_NUM_COMP_PKTS 0x13 | 708 | #define HCI_EV_NUM_COMP_PKTS 0x13 |
706 | struct hci_ev_num_comp_pkts { | 709 | struct hci_ev_num_comp_pkts { |
707 | __u8 num_hndl; | 710 | __u8 num_hndl; |
708 | /* variable length part */ | 711 | /* variable length part */ |
709 | } __attribute__ ((packed)); | 712 | } __packed; |
710 | 713 | ||
711 | #define HCI_EV_MODE_CHANGE 0x14 | 714 | #define HCI_EV_MODE_CHANGE 0x14 |
712 | struct hci_ev_mode_change { | 715 | struct hci_ev_mode_change { |
@@ -714,44 +717,44 @@ struct hci_ev_mode_change { | |||
714 | __le16 handle; | 717 | __le16 handle; |
715 | __u8 mode; | 718 | __u8 mode; |
716 | __le16 interval; | 719 | __le16 interval; |
717 | } __attribute__ ((packed)); | 720 | } __packed; |
718 | 721 | ||
719 | #define HCI_EV_PIN_CODE_REQ 0x16 | 722 | #define HCI_EV_PIN_CODE_REQ 0x16 |
720 | struct hci_ev_pin_code_req { | 723 | struct hci_ev_pin_code_req { |
721 | bdaddr_t bdaddr; | 724 | bdaddr_t bdaddr; |
722 | } __attribute__ ((packed)); | 725 | } __packed; |
723 | 726 | ||
724 | #define HCI_EV_LINK_KEY_REQ 0x17 | 727 | #define HCI_EV_LINK_KEY_REQ 0x17 |
725 | struct hci_ev_link_key_req { | 728 | struct hci_ev_link_key_req { |
726 | bdaddr_t bdaddr; | 729 | bdaddr_t bdaddr; |
727 | } __attribute__ ((packed)); | 730 | } __packed; |
728 | 731 | ||
729 | #define HCI_EV_LINK_KEY_NOTIFY 0x18 | 732 | #define HCI_EV_LINK_KEY_NOTIFY 0x18 |
730 | struct hci_ev_link_key_notify { | 733 | struct hci_ev_link_key_notify { |
731 | bdaddr_t bdaddr; | 734 | bdaddr_t bdaddr; |
732 | __u8 link_key[16]; | 735 | __u8 link_key[16]; |
733 | __u8 key_type; | 736 | __u8 key_type; |
734 | } __attribute__ ((packed)); | 737 | } __packed; |
735 | 738 | ||
736 | #define HCI_EV_CLOCK_OFFSET 0x1c | 739 | #define HCI_EV_CLOCK_OFFSET 0x1c |
737 | struct hci_ev_clock_offset { | 740 | struct hci_ev_clock_offset { |
738 | __u8 status; | 741 | __u8 status; |
739 | __le16 handle; | 742 | __le16 handle; |
740 | __le16 clock_offset; | 743 | __le16 clock_offset; |
741 | } __attribute__ ((packed)); | 744 | } __packed; |
742 | 745 | ||
743 | #define HCI_EV_PKT_TYPE_CHANGE 0x1d | 746 | #define HCI_EV_PKT_TYPE_CHANGE 0x1d |
744 | struct hci_ev_pkt_type_change { | 747 | struct hci_ev_pkt_type_change { |
745 | __u8 status; | 748 | __u8 status; |
746 | __le16 handle; | 749 | __le16 handle; |
747 | __le16 pkt_type; | 750 | __le16 pkt_type; |
748 | } __attribute__ ((packed)); | 751 | } __packed; |
749 | 752 | ||
750 | #define HCI_EV_PSCAN_REP_MODE 0x20 | 753 | #define HCI_EV_PSCAN_REP_MODE 0x20 |
751 | struct hci_ev_pscan_rep_mode { | 754 | struct hci_ev_pscan_rep_mode { |
752 | bdaddr_t bdaddr; | 755 | bdaddr_t bdaddr; |
753 | __u8 pscan_rep_mode; | 756 | __u8 pscan_rep_mode; |
754 | } __attribute__ ((packed)); | 757 | } __packed; |
755 | 758 | ||
756 | #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 | 759 | #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 |
757 | struct inquiry_info_with_rssi { | 760 | struct inquiry_info_with_rssi { |
@@ -761,7 +764,7 @@ struct inquiry_info_with_rssi { | |||
761 | __u8 dev_class[3]; | 764 | __u8 dev_class[3]; |
762 | __le16 clock_offset; | 765 | __le16 clock_offset; |
763 | __s8 rssi; | 766 | __s8 rssi; |
764 | } __attribute__ ((packed)); | 767 | } __packed; |
765 | struct inquiry_info_with_rssi_and_pscan_mode { | 768 | struct inquiry_info_with_rssi_and_pscan_mode { |
766 | bdaddr_t bdaddr; | 769 | bdaddr_t bdaddr; |
767 | __u8 pscan_rep_mode; | 770 | __u8 pscan_rep_mode; |
@@ -770,7 +773,7 @@ struct inquiry_info_with_rssi_and_pscan_mode { | |||
770 | __u8 dev_class[3]; | 773 | __u8 dev_class[3]; |
771 | __le16 clock_offset; | 774 | __le16 clock_offset; |
772 | __s8 rssi; | 775 | __s8 rssi; |
773 | } __attribute__ ((packed)); | 776 | } __packed; |
774 | 777 | ||
775 | #define HCI_EV_REMOTE_EXT_FEATURES 0x23 | 778 | #define HCI_EV_REMOTE_EXT_FEATURES 0x23 |
776 | struct hci_ev_remote_ext_features { | 779 | struct hci_ev_remote_ext_features { |
@@ -779,7 +782,7 @@ struct hci_ev_remote_ext_features { | |||
779 | __u8 page; | 782 | __u8 page; |
780 | __u8 max_page; | 783 | __u8 max_page; |
781 | __u8 features[8]; | 784 | __u8 features[8]; |
782 | } __attribute__ ((packed)); | 785 | } __packed; |
783 | 786 | ||
784 | #define HCI_EV_SYNC_CONN_COMPLETE 0x2c | 787 | #define HCI_EV_SYNC_CONN_COMPLETE 0x2c |
785 | struct hci_ev_sync_conn_complete { | 788 | struct hci_ev_sync_conn_complete { |
@@ -792,7 +795,7 @@ struct hci_ev_sync_conn_complete { | |||
792 | __le16 rx_pkt_len; | 795 | __le16 rx_pkt_len; |
793 | __le16 tx_pkt_len; | 796 | __le16 tx_pkt_len; |
794 | __u8 air_mode; | 797 | __u8 air_mode; |
795 | } __attribute__ ((packed)); | 798 | } __packed; |
796 | 799 | ||
797 | #define HCI_EV_SYNC_CONN_CHANGED 0x2d | 800 | #define HCI_EV_SYNC_CONN_CHANGED 0x2d |
798 | struct hci_ev_sync_conn_changed { | 801 | struct hci_ev_sync_conn_changed { |
@@ -802,7 +805,7 @@ struct hci_ev_sync_conn_changed { | |||
802 | __u8 retrans_window; | 805 | __u8 retrans_window; |
803 | __le16 rx_pkt_len; | 806 | __le16 rx_pkt_len; |
804 | __le16 tx_pkt_len; | 807 | __le16 tx_pkt_len; |
805 | } __attribute__ ((packed)); | 808 | } __packed; |
806 | 809 | ||
807 | #define HCI_EV_SNIFF_SUBRATE 0x2e | 810 | #define HCI_EV_SNIFF_SUBRATE 0x2e |
808 | struct hci_ev_sniff_subrate { | 811 | struct hci_ev_sniff_subrate { |
@@ -812,7 +815,7 @@ struct hci_ev_sniff_subrate { | |||
812 | __le16 max_rx_latency; | 815 | __le16 max_rx_latency; |
813 | __le16 max_remote_timeout; | 816 | __le16 max_remote_timeout; |
814 | __le16 max_local_timeout; | 817 | __le16 max_local_timeout; |
815 | } __attribute__ ((packed)); | 818 | } __packed; |
816 | 819 | ||
817 | #define HCI_EV_EXTENDED_INQUIRY_RESULT 0x2f | 820 | #define HCI_EV_EXTENDED_INQUIRY_RESULT 0x2f |
818 | struct extended_inquiry_info { | 821 | struct extended_inquiry_info { |
@@ -823,37 +826,37 @@ struct extended_inquiry_info { | |||
823 | __le16 clock_offset; | 826 | __le16 clock_offset; |
824 | __s8 rssi; | 827 | __s8 rssi; |
825 | __u8 data[240]; | 828 | __u8 data[240]; |
826 | } __attribute__ ((packed)); | 829 | } __packed; |
827 | 830 | ||
828 | #define HCI_EV_IO_CAPA_REQUEST 0x31 | 831 | #define HCI_EV_IO_CAPA_REQUEST 0x31 |
829 | struct hci_ev_io_capa_request { | 832 | struct hci_ev_io_capa_request { |
830 | bdaddr_t bdaddr; | 833 | bdaddr_t bdaddr; |
831 | } __attribute__ ((packed)); | 834 | } __packed; |
832 | 835 | ||
833 | #define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 | 836 | #define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 |
834 | struct hci_ev_simple_pair_complete { | 837 | struct hci_ev_simple_pair_complete { |
835 | __u8 status; | 838 | __u8 status; |
836 | bdaddr_t bdaddr; | 839 | bdaddr_t bdaddr; |
837 | } __attribute__ ((packed)); | 840 | } __packed; |
838 | 841 | ||
839 | #define HCI_EV_REMOTE_HOST_FEATURES 0x3d | 842 | #define HCI_EV_REMOTE_HOST_FEATURES 0x3d |
840 | struct hci_ev_remote_host_features { | 843 | struct hci_ev_remote_host_features { |
841 | bdaddr_t bdaddr; | 844 | bdaddr_t bdaddr; |
842 | __u8 features[8]; | 845 | __u8 features[8]; |
843 | } __attribute__ ((packed)); | 846 | } __packed; |
844 | 847 | ||
845 | /* Internal events generated by Bluetooth stack */ | 848 | /* Internal events generated by Bluetooth stack */ |
846 | #define HCI_EV_STACK_INTERNAL 0xfd | 849 | #define HCI_EV_STACK_INTERNAL 0xfd |
847 | struct hci_ev_stack_internal { | 850 | struct hci_ev_stack_internal { |
848 | __u16 type; | 851 | __u16 type; |
849 | __u8 data[0]; | 852 | __u8 data[0]; |
850 | } __attribute__ ((packed)); | 853 | } __packed; |
851 | 854 | ||
852 | #define HCI_EV_SI_DEVICE 0x01 | 855 | #define HCI_EV_SI_DEVICE 0x01 |
853 | struct hci_ev_si_device { | 856 | struct hci_ev_si_device { |
854 | __u16 event; | 857 | __u16 event; |
855 | __u16 dev_id; | 858 | __u16 dev_id; |
856 | } __attribute__ ((packed)); | 859 | } __packed; |
857 | 860 | ||
858 | #define HCI_EV_SI_SECURITY 0x02 | 861 | #define HCI_EV_SI_SECURITY 0x02 |
859 | struct hci_ev_si_security { | 862 | struct hci_ev_si_security { |
@@ -861,7 +864,7 @@ struct hci_ev_si_security { | |||
861 | __u16 proto; | 864 | __u16 proto; |
862 | __u16 subproto; | 865 | __u16 subproto; |
863 | __u8 incoming; | 866 | __u8 incoming; |
864 | } __attribute__ ((packed)); | 867 | } __packed; |
865 | 868 | ||
866 | /* ---- HCI Packet structures ---- */ | 869 | /* ---- HCI Packet structures ---- */ |
867 | #define HCI_COMMAND_HDR_SIZE 3 | 870 | #define HCI_COMMAND_HDR_SIZE 3 |
@@ -872,22 +875,22 @@ struct hci_ev_si_security { | |||
872 | struct hci_command_hdr { | 875 | struct hci_command_hdr { |
873 | __le16 opcode; /* OCF & OGF */ | 876 | __le16 opcode; /* OCF & OGF */ |
874 | __u8 plen; | 877 | __u8 plen; |
875 | } __attribute__ ((packed)); | 878 | } __packed; |
876 | 879 | ||
877 | struct hci_event_hdr { | 880 | struct hci_event_hdr { |
878 | __u8 evt; | 881 | __u8 evt; |
879 | __u8 plen; | 882 | __u8 plen; |
880 | } __attribute__ ((packed)); | 883 | } __packed; |
881 | 884 | ||
882 | struct hci_acl_hdr { | 885 | struct hci_acl_hdr { |
883 | __le16 handle; /* Handle & Flags(PB, BC) */ | 886 | __le16 handle; /* Handle & Flags(PB, BC) */ |
884 | __le16 dlen; | 887 | __le16 dlen; |
885 | } __attribute__ ((packed)); | 888 | } __packed; |
886 | 889 | ||
887 | struct hci_sco_hdr { | 890 | struct hci_sco_hdr { |
888 | __le16 handle; | 891 | __le16 handle; |
889 | __u8 dlen; | 892 | __u8 dlen; |
890 | } __attribute__ ((packed)); | 893 | } __packed; |
891 | 894 | ||
892 | #ifdef __KERNEL__ | 895 | #ifdef __KERNEL__ |
893 | #include <linux/skbuff.h> | 896 | #include <linux/skbuff.h> |