Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Gustavo F. Padovan and committed by
Marcel Holtmann
66c853cc d1c4a17d

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