aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2010-07-19 01:00:13 -0400
committerMarcel Holtmann <marcel@holtmann.org>2010-07-21 13:39:13 -0400
commit66c853cc21bd387a9a2109dcf3b3d53cc9ee9edf (patch)
tree7cff1a1c452f0cdd3420523b0f5f966900c2336a /include
parentd1c4a17d58a6dfacb48935aa430aa986559a885f (diff)
Bluetooth: Use __packed annotation
To make net/ and include/net/ code consistent use __packed instead of __attribute__ ((packed)). Bluetooth subsystem was one of the last net subsys still using __attribute__ ((packed)). Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/bluetooth.h2
-rw-r--r--include/net/bluetooth/hci.h184
-rw-r--r--include/net/bluetooth/l2cap.h26
-rw-r--r--include/net/bluetooth/rfcomm.h14
4 files changed, 113 insertions, 113 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h
index d6b150c679ff..27a902d9b3a9 100644
--- a/include/net/bluetooth/bluetooth.h
+++ b/include/net/bluetooth/bluetooth.h
@@ -84,7 +84,7 @@ enum {
84/* BD Address */ 84/* BD Address */
85typedef struct { 85typedef struct {
86 __u8 b[6]; 86 __u8 b[6];
87} __attribute__((packed)) bdaddr_t; 87} __packed bdaddr_t;
88 88
89#define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}}) 89#define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}})
90#define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}}) 90#define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}})
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index ca2518e0574e..bcbdd6d4e6dd 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -230,7 +230,7 @@ struct hci_cp_inquiry {
230 __u8 lap[3]; 230 __u8 lap[3];
231 __u8 length; 231 __u8 length;
232 __u8 num_rsp; 232 __u8 num_rsp;
233} __attribute__ ((packed)); 233} __packed;
234 234
235#define HCI_OP_INQUIRY_CANCEL 0x0402 235#define HCI_OP_INQUIRY_CANCEL 0x0402
236 236
@@ -244,81 +244,81 @@ struct hci_cp_create_conn {
244 __u8 pscan_mode; 244 __u8 pscan_mode;
245 __le16 clock_offset; 245 __le16 clock_offset;
246 __u8 role_switch; 246 __u8 role_switch;
247} __attribute__ ((packed)); 247} __packed;
248 248
249#define HCI_OP_DISCONNECT 0x0406 249#define HCI_OP_DISCONNECT 0x0406
250struct hci_cp_disconnect { 250struct hci_cp_disconnect {
251 __le16 handle; 251 __le16 handle;
252 __u8 reason; 252 __u8 reason;
253} __attribute__ ((packed)); 253} __packed;
254 254
255#define HCI_OP_ADD_SCO 0x0407 255#define HCI_OP_ADD_SCO 0x0407
256struct hci_cp_add_sco { 256struct hci_cp_add_sco {
257 __le16 handle; 257 __le16 handle;
258 __le16 pkt_type; 258 __le16 pkt_type;
259} __attribute__ ((packed)); 259} __packed;
260 260
261#define HCI_OP_CREATE_CONN_CANCEL 0x0408 261#define HCI_OP_CREATE_CONN_CANCEL 0x0408
262struct hci_cp_create_conn_cancel { 262struct hci_cp_create_conn_cancel {
263 bdaddr_t bdaddr; 263 bdaddr_t bdaddr;
264} __attribute__ ((packed)); 264} __packed;
265 265
266#define HCI_OP_ACCEPT_CONN_REQ 0x0409 266#define HCI_OP_ACCEPT_CONN_REQ 0x0409
267struct hci_cp_accept_conn_req { 267struct hci_cp_accept_conn_req {
268 bdaddr_t bdaddr; 268 bdaddr_t bdaddr;
269 __u8 role; 269 __u8 role;
270} __attribute__ ((packed)); 270} __packed;
271 271
272#define HCI_OP_REJECT_CONN_REQ 0x040a 272#define HCI_OP_REJECT_CONN_REQ 0x040a
273struct hci_cp_reject_conn_req { 273struct hci_cp_reject_conn_req {
274 bdaddr_t bdaddr; 274 bdaddr_t bdaddr;
275 __u8 reason; 275 __u8 reason;
276} __attribute__ ((packed)); 276} __packed;
277 277
278#define HCI_OP_LINK_KEY_REPLY 0x040b 278#define HCI_OP_LINK_KEY_REPLY 0x040b
279struct hci_cp_link_key_reply { 279struct hci_cp_link_key_reply {
280 bdaddr_t bdaddr; 280 bdaddr_t bdaddr;
281 __u8 link_key[16]; 281 __u8 link_key[16];
282} __attribute__ ((packed)); 282} __packed;
283 283
284#define HCI_OP_LINK_KEY_NEG_REPLY 0x040c 284#define HCI_OP_LINK_KEY_NEG_REPLY 0x040c
285struct hci_cp_link_key_neg_reply { 285struct hci_cp_link_key_neg_reply {
286 bdaddr_t bdaddr; 286 bdaddr_t bdaddr;
287} __attribute__ ((packed)); 287} __packed;
288 288
289#define HCI_OP_PIN_CODE_REPLY 0x040d 289#define HCI_OP_PIN_CODE_REPLY 0x040d
290struct hci_cp_pin_code_reply { 290struct hci_cp_pin_code_reply {
291 bdaddr_t bdaddr; 291 bdaddr_t bdaddr;
292 __u8 pin_len; 292 __u8 pin_len;
293 __u8 pin_code[16]; 293 __u8 pin_code[16];
294} __attribute__ ((packed)); 294} __packed;
295 295
296#define HCI_OP_PIN_CODE_NEG_REPLY 0x040e 296#define HCI_OP_PIN_CODE_NEG_REPLY 0x040e
297struct hci_cp_pin_code_neg_reply { 297struct hci_cp_pin_code_neg_reply {
298 bdaddr_t bdaddr; 298 bdaddr_t bdaddr;
299} __attribute__ ((packed)); 299} __packed;
300 300
301#define HCI_OP_CHANGE_CONN_PTYPE 0x040f 301#define HCI_OP_CHANGE_CONN_PTYPE 0x040f
302struct hci_cp_change_conn_ptype { 302struct hci_cp_change_conn_ptype {
303 __le16 handle; 303 __le16 handle;
304 __le16 pkt_type; 304 __le16 pkt_type;
305} __attribute__ ((packed)); 305} __packed;
306 306
307#define HCI_OP_AUTH_REQUESTED 0x0411 307#define HCI_OP_AUTH_REQUESTED 0x0411
308struct hci_cp_auth_requested { 308struct hci_cp_auth_requested {
309 __le16 handle; 309 __le16 handle;
310} __attribute__ ((packed)); 310} __packed;
311 311
312#define HCI_OP_SET_CONN_ENCRYPT 0x0413 312#define HCI_OP_SET_CONN_ENCRYPT 0x0413
313struct hci_cp_set_conn_encrypt { 313struct hci_cp_set_conn_encrypt {
314 __le16 handle; 314 __le16 handle;
315 __u8 encrypt; 315 __u8 encrypt;
316} __attribute__ ((packed)); 316} __packed;
317 317
318#define HCI_OP_CHANGE_CONN_LINK_KEY 0x0415 318#define HCI_OP_CHANGE_CONN_LINK_KEY 0x0415
319struct hci_cp_change_conn_link_key { 319struct hci_cp_change_conn_link_key {
320 __le16 handle; 320 __le16 handle;
321} __attribute__ ((packed)); 321} __packed;
322 322
323#define HCI_OP_REMOTE_NAME_REQ 0x0419 323#define HCI_OP_REMOTE_NAME_REQ 0x0419
324struct hci_cp_remote_name_req { 324struct hci_cp_remote_name_req {
@@ -326,28 +326,28 @@ struct hci_cp_remote_name_req {
326 __u8 pscan_rep_mode; 326 __u8 pscan_rep_mode;
327 __u8 pscan_mode; 327 __u8 pscan_mode;
328 __le16 clock_offset; 328 __le16 clock_offset;
329} __attribute__ ((packed)); 329} __packed;
330 330
331#define HCI_OP_REMOTE_NAME_REQ_CANCEL 0x041a 331#define HCI_OP_REMOTE_NAME_REQ_CANCEL 0x041a
332struct hci_cp_remote_name_req_cancel { 332struct hci_cp_remote_name_req_cancel {
333 bdaddr_t bdaddr; 333 bdaddr_t bdaddr;
334} __attribute__ ((packed)); 334} __packed;
335 335
336#define HCI_OP_READ_REMOTE_FEATURES 0x041b 336#define HCI_OP_READ_REMOTE_FEATURES 0x041b
337struct hci_cp_read_remote_features { 337struct hci_cp_read_remote_features {
338 __le16 handle; 338 __le16 handle;
339} __attribute__ ((packed)); 339} __packed;
340 340
341#define HCI_OP_READ_REMOTE_EXT_FEATURES 0x041c 341#define HCI_OP_READ_REMOTE_EXT_FEATURES 0x041c
342struct hci_cp_read_remote_ext_features { 342struct hci_cp_read_remote_ext_features {
343 __le16 handle; 343 __le16 handle;
344 __u8 page; 344 __u8 page;
345} __attribute__ ((packed)); 345} __packed;
346 346
347#define HCI_OP_READ_REMOTE_VERSION 0x041d 347#define HCI_OP_READ_REMOTE_VERSION 0x041d
348struct hci_cp_read_remote_version { 348struct hci_cp_read_remote_version {
349 __le16 handle; 349 __le16 handle;
350} __attribute__ ((packed)); 350} __packed;
351 351
352#define HCI_OP_SETUP_SYNC_CONN 0x0428 352#define HCI_OP_SETUP_SYNC_CONN 0x0428
353struct hci_cp_setup_sync_conn { 353struct hci_cp_setup_sync_conn {
@@ -358,7 +358,7 @@ struct hci_cp_setup_sync_conn {
358 __le16 voice_setting; 358 __le16 voice_setting;
359 __u8 retrans_effort; 359 __u8 retrans_effort;
360 __le16 pkt_type; 360 __le16 pkt_type;
361} __attribute__ ((packed)); 361} __packed;
362 362
363#define HCI_OP_ACCEPT_SYNC_CONN_REQ 0x0429 363#define HCI_OP_ACCEPT_SYNC_CONN_REQ 0x0429
364struct hci_cp_accept_sync_conn_req { 364struct hci_cp_accept_sync_conn_req {
@@ -369,13 +369,13 @@ struct hci_cp_accept_sync_conn_req {
369 __le16 content_format; 369 __le16 content_format;
370 __u8 retrans_effort; 370 __u8 retrans_effort;
371 __le16 pkt_type; 371 __le16 pkt_type;
372} __attribute__ ((packed)); 372} __packed;
373 373
374#define HCI_OP_REJECT_SYNC_CONN_REQ 0x042a 374#define HCI_OP_REJECT_SYNC_CONN_REQ 0x042a
375struct hci_cp_reject_sync_conn_req { 375struct hci_cp_reject_sync_conn_req {
376 bdaddr_t bdaddr; 376 bdaddr_t bdaddr;
377 __u8 reason; 377 __u8 reason;
378} __attribute__ ((packed)); 378} __packed;
379 379
380#define HCI_OP_SNIFF_MODE 0x0803 380#define HCI_OP_SNIFF_MODE 0x0803
381struct hci_cp_sniff_mode { 381struct hci_cp_sniff_mode {
@@ -384,59 +384,59 @@ struct hci_cp_sniff_mode {
384 __le16 min_interval; 384 __le16 min_interval;
385 __le16 attempt; 385 __le16 attempt;
386 __le16 timeout; 386 __le16 timeout;
387} __attribute__ ((packed)); 387} __packed;
388 388
389#define HCI_OP_EXIT_SNIFF_MODE 0x0804 389#define HCI_OP_EXIT_SNIFF_MODE 0x0804
390struct hci_cp_exit_sniff_mode { 390struct hci_cp_exit_sniff_mode {
391 __le16 handle; 391 __le16 handle;
392} __attribute__ ((packed)); 392} __packed;
393 393
394#define HCI_OP_ROLE_DISCOVERY 0x0809 394#define HCI_OP_ROLE_DISCOVERY 0x0809
395struct hci_cp_role_discovery { 395struct hci_cp_role_discovery {
396 __le16 handle; 396 __le16 handle;
397} __attribute__ ((packed)); 397} __packed;
398struct hci_rp_role_discovery { 398struct hci_rp_role_discovery {
399 __u8 status; 399 __u8 status;
400 __le16 handle; 400 __le16 handle;
401 __u8 role; 401 __u8 role;
402} __attribute__ ((packed)); 402} __packed;
403 403
404#define HCI_OP_SWITCH_ROLE 0x080b 404#define HCI_OP_SWITCH_ROLE 0x080b
405struct hci_cp_switch_role { 405struct hci_cp_switch_role {
406 bdaddr_t bdaddr; 406 bdaddr_t bdaddr;
407 __u8 role; 407 __u8 role;
408} __attribute__ ((packed)); 408} __packed;
409 409
410#define HCI_OP_READ_LINK_POLICY 0x080c 410#define HCI_OP_READ_LINK_POLICY 0x080c
411struct hci_cp_read_link_policy { 411struct hci_cp_read_link_policy {
412 __le16 handle; 412 __le16 handle;
413} __attribute__ ((packed)); 413} __packed;
414struct hci_rp_read_link_policy { 414struct hci_rp_read_link_policy {
415 __u8 status; 415 __u8 status;
416 __le16 handle; 416 __le16 handle;
417 __le16 policy; 417 __le16 policy;
418} __attribute__ ((packed)); 418} __packed;
419 419
420#define HCI_OP_WRITE_LINK_POLICY 0x080d 420#define HCI_OP_WRITE_LINK_POLICY 0x080d
421struct hci_cp_write_link_policy { 421struct hci_cp_write_link_policy {
422 __le16 handle; 422 __le16 handle;
423 __le16 policy; 423 __le16 policy;
424} __attribute__ ((packed)); 424} __packed;
425struct hci_rp_write_link_policy { 425struct hci_rp_write_link_policy {
426 __u8 status; 426 __u8 status;
427 __le16 handle; 427 __le16 handle;
428} __attribute__ ((packed)); 428} __packed;
429 429
430#define HCI_OP_READ_DEF_LINK_POLICY 0x080e 430#define HCI_OP_READ_DEF_LINK_POLICY 0x080e
431struct hci_rp_read_def_link_policy { 431struct hci_rp_read_def_link_policy {
432 __u8 status; 432 __u8 status;
433 __le16 policy; 433 __le16 policy;
434} __attribute__ ((packed)); 434} __packed;
435 435
436#define HCI_OP_WRITE_DEF_LINK_POLICY 0x080f 436#define HCI_OP_WRITE_DEF_LINK_POLICY 0x080f
437struct hci_cp_write_def_link_policy { 437struct hci_cp_write_def_link_policy {
438 __le16 policy; 438 __le16 policy;
439} __attribute__ ((packed)); 439} __packed;
440 440
441#define HCI_OP_SNIFF_SUBRATE 0x0811 441#define HCI_OP_SNIFF_SUBRATE 0x0811
442struct hci_cp_sniff_subrate { 442struct hci_cp_sniff_subrate {
@@ -444,12 +444,12 @@ struct hci_cp_sniff_subrate {
444 __le16 max_latency; 444 __le16 max_latency;
445 __le16 min_remote_timeout; 445 __le16 min_remote_timeout;
446 __le16 min_local_timeout; 446 __le16 min_local_timeout;
447} __attribute__ ((packed)); 447} __packed;
448 448
449#define HCI_OP_SET_EVENT_MASK 0x0c01 449#define HCI_OP_SET_EVENT_MASK 0x0c01
450struct hci_cp_set_event_mask { 450struct hci_cp_set_event_mask {
451 __u8 mask[8]; 451 __u8 mask[8];
452} __attribute__ ((packed)); 452} __packed;
453 453
454#define HCI_OP_RESET 0x0c03 454#define HCI_OP_RESET 0x0c03
455 455
@@ -458,7 +458,7 @@ struct hci_cp_set_event_flt {
458 __u8 flt_type; 458 __u8 flt_type;
459 __u8 cond_type; 459 __u8 cond_type;
460 __u8 condition[0]; 460 __u8 condition[0];
461} __attribute__ ((packed)); 461} __packed;
462 462
463/* Filter types */ 463/* Filter types */
464#define HCI_FLT_CLEAR_ALL 0x00 464#define HCI_FLT_CLEAR_ALL 0x00
@@ -477,13 +477,13 @@ struct hci_cp_set_event_flt {
477#define HCI_OP_WRITE_LOCAL_NAME 0x0c13 477#define HCI_OP_WRITE_LOCAL_NAME 0x0c13
478struct hci_cp_write_local_name { 478struct hci_cp_write_local_name {
479 __u8 name[248]; 479 __u8 name[248];
480} __attribute__ ((packed)); 480} __packed;
481 481
482#define HCI_OP_READ_LOCAL_NAME 0x0c14 482#define HCI_OP_READ_LOCAL_NAME 0x0c14
483struct hci_rp_read_local_name { 483struct hci_rp_read_local_name {
484 __u8 status; 484 __u8 status;
485 __u8 name[248]; 485 __u8 name[248];
486} __attribute__ ((packed)); 486} __packed;
487 487
488#define HCI_OP_WRITE_CA_TIMEOUT 0x0c16 488#define HCI_OP_WRITE_CA_TIMEOUT 0x0c16
489 489
@@ -511,23 +511,23 @@ struct hci_rp_read_local_name {
511struct hci_rp_read_class_of_dev { 511struct hci_rp_read_class_of_dev {
512 __u8 status; 512 __u8 status;
513 __u8 dev_class[3]; 513 __u8 dev_class[3];
514} __attribute__ ((packed)); 514} __packed;
515 515
516#define HCI_OP_WRITE_CLASS_OF_DEV 0x0c24 516#define HCI_OP_WRITE_CLASS_OF_DEV 0x0c24
517struct hci_cp_write_class_of_dev { 517struct hci_cp_write_class_of_dev {
518 __u8 dev_class[3]; 518 __u8 dev_class[3];
519} __attribute__ ((packed)); 519} __packed;
520 520
521#define HCI_OP_READ_VOICE_SETTING 0x0c25 521#define HCI_OP_READ_VOICE_SETTING 0x0c25
522struct hci_rp_read_voice_setting { 522struct hci_rp_read_voice_setting {
523 __u8 status; 523 __u8 status;
524 __le16 voice_setting; 524 __le16 voice_setting;
525} __attribute__ ((packed)); 525} __packed;
526 526
527#define HCI_OP_WRITE_VOICE_SETTING 0x0c26 527#define HCI_OP_WRITE_VOICE_SETTING 0x0c26
528struct hci_cp_write_voice_setting { 528struct hci_cp_write_voice_setting {
529 __le16 voice_setting; 529 __le16 voice_setting;
530} __attribute__ ((packed)); 530} __packed;
531 531
532#define HCI_OP_HOST_BUFFER_SIZE 0x0c33 532#define HCI_OP_HOST_BUFFER_SIZE 0x0c33
533struct hci_cp_host_buffer_size { 533struct hci_cp_host_buffer_size {
@@ -535,18 +535,18 @@ struct hci_cp_host_buffer_size {
535 __u8 sco_mtu; 535 __u8 sco_mtu;
536 __le16 acl_max_pkt; 536 __le16 acl_max_pkt;
537 __le16 sco_max_pkt; 537 __le16 sco_max_pkt;
538} __attribute__ ((packed)); 538} __packed;
539 539
540#define HCI_OP_READ_SSP_MODE 0x0c55 540#define HCI_OP_READ_SSP_MODE 0x0c55
541struct hci_rp_read_ssp_mode { 541struct hci_rp_read_ssp_mode {
542 __u8 status; 542 __u8 status;
543 __u8 mode; 543 __u8 mode;
544} __attribute__ ((packed)); 544} __packed;
545 545
546#define HCI_OP_WRITE_SSP_MODE 0x0c56 546#define HCI_OP_WRITE_SSP_MODE 0x0c56
547struct hci_cp_write_ssp_mode { 547struct hci_cp_write_ssp_mode {
548 __u8 mode; 548 __u8 mode;
549} __attribute__ ((packed)); 549} __packed;
550 550
551#define HCI_OP_READ_LOCAL_VERSION 0x1001 551#define HCI_OP_READ_LOCAL_VERSION 0x1001
552struct hci_rp_read_local_version { 552struct hci_rp_read_local_version {
@@ -556,19 +556,19 @@ struct hci_rp_read_local_version {
556 __u8 lmp_ver; 556 __u8 lmp_ver;
557 __le16 manufacturer; 557 __le16 manufacturer;
558 __le16 lmp_subver; 558 __le16 lmp_subver;
559} __attribute__ ((packed)); 559} __packed;
560 560
561#define HCI_OP_READ_LOCAL_COMMANDS 0x1002 561#define HCI_OP_READ_LOCAL_COMMANDS 0x1002
562struct hci_rp_read_local_commands { 562struct hci_rp_read_local_commands {
563 __u8 status; 563 __u8 status;
564 __u8 commands[64]; 564 __u8 commands[64];
565} __attribute__ ((packed)); 565} __packed;
566 566
567#define HCI_OP_READ_LOCAL_FEATURES 0x1003 567#define HCI_OP_READ_LOCAL_FEATURES 0x1003
568struct hci_rp_read_local_features { 568struct hci_rp_read_local_features {
569 __u8 status; 569 __u8 status;
570 __u8 features[8]; 570 __u8 features[8];
571} __attribute__ ((packed)); 571} __packed;
572 572
573#define HCI_OP_READ_LOCAL_EXT_FEATURES 0x1004 573#define HCI_OP_READ_LOCAL_EXT_FEATURES 0x1004
574struct hci_rp_read_local_ext_features { 574struct hci_rp_read_local_ext_features {
@@ -576,7 +576,7 @@ struct hci_rp_read_local_ext_features {
576 __u8 page; 576 __u8 page;
577 __u8 max_page; 577 __u8 max_page;
578 __u8 features[8]; 578 __u8 features[8];
579} __attribute__ ((packed)); 579} __packed;
580 580
581#define HCI_OP_READ_BUFFER_SIZE 0x1005 581#define HCI_OP_READ_BUFFER_SIZE 0x1005
582struct hci_rp_read_buffer_size { 582struct hci_rp_read_buffer_size {
@@ -585,13 +585,13 @@ struct hci_rp_read_buffer_size {
585 __u8 sco_mtu; 585 __u8 sco_mtu;
586 __le16 acl_max_pkt; 586 __le16 acl_max_pkt;
587 __le16 sco_max_pkt; 587 __le16 sco_max_pkt;
588} __attribute__ ((packed)); 588} __packed;
589 589
590#define HCI_OP_READ_BD_ADDR 0x1009 590#define HCI_OP_READ_BD_ADDR 0x1009
591struct hci_rp_read_bd_addr { 591struct hci_rp_read_bd_addr {
592 __u8 status; 592 __u8 status;
593 bdaddr_t bdaddr; 593 bdaddr_t bdaddr;
594} __attribute__ ((packed)); 594} __packed;
595 595
596/* ---- HCI Events ---- */ 596/* ---- HCI Events ---- */
597#define HCI_EV_INQUIRY_COMPLETE 0x01 597#define HCI_EV_INQUIRY_COMPLETE 0x01
@@ -604,7 +604,7 @@ struct inquiry_info {
604 __u8 pscan_mode; 604 __u8 pscan_mode;
605 __u8 dev_class[3]; 605 __u8 dev_class[3];
606 __le16 clock_offset; 606 __le16 clock_offset;
607} __attribute__ ((packed)); 607} __packed;
608 608
609#define HCI_EV_CONN_COMPLETE 0x03 609#define HCI_EV_CONN_COMPLETE 0x03
610struct hci_ev_conn_complete { 610struct hci_ev_conn_complete {
@@ -613,54 +613,54 @@ struct hci_ev_conn_complete {
613 bdaddr_t bdaddr; 613 bdaddr_t bdaddr;
614 __u8 link_type; 614 __u8 link_type;
615 __u8 encr_mode; 615 __u8 encr_mode;
616} __attribute__ ((packed)); 616} __packed;
617 617
618#define HCI_EV_CONN_REQUEST 0x04 618#define HCI_EV_CONN_REQUEST 0x04
619struct hci_ev_conn_request { 619struct hci_ev_conn_request {
620 bdaddr_t bdaddr; 620 bdaddr_t bdaddr;
621 __u8 dev_class[3]; 621 __u8 dev_class[3];
622 __u8 link_type; 622 __u8 link_type;
623} __attribute__ ((packed)); 623} __packed;
624 624
625#define HCI_EV_DISCONN_COMPLETE 0x05 625#define HCI_EV_DISCONN_COMPLETE 0x05
626struct hci_ev_disconn_complete { 626struct hci_ev_disconn_complete {
627 __u8 status; 627 __u8 status;
628 __le16 handle; 628 __le16 handle;
629 __u8 reason; 629 __u8 reason;
630} __attribute__ ((packed)); 630} __packed;
631 631
632#define HCI_EV_AUTH_COMPLETE 0x06 632#define HCI_EV_AUTH_COMPLETE 0x06
633struct hci_ev_auth_complete { 633struct hci_ev_auth_complete {
634 __u8 status; 634 __u8 status;
635 __le16 handle; 635 __le16 handle;
636} __attribute__ ((packed)); 636} __packed;
637 637
638#define HCI_EV_REMOTE_NAME 0x07 638#define HCI_EV_REMOTE_NAME 0x07
639struct hci_ev_remote_name { 639struct hci_ev_remote_name {
640 __u8 status; 640 __u8 status;
641 bdaddr_t bdaddr; 641 bdaddr_t bdaddr;
642 __u8 name[248]; 642 __u8 name[248];
643} __attribute__ ((packed)); 643} __packed;
644 644
645#define HCI_EV_ENCRYPT_CHANGE 0x08 645#define HCI_EV_ENCRYPT_CHANGE 0x08
646struct hci_ev_encrypt_change { 646struct hci_ev_encrypt_change {
647 __u8 status; 647 __u8 status;
648 __le16 handle; 648 __le16 handle;
649 __u8 encrypt; 649 __u8 encrypt;
650} __attribute__ ((packed)); 650} __packed;
651 651
652#define HCI_EV_CHANGE_LINK_KEY_COMPLETE 0x09 652#define HCI_EV_CHANGE_LINK_KEY_COMPLETE 0x09
653struct hci_ev_change_link_key_complete { 653struct hci_ev_change_link_key_complete {
654 __u8 status; 654 __u8 status;
655 __le16 handle; 655 __le16 handle;
656} __attribute__ ((packed)); 656} __packed;
657 657
658#define HCI_EV_REMOTE_FEATURES 0x0b 658#define HCI_EV_REMOTE_FEATURES 0x0b
659struct hci_ev_remote_features { 659struct hci_ev_remote_features {
660 __u8 status; 660 __u8 status;
661 __le16 handle; 661 __le16 handle;
662 __u8 features[8]; 662 __u8 features[8];
663} __attribute__ ((packed)); 663} __packed;
664 664
665#define HCI_EV_REMOTE_VERSION 0x0c 665#define HCI_EV_REMOTE_VERSION 0x0c
666struct hci_ev_remote_version { 666struct hci_ev_remote_version {
@@ -669,7 +669,7 @@ struct hci_ev_remote_version {
669 __u8 lmp_ver; 669 __u8 lmp_ver;
670 __le16 manufacturer; 670 __le16 manufacturer;
671 __le16 lmp_subver; 671 __le16 lmp_subver;
672} __attribute__ ((packed)); 672} __packed;
673 673
674#define HCI_EV_QOS_SETUP_COMPLETE 0x0d 674#define HCI_EV_QOS_SETUP_COMPLETE 0x0d
675struct hci_qos { 675struct hci_qos {
@@ -678,38 +678,38 @@ struct hci_qos {
678 __u32 peak_bandwidth; 678 __u32 peak_bandwidth;
679 __u32 latency; 679 __u32 latency;
680 __u32 delay_variation; 680 __u32 delay_variation;
681} __attribute__ ((packed)); 681} __packed;
682struct hci_ev_qos_setup_complete { 682struct hci_ev_qos_setup_complete {
683 __u8 status; 683 __u8 status;
684 __le16 handle; 684 __le16 handle;
685 struct hci_qos qos; 685 struct hci_qos qos;
686} __attribute__ ((packed)); 686} __packed;
687 687
688#define HCI_EV_CMD_COMPLETE 0x0e 688#define HCI_EV_CMD_COMPLETE 0x0e
689struct hci_ev_cmd_complete { 689struct hci_ev_cmd_complete {
690 __u8 ncmd; 690 __u8 ncmd;
691 __le16 opcode; 691 __le16 opcode;
692} __attribute__ ((packed)); 692} __packed;
693 693
694#define HCI_EV_CMD_STATUS 0x0f 694#define HCI_EV_CMD_STATUS 0x0f
695struct hci_ev_cmd_status { 695struct hci_ev_cmd_status {
696 __u8 status; 696 __u8 status;
697 __u8 ncmd; 697 __u8 ncmd;
698 __le16 opcode; 698 __le16 opcode;
699} __attribute__ ((packed)); 699} __packed;
700 700
701#define HCI_EV_ROLE_CHANGE 0x12 701#define HCI_EV_ROLE_CHANGE 0x12
702struct hci_ev_role_change { 702struct hci_ev_role_change {
703 __u8 status; 703 __u8 status;
704 bdaddr_t bdaddr; 704 bdaddr_t bdaddr;
705 __u8 role; 705 __u8 role;
706} __attribute__ ((packed)); 706} __packed;
707 707
708#define HCI_EV_NUM_COMP_PKTS 0x13 708#define HCI_EV_NUM_COMP_PKTS 0x13
709struct hci_ev_num_comp_pkts { 709struct hci_ev_num_comp_pkts {
710 __u8 num_hndl; 710 __u8 num_hndl;
711 /* variable length part */ 711 /* variable length part */
712} __attribute__ ((packed)); 712} __packed;
713 713
714#define HCI_EV_MODE_CHANGE 0x14 714#define HCI_EV_MODE_CHANGE 0x14
715struct hci_ev_mode_change { 715struct hci_ev_mode_change {
@@ -717,44 +717,44 @@ struct hci_ev_mode_change {
717 __le16 handle; 717 __le16 handle;
718 __u8 mode; 718 __u8 mode;
719 __le16 interval; 719 __le16 interval;
720} __attribute__ ((packed)); 720} __packed;
721 721
722#define HCI_EV_PIN_CODE_REQ 0x16 722#define HCI_EV_PIN_CODE_REQ 0x16
723struct hci_ev_pin_code_req { 723struct hci_ev_pin_code_req {
724 bdaddr_t bdaddr; 724 bdaddr_t bdaddr;
725} __attribute__ ((packed)); 725} __packed;
726 726
727#define HCI_EV_LINK_KEY_REQ 0x17 727#define HCI_EV_LINK_KEY_REQ 0x17
728struct hci_ev_link_key_req { 728struct hci_ev_link_key_req {
729 bdaddr_t bdaddr; 729 bdaddr_t bdaddr;
730} __attribute__ ((packed)); 730} __packed;
731 731
732#define HCI_EV_LINK_KEY_NOTIFY 0x18 732#define HCI_EV_LINK_KEY_NOTIFY 0x18
733struct hci_ev_link_key_notify { 733struct hci_ev_link_key_notify {
734 bdaddr_t bdaddr; 734 bdaddr_t bdaddr;
735 __u8 link_key[16]; 735 __u8 link_key[16];
736 __u8 key_type; 736 __u8 key_type;
737} __attribute__ ((packed)); 737} __packed;
738 738
739#define HCI_EV_CLOCK_OFFSET 0x1c 739#define HCI_EV_CLOCK_OFFSET 0x1c
740struct hci_ev_clock_offset { 740struct hci_ev_clock_offset {
741 __u8 status; 741 __u8 status;
742 __le16 handle; 742 __le16 handle;
743 __le16 clock_offset; 743 __le16 clock_offset;
744} __attribute__ ((packed)); 744} __packed;
745 745
746#define HCI_EV_PKT_TYPE_CHANGE 0x1d 746#define HCI_EV_PKT_TYPE_CHANGE 0x1d
747struct hci_ev_pkt_type_change { 747struct hci_ev_pkt_type_change {
748 __u8 status; 748 __u8 status;
749 __le16 handle; 749 __le16 handle;
750 __le16 pkt_type; 750 __le16 pkt_type;
751} __attribute__ ((packed)); 751} __packed;
752 752
753#define HCI_EV_PSCAN_REP_MODE 0x20 753#define HCI_EV_PSCAN_REP_MODE 0x20
754struct hci_ev_pscan_rep_mode { 754struct hci_ev_pscan_rep_mode {
755 bdaddr_t bdaddr; 755 bdaddr_t bdaddr;
756 __u8 pscan_rep_mode; 756 __u8 pscan_rep_mode;
757} __attribute__ ((packed)); 757} __packed;
758 758
759#define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 759#define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22
760struct inquiry_info_with_rssi { 760struct inquiry_info_with_rssi {
@@ -764,7 +764,7 @@ struct inquiry_info_with_rssi {
764 __u8 dev_class[3]; 764 __u8 dev_class[3];
765 __le16 clock_offset; 765 __le16 clock_offset;
766 __s8 rssi; 766 __s8 rssi;
767} __attribute__ ((packed)); 767} __packed;
768struct inquiry_info_with_rssi_and_pscan_mode { 768struct inquiry_info_with_rssi_and_pscan_mode {
769 bdaddr_t bdaddr; 769 bdaddr_t bdaddr;
770 __u8 pscan_rep_mode; 770 __u8 pscan_rep_mode;
@@ -773,7 +773,7 @@ struct inquiry_info_with_rssi_and_pscan_mode {
773 __u8 dev_class[3]; 773 __u8 dev_class[3];
774 __le16 clock_offset; 774 __le16 clock_offset;
775 __s8 rssi; 775 __s8 rssi;
776} __attribute__ ((packed)); 776} __packed;
777 777
778#define HCI_EV_REMOTE_EXT_FEATURES 0x23 778#define HCI_EV_REMOTE_EXT_FEATURES 0x23
779struct hci_ev_remote_ext_features { 779struct hci_ev_remote_ext_features {
@@ -782,7 +782,7 @@ struct hci_ev_remote_ext_features {
782 __u8 page; 782 __u8 page;
783 __u8 max_page; 783 __u8 max_page;
784 __u8 features[8]; 784 __u8 features[8];
785} __attribute__ ((packed)); 785} __packed;
786 786
787#define HCI_EV_SYNC_CONN_COMPLETE 0x2c 787#define HCI_EV_SYNC_CONN_COMPLETE 0x2c
788struct hci_ev_sync_conn_complete { 788struct hci_ev_sync_conn_complete {
@@ -795,7 +795,7 @@ struct hci_ev_sync_conn_complete {
795 __le16 rx_pkt_len; 795 __le16 rx_pkt_len;
796 __le16 tx_pkt_len; 796 __le16 tx_pkt_len;
797 __u8 air_mode; 797 __u8 air_mode;
798} __attribute__ ((packed)); 798} __packed;
799 799
800#define HCI_EV_SYNC_CONN_CHANGED 0x2d 800#define HCI_EV_SYNC_CONN_CHANGED 0x2d
801struct hci_ev_sync_conn_changed { 801struct hci_ev_sync_conn_changed {
@@ -805,7 +805,7 @@ struct hci_ev_sync_conn_changed {
805 __u8 retrans_window; 805 __u8 retrans_window;
806 __le16 rx_pkt_len; 806 __le16 rx_pkt_len;
807 __le16 tx_pkt_len; 807 __le16 tx_pkt_len;
808} __attribute__ ((packed)); 808} __packed;
809 809
810#define HCI_EV_SNIFF_SUBRATE 0x2e 810#define HCI_EV_SNIFF_SUBRATE 0x2e
811struct hci_ev_sniff_subrate { 811struct hci_ev_sniff_subrate {
@@ -815,7 +815,7 @@ struct hci_ev_sniff_subrate {
815 __le16 max_rx_latency; 815 __le16 max_rx_latency;
816 __le16 max_remote_timeout; 816 __le16 max_remote_timeout;
817 __le16 max_local_timeout; 817 __le16 max_local_timeout;
818} __attribute__ ((packed)); 818} __packed;
819 819
820#define HCI_EV_EXTENDED_INQUIRY_RESULT 0x2f 820#define HCI_EV_EXTENDED_INQUIRY_RESULT 0x2f
821struct extended_inquiry_info { 821struct extended_inquiry_info {
@@ -826,37 +826,37 @@ struct extended_inquiry_info {
826 __le16 clock_offset; 826 __le16 clock_offset;
827 __s8 rssi; 827 __s8 rssi;
828 __u8 data[240]; 828 __u8 data[240];
829} __attribute__ ((packed)); 829} __packed;
830 830
831#define HCI_EV_IO_CAPA_REQUEST 0x31 831#define HCI_EV_IO_CAPA_REQUEST 0x31
832struct hci_ev_io_capa_request { 832struct hci_ev_io_capa_request {
833 bdaddr_t bdaddr; 833 bdaddr_t bdaddr;
834} __attribute__ ((packed)); 834} __packed;
835 835
836#define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 836#define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36
837struct hci_ev_simple_pair_complete { 837struct hci_ev_simple_pair_complete {
838 __u8 status; 838 __u8 status;
839 bdaddr_t bdaddr; 839 bdaddr_t bdaddr;
840} __attribute__ ((packed)); 840} __packed;
841 841
842#define HCI_EV_REMOTE_HOST_FEATURES 0x3d 842#define HCI_EV_REMOTE_HOST_FEATURES 0x3d
843struct hci_ev_remote_host_features { 843struct hci_ev_remote_host_features {
844 bdaddr_t bdaddr; 844 bdaddr_t bdaddr;
845 __u8 features[8]; 845 __u8 features[8];
846} __attribute__ ((packed)); 846} __packed;
847 847
848/* Internal events generated by Bluetooth stack */ 848/* Internal events generated by Bluetooth stack */
849#define HCI_EV_STACK_INTERNAL 0xfd 849#define HCI_EV_STACK_INTERNAL 0xfd
850struct hci_ev_stack_internal { 850struct hci_ev_stack_internal {
851 __u16 type; 851 __u16 type;
852 __u8 data[0]; 852 __u8 data[0];
853} __attribute__ ((packed)); 853} __packed;
854 854
855#define HCI_EV_SI_DEVICE 0x01 855#define HCI_EV_SI_DEVICE 0x01
856struct hci_ev_si_device { 856struct hci_ev_si_device {
857 __u16 event; 857 __u16 event;
858 __u16 dev_id; 858 __u16 dev_id;
859} __attribute__ ((packed)); 859} __packed;
860 860
861#define HCI_EV_SI_SECURITY 0x02 861#define HCI_EV_SI_SECURITY 0x02
862struct hci_ev_si_security { 862struct hci_ev_si_security {
@@ -864,7 +864,7 @@ struct hci_ev_si_security {
864 __u16 proto; 864 __u16 proto;
865 __u16 subproto; 865 __u16 subproto;
866 __u8 incoming; 866 __u8 incoming;
867} __attribute__ ((packed)); 867} __packed;
868 868
869/* ---- HCI Packet structures ---- */ 869/* ---- HCI Packet structures ---- */
870#define HCI_COMMAND_HDR_SIZE 3 870#define HCI_COMMAND_HDR_SIZE 3
@@ -875,22 +875,22 @@ struct hci_ev_si_security {
875struct hci_command_hdr { 875struct hci_command_hdr {
876 __le16 opcode; /* OCF & OGF */ 876 __le16 opcode; /* OCF & OGF */
877 __u8 plen; 877 __u8 plen;
878} __attribute__ ((packed)); 878} __packed;
879 879
880struct hci_event_hdr { 880struct hci_event_hdr {
881 __u8 evt; 881 __u8 evt;
882 __u8 plen; 882 __u8 plen;
883} __attribute__ ((packed)); 883} __packed;
884 884
885struct hci_acl_hdr { 885struct hci_acl_hdr {
886 __le16 handle; /* Handle & Flags(PB, BC) */ 886 __le16 handle; /* Handle & Flags(PB, BC) */
887 __le16 dlen; 887 __le16 dlen;
888} __attribute__ ((packed)); 888} __packed;
889 889
890struct hci_sco_hdr { 890struct hci_sco_hdr {
891 __le16 handle; 891 __le16 handle;
892 __u8 dlen; 892 __u8 dlen;
893} __attribute__ ((packed)); 893} __packed;
894 894
895#ifdef __KERNEL__ 895#ifdef __KERNEL__
896#include <linux/skbuff.h> 896#include <linux/skbuff.h>
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h
index 4b86c783976c..636724b203ee 100644
--- a/include/net/bluetooth/l2cap.h
+++ b/include/net/bluetooth/l2cap.h
@@ -131,31 +131,31 @@ struct l2cap_conninfo {
131struct l2cap_hdr { 131struct l2cap_hdr {
132 __le16 len; 132 __le16 len;
133 __le16 cid; 133 __le16 cid;
134} __attribute__ ((packed)); 134} __packed;
135#define L2CAP_HDR_SIZE 4 135#define L2CAP_HDR_SIZE 4
136 136
137struct l2cap_cmd_hdr { 137struct l2cap_cmd_hdr {
138 __u8 code; 138 __u8 code;
139 __u8 ident; 139 __u8 ident;
140 __le16 len; 140 __le16 len;
141} __attribute__ ((packed)); 141} __packed;
142#define L2CAP_CMD_HDR_SIZE 4 142#define L2CAP_CMD_HDR_SIZE 4
143 143
144struct l2cap_cmd_rej { 144struct l2cap_cmd_rej {
145 __le16 reason; 145 __le16 reason;
146} __attribute__ ((packed)); 146} __packed;
147 147
148struct l2cap_conn_req { 148struct l2cap_conn_req {
149 __le16 psm; 149 __le16 psm;
150 __le16 scid; 150 __le16 scid;
151} __attribute__ ((packed)); 151} __packed;
152 152
153struct l2cap_conn_rsp { 153struct l2cap_conn_rsp {
154 __le16 dcid; 154 __le16 dcid;
155 __le16 scid; 155 __le16 scid;
156 __le16 result; 156 __le16 result;
157 __le16 status; 157 __le16 status;
158} __attribute__ ((packed)); 158} __packed;
159 159
160/* channel indentifier */ 160/* channel indentifier */
161#define L2CAP_CID_SIGNALING 0x0001 161#define L2CAP_CID_SIGNALING 0x0001
@@ -179,14 +179,14 @@ struct l2cap_conf_req {
179 __le16 dcid; 179 __le16 dcid;
180 __le16 flags; 180 __le16 flags;
181 __u8 data[0]; 181 __u8 data[0];
182} __attribute__ ((packed)); 182} __packed;
183 183
184struct l2cap_conf_rsp { 184struct l2cap_conf_rsp {
185 __le16 scid; 185 __le16 scid;
186 __le16 flags; 186 __le16 flags;
187 __le16 result; 187 __le16 result;
188 __u8 data[0]; 188 __u8 data[0];
189} __attribute__ ((packed)); 189} __packed;
190 190
191#define L2CAP_CONF_SUCCESS 0x0000 191#define L2CAP_CONF_SUCCESS 0x0000
192#define L2CAP_CONF_UNACCEPT 0x0001 192#define L2CAP_CONF_UNACCEPT 0x0001
@@ -197,7 +197,7 @@ struct l2cap_conf_opt {
197 __u8 type; 197 __u8 type;
198 __u8 len; 198 __u8 len;
199 __u8 val[0]; 199 __u8 val[0];
200} __attribute__ ((packed)); 200} __packed;
201#define L2CAP_CONF_OPT_SIZE 2 201#define L2CAP_CONF_OPT_SIZE 2
202 202
203#define L2CAP_CONF_HINT 0x80 203#define L2CAP_CONF_HINT 0x80
@@ -218,7 +218,7 @@ struct l2cap_conf_rfc {
218 __le16 retrans_timeout; 218 __le16 retrans_timeout;
219 __le16 monitor_timeout; 219 __le16 monitor_timeout;
220 __le16 max_pdu_size; 220 __le16 max_pdu_size;
221} __attribute__ ((packed)); 221} __packed;
222 222
223#define L2CAP_MODE_BASIC 0x00 223#define L2CAP_MODE_BASIC 0x00
224#define L2CAP_MODE_RETRANS 0x01 224#define L2CAP_MODE_RETRANS 0x01
@@ -229,22 +229,22 @@ struct l2cap_conf_rfc {
229struct l2cap_disconn_req { 229struct l2cap_disconn_req {
230 __le16 dcid; 230 __le16 dcid;
231 __le16 scid; 231 __le16 scid;
232} __attribute__ ((packed)); 232} __packed;
233 233
234struct l2cap_disconn_rsp { 234struct l2cap_disconn_rsp {
235 __le16 dcid; 235 __le16 dcid;
236 __le16 scid; 236 __le16 scid;
237} __attribute__ ((packed)); 237} __packed;
238 238
239struct l2cap_info_req { 239struct l2cap_info_req {
240 __le16 type; 240 __le16 type;
241} __attribute__ ((packed)); 241} __packed;
242 242
243struct l2cap_info_rsp { 243struct l2cap_info_rsp {
244 __le16 type; 244 __le16 type;
245 __le16 result; 245 __le16 result;
246 __u8 data[0]; 246 __u8 data[0];
247} __attribute__ ((packed)); 247} __packed;
248 248
249/* info type */ 249/* info type */
250#define L2CAP_IT_CL_MTU 0x0001 250#define L2CAP_IT_CL_MTU 0x0001
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h
index 921d7b3c7f8d..a140847d622c 100644
--- a/include/net/bluetooth/rfcomm.h
+++ b/include/net/bluetooth/rfcomm.h
@@ -106,19 +106,19 @@ struct rfcomm_hdr {
106 u8 addr; 106 u8 addr;
107 u8 ctrl; 107 u8 ctrl;
108 u8 len; // Actual size can be 2 bytes 108 u8 len; // Actual size can be 2 bytes
109} __attribute__ ((packed)); 109} __packed;
110 110
111struct rfcomm_cmd { 111struct rfcomm_cmd {
112 u8 addr; 112 u8 addr;
113 u8 ctrl; 113 u8 ctrl;
114 u8 len; 114 u8 len;
115 u8 fcs; 115 u8 fcs;
116} __attribute__ ((packed)); 116} __packed;
117 117
118struct rfcomm_mcc { 118struct rfcomm_mcc {
119 u8 type; 119 u8 type;
120 u8 len; 120 u8 len;
121} __attribute__ ((packed)); 121} __packed;
122 122
123struct rfcomm_pn { 123struct rfcomm_pn {
124 u8 dlci; 124 u8 dlci;
@@ -128,7 +128,7 @@ struct rfcomm_pn {
128 __le16 mtu; 128 __le16 mtu;
129 u8 max_retrans; 129 u8 max_retrans;
130 u8 credits; 130 u8 credits;
131} __attribute__ ((packed)); 131} __packed;
132 132
133struct rfcomm_rpn { 133struct rfcomm_rpn {
134 u8 dlci; 134 u8 dlci;
@@ -138,17 +138,17 @@ struct rfcomm_rpn {
138 u8 xon_char; 138 u8 xon_char;
139 u8 xoff_char; 139 u8 xoff_char;
140 __le16 param_mask; 140 __le16 param_mask;
141} __attribute__ ((packed)); 141} __packed;
142 142
143struct rfcomm_rls { 143struct rfcomm_rls {
144 u8 dlci; 144 u8 dlci;
145 u8 status; 145 u8 status;
146} __attribute__ ((packed)); 146} __packed;
147 147
148struct rfcomm_msc { 148struct rfcomm_msc {
149 u8 dlci; 149 u8 dlci;
150 u8 v24_sig; 150 u8 v24_sig;
151} __attribute__ ((packed)); 151} __packed;
152 152
153/* ---- Core structures, flags etc ---- */ 153/* ---- Core structures, flags etc ---- */
154 154