.. | .. |
---|
52 | 52 | __le16 len; |
---|
53 | 53 | } __packed; |
---|
54 | 54 | |
---|
| 55 | +struct mgmt_tlv { |
---|
| 56 | + __le16 type; |
---|
| 57 | + __u8 length; |
---|
| 58 | + __u8 value[]; |
---|
| 59 | +} __packed; |
---|
| 60 | + |
---|
55 | 61 | struct mgmt_addr_info { |
---|
56 | 62 | bdaddr_t bdaddr; |
---|
57 | 63 | __u8 type; |
---|
.. | .. |
---|
70 | 76 | struct mgmt_rp_read_commands { |
---|
71 | 77 | __le16 num_commands; |
---|
72 | 78 | __le16 num_events; |
---|
73 | | - __le16 opcodes[0]; |
---|
| 79 | + __le16 opcodes[]; |
---|
74 | 80 | } __packed; |
---|
75 | 81 | |
---|
76 | 82 | #define MGMT_OP_READ_INDEX_LIST 0x0003 |
---|
77 | 83 | #define MGMT_READ_INDEX_LIST_SIZE 0 |
---|
78 | 84 | struct mgmt_rp_read_index_list { |
---|
79 | 85 | __le16 num_controllers; |
---|
80 | | - __le16 index[0]; |
---|
| 86 | + __le16 index[]; |
---|
81 | 87 | } __packed; |
---|
82 | 88 | |
---|
83 | 89 | /* Reserve one extra byte for names in management messages so that they |
---|
.. | .. |
---|
101 | 107 | #define MGMT_SETTING_PRIVACY 0x00002000 |
---|
102 | 108 | #define MGMT_SETTING_CONFIGURATION 0x00004000 |
---|
103 | 109 | #define MGMT_SETTING_STATIC_ADDRESS 0x00008000 |
---|
104 | | -#define MGMT_SETTING_PHY_CONFIGURATION 0x00010000 |
---|
| 110 | +#define MGMT_SETTING_PHY_CONFIGURATION 0x00010000 |
---|
| 111 | +#define MGMT_SETTING_WIDEBAND_SPEECH 0x00020000 |
---|
105 | 112 | |
---|
106 | 113 | #define MGMT_OP_READ_INFO 0x0004 |
---|
107 | 114 | #define MGMT_READ_INFO_SIZE 0 |
---|
.. | .. |
---|
182 | 189 | struct mgmt_cp_load_link_keys { |
---|
183 | 190 | __u8 debug_keys; |
---|
184 | 191 | __le16 key_count; |
---|
185 | | - struct mgmt_link_key_info keys[0]; |
---|
| 192 | + struct mgmt_link_key_info keys[]; |
---|
186 | 193 | } __packed; |
---|
187 | 194 | #define MGMT_LOAD_LINK_KEYS_SIZE 3 |
---|
188 | 195 | |
---|
.. | .. |
---|
205 | 212 | #define MGMT_OP_LOAD_LONG_TERM_KEYS 0x0013 |
---|
206 | 213 | struct mgmt_cp_load_long_term_keys { |
---|
207 | 214 | __le16 key_count; |
---|
208 | | - struct mgmt_ltk_info keys[0]; |
---|
| 215 | + struct mgmt_ltk_info keys[]; |
---|
209 | 216 | } __packed; |
---|
210 | 217 | #define MGMT_LOAD_LONG_TERM_KEYS_SIZE 2 |
---|
211 | 218 | |
---|
.. | .. |
---|
222 | 229 | #define MGMT_GET_CONNECTIONS_SIZE 0 |
---|
223 | 230 | struct mgmt_rp_get_connections { |
---|
224 | 231 | __le16 conn_count; |
---|
225 | | - struct mgmt_addr_info addr[0]; |
---|
| 232 | + struct mgmt_addr_info addr[]; |
---|
226 | 233 | } __packed; |
---|
227 | 234 | |
---|
228 | 235 | #define MGMT_OP_PIN_CODE_REPLY 0x0016 |
---|
.. | .. |
---|
412 | 419 | #define MGMT_OP_LOAD_IRKS 0x0030 |
---|
413 | 420 | struct mgmt_cp_load_irks { |
---|
414 | 421 | __le16 irk_count; |
---|
415 | | - struct mgmt_irk_info irks[0]; |
---|
| 422 | + struct mgmt_irk_info irks[]; |
---|
416 | 423 | } __packed; |
---|
417 | 424 | #define MGMT_LOAD_IRKS_SIZE 2 |
---|
418 | 425 | |
---|
.. | .. |
---|
464 | 471 | #define MGMT_OP_LOAD_CONN_PARAM 0x0035 |
---|
465 | 472 | struct mgmt_cp_load_conn_param { |
---|
466 | 473 | __le16 param_count; |
---|
467 | | - struct mgmt_conn_param params[0]; |
---|
| 474 | + struct mgmt_conn_param params[]; |
---|
468 | 475 | } __packed; |
---|
469 | 476 | #define MGMT_LOAD_CONN_PARAM_SIZE 2 |
---|
470 | 477 | |
---|
.. | .. |
---|
472 | 479 | #define MGMT_READ_UNCONF_INDEX_LIST_SIZE 0 |
---|
473 | 480 | struct mgmt_rp_read_unconf_index_list { |
---|
474 | 481 | __le16 num_controllers; |
---|
475 | | - __le16 index[0]; |
---|
| 482 | + __le16 index[]; |
---|
476 | 483 | } __packed; |
---|
477 | 484 | |
---|
478 | 485 | #define MGMT_OPTION_EXTERNAL_CONFIG 0x00000001 |
---|
.. | .. |
---|
503 | 510 | __u8 type; |
---|
504 | 511 | __s8 rssi; |
---|
505 | 512 | __le16 uuid_count; |
---|
506 | | - __u8 uuids[0][16]; |
---|
| 513 | + __u8 uuids[][16]; |
---|
507 | 514 | } __packed; |
---|
508 | 515 | #define MGMT_START_SERVICE_DISCOVERY_SIZE 4 |
---|
509 | 516 | |
---|
.. | .. |
---|
515 | 522 | struct mgmt_rp_read_local_oob_ext_data { |
---|
516 | 523 | __u8 type; |
---|
517 | 524 | __le16 eir_len; |
---|
518 | | - __u8 eir[0]; |
---|
| 525 | + __u8 eir[]; |
---|
519 | 526 | } __packed; |
---|
520 | 527 | |
---|
521 | 528 | #define MGMT_OP_READ_EXT_INDEX_LIST 0x003C |
---|
.. | .. |
---|
526 | 533 | __le16 index; |
---|
527 | 534 | __u8 type; |
---|
528 | 535 | __u8 bus; |
---|
529 | | - } entry[0]; |
---|
| 536 | + } entry[]; |
---|
530 | 537 | } __packed; |
---|
531 | 538 | |
---|
532 | 539 | #define MGMT_OP_READ_ADV_FEATURES 0x0003D |
---|
.. | .. |
---|
537 | 544 | __u8 max_scan_rsp_len; |
---|
538 | 545 | __u8 max_instances; |
---|
539 | 546 | __u8 num_instances; |
---|
540 | | - __u8 instance[0]; |
---|
| 547 | + __u8 instance[]; |
---|
541 | 548 | } __packed; |
---|
542 | 549 | |
---|
543 | 550 | #define MGMT_OP_ADD_ADVERTISING 0x003E |
---|
.. | .. |
---|
548 | 555 | __le16 timeout; |
---|
549 | 556 | __u8 adv_data_len; |
---|
550 | 557 | __u8 scan_rsp_len; |
---|
551 | | - __u8 data[0]; |
---|
| 558 | + __u8 data[]; |
---|
552 | 559 | } __packed; |
---|
553 | 560 | #define MGMT_ADD_ADVERTISING_SIZE 11 |
---|
554 | 561 | struct mgmt_rp_add_advertising { |
---|
.. | .. |
---|
565 | 572 | #define MGMT_ADV_FLAG_SEC_1M BIT(7) |
---|
566 | 573 | #define MGMT_ADV_FLAG_SEC_2M BIT(8) |
---|
567 | 574 | #define MGMT_ADV_FLAG_SEC_CODED BIT(9) |
---|
| 575 | +#define MGMT_ADV_FLAG_CAN_SET_TX_POWER BIT(10) |
---|
| 576 | +#define MGMT_ADV_FLAG_HW_OFFLOAD BIT(11) |
---|
568 | 577 | |
---|
569 | 578 | #define MGMT_ADV_FLAG_SEC_MASK (MGMT_ADV_FLAG_SEC_1M | MGMT_ADV_FLAG_SEC_2M | \ |
---|
570 | 579 | MGMT_ADV_FLAG_SEC_CODED) |
---|
.. | .. |
---|
602 | 611 | __le32 supported_settings; |
---|
603 | 612 | __le32 current_settings; |
---|
604 | 613 | __le16 eir_len; |
---|
605 | | - __u8 eir[0]; |
---|
| 614 | + __u8 eir[]; |
---|
606 | 615 | } __packed; |
---|
607 | 616 | |
---|
608 | 617 | #define MGMT_OP_SET_APPEARANCE 0x0043 |
---|
.. | .. |
---|
654 | 663 | } __packed; |
---|
655 | 664 | #define MGMT_SET_PHY_CONFIGURATION_SIZE 4 |
---|
656 | 665 | |
---|
| 666 | +#define MGMT_OP_SET_BLOCKED_KEYS 0x0046 |
---|
| 667 | + |
---|
| 668 | +#define HCI_BLOCKED_KEY_TYPE_LINKKEY 0x00 |
---|
| 669 | +#define HCI_BLOCKED_KEY_TYPE_LTK 0x01 |
---|
| 670 | +#define HCI_BLOCKED_KEY_TYPE_IRK 0x02 |
---|
| 671 | + |
---|
| 672 | +struct mgmt_blocked_key_info { |
---|
| 673 | + __u8 type; |
---|
| 674 | + __u8 val[16]; |
---|
| 675 | +} __packed; |
---|
| 676 | + |
---|
| 677 | +struct mgmt_cp_set_blocked_keys { |
---|
| 678 | + __le16 key_count; |
---|
| 679 | + struct mgmt_blocked_key_info keys[]; |
---|
| 680 | +} __packed; |
---|
| 681 | +#define MGMT_OP_SET_BLOCKED_KEYS_SIZE 2 |
---|
| 682 | + |
---|
| 683 | +#define MGMT_OP_SET_WIDEBAND_SPEECH 0x0047 |
---|
| 684 | + |
---|
| 685 | +#define MGMT_OP_READ_SECURITY_INFO 0x0048 |
---|
| 686 | +#define MGMT_READ_SECURITY_INFO_SIZE 0 |
---|
| 687 | +struct mgmt_rp_read_security_info { |
---|
| 688 | + __le16 sec_len; |
---|
| 689 | + __u8 sec[]; |
---|
| 690 | +} __packed; |
---|
| 691 | + |
---|
| 692 | +#define MGMT_OP_READ_EXP_FEATURES_INFO 0x0049 |
---|
| 693 | +#define MGMT_READ_EXP_FEATURES_INFO_SIZE 0 |
---|
| 694 | +struct mgmt_rp_read_exp_features_info { |
---|
| 695 | + __le16 feature_count; |
---|
| 696 | + struct { |
---|
| 697 | + __u8 uuid[16]; |
---|
| 698 | + __le32 flags; |
---|
| 699 | + } features[]; |
---|
| 700 | +} __packed; |
---|
| 701 | + |
---|
| 702 | +#define MGMT_OP_SET_EXP_FEATURE 0x004a |
---|
| 703 | +struct mgmt_cp_set_exp_feature { |
---|
| 704 | + __u8 uuid[16]; |
---|
| 705 | + __u8 param[]; |
---|
| 706 | +} __packed; |
---|
| 707 | +#define MGMT_SET_EXP_FEATURE_SIZE 16 |
---|
| 708 | +struct mgmt_rp_set_exp_feature { |
---|
| 709 | + __u8 uuid[16]; |
---|
| 710 | + __le32 flags; |
---|
| 711 | +} __packed; |
---|
| 712 | + |
---|
| 713 | +#define MGMT_OP_READ_DEF_SYSTEM_CONFIG 0x004b |
---|
| 714 | +#define MGMT_READ_DEF_SYSTEM_CONFIG_SIZE 0 |
---|
| 715 | + |
---|
| 716 | +#define MGMT_OP_SET_DEF_SYSTEM_CONFIG 0x004c |
---|
| 717 | +#define MGMT_SET_DEF_SYSTEM_CONFIG_SIZE 0 |
---|
| 718 | + |
---|
| 719 | +#define MGMT_OP_READ_DEF_RUNTIME_CONFIG 0x004d |
---|
| 720 | +#define MGMT_READ_DEF_RUNTIME_CONFIG_SIZE 0 |
---|
| 721 | + |
---|
| 722 | +#define MGMT_OP_SET_DEF_RUNTIME_CONFIG 0x004e |
---|
| 723 | +#define MGMT_SET_DEF_RUNTIME_CONFIG_SIZE 0 |
---|
| 724 | + |
---|
| 725 | +#define MGMT_OP_GET_DEVICE_FLAGS 0x004F |
---|
| 726 | +#define MGMT_GET_DEVICE_FLAGS_SIZE 7 |
---|
| 727 | +struct mgmt_cp_get_device_flags { |
---|
| 728 | + struct mgmt_addr_info addr; |
---|
| 729 | +} __packed; |
---|
| 730 | +struct mgmt_rp_get_device_flags { |
---|
| 731 | + struct mgmt_addr_info addr; |
---|
| 732 | + __le32 supported_flags; |
---|
| 733 | + __le32 current_flags; |
---|
| 734 | +} __packed; |
---|
| 735 | + |
---|
| 736 | +#define MGMT_OP_SET_DEVICE_FLAGS 0x0050 |
---|
| 737 | +#define MGMT_SET_DEVICE_FLAGS_SIZE 11 |
---|
| 738 | +struct mgmt_cp_set_device_flags { |
---|
| 739 | + struct mgmt_addr_info addr; |
---|
| 740 | + __le32 current_flags; |
---|
| 741 | +} __packed; |
---|
| 742 | +struct mgmt_rp_set_device_flags { |
---|
| 743 | + struct mgmt_addr_info addr; |
---|
| 744 | +} __packed; |
---|
| 745 | + |
---|
| 746 | +#define MGMT_ADV_MONITOR_FEATURE_MASK_OR_PATTERNS BIT(0) |
---|
| 747 | + |
---|
| 748 | +#define MGMT_OP_READ_ADV_MONITOR_FEATURES 0x0051 |
---|
| 749 | +#define MGMT_READ_ADV_MONITOR_FEATURES_SIZE 0 |
---|
| 750 | +struct mgmt_rp_read_adv_monitor_features { |
---|
| 751 | + __le32 supported_features; |
---|
| 752 | + __le32 enabled_features; |
---|
| 753 | + __le16 max_num_handles; |
---|
| 754 | + __u8 max_num_patterns; |
---|
| 755 | + __le16 num_handles; |
---|
| 756 | + __le16 handles[]; |
---|
| 757 | +} __packed; |
---|
| 758 | + |
---|
| 759 | +struct mgmt_adv_pattern { |
---|
| 760 | + __u8 ad_type; |
---|
| 761 | + __u8 offset; |
---|
| 762 | + __u8 length; |
---|
| 763 | + __u8 value[31]; |
---|
| 764 | +} __packed; |
---|
| 765 | + |
---|
| 766 | +#define MGMT_OP_ADD_ADV_PATTERNS_MONITOR 0x0052 |
---|
| 767 | +struct mgmt_cp_add_adv_patterns_monitor { |
---|
| 768 | + __u8 pattern_count; |
---|
| 769 | + struct mgmt_adv_pattern patterns[]; |
---|
| 770 | +} __packed; |
---|
| 771 | +#define MGMT_ADD_ADV_PATTERNS_MONITOR_SIZE 1 |
---|
| 772 | +struct mgmt_rp_add_adv_patterns_monitor { |
---|
| 773 | + __le16 monitor_handle; |
---|
| 774 | +} __packed; |
---|
| 775 | + |
---|
| 776 | +#define MGMT_OP_REMOVE_ADV_MONITOR 0x0053 |
---|
| 777 | +struct mgmt_cp_remove_adv_monitor { |
---|
| 778 | + __le16 monitor_handle; |
---|
| 779 | +} __packed; |
---|
| 780 | +#define MGMT_REMOVE_ADV_MONITOR_SIZE 2 |
---|
| 781 | +struct mgmt_rp_remove_adv_monitor { |
---|
| 782 | + __le16 monitor_handle; |
---|
| 783 | +} __packed; |
---|
| 784 | + |
---|
657 | 785 | #define MGMT_EV_CMD_COMPLETE 0x0001 |
---|
658 | 786 | struct mgmt_ev_cmd_complete { |
---|
659 | 787 | __le16 opcode; |
---|
660 | 788 | __u8 status; |
---|
661 | | - __u8 data[0]; |
---|
| 789 | + __u8 data[]; |
---|
662 | 790 | } __packed; |
---|
663 | 791 | |
---|
664 | 792 | #define MGMT_EV_CMD_STATUS 0x0002 |
---|
.. | .. |
---|
706 | 834 | struct mgmt_addr_info addr; |
---|
707 | 835 | __le32 flags; |
---|
708 | 836 | __le16 eir_len; |
---|
709 | | - __u8 eir[0]; |
---|
| 837 | + __u8 eir[]; |
---|
710 | 838 | } __packed; |
---|
711 | 839 | |
---|
712 | 840 | #define MGMT_DEV_DISCONN_UNKNOWN 0x00 |
---|
.. | .. |
---|
714 | 842 | #define MGMT_DEV_DISCONN_LOCAL_HOST 0x02 |
---|
715 | 843 | #define MGMT_DEV_DISCONN_REMOTE 0x03 |
---|
716 | 844 | #define MGMT_DEV_DISCONN_AUTH_FAILURE 0x04 |
---|
| 845 | +#define MGMT_DEV_DISCONN_LOCAL_HOST_SUSPEND 0x05 |
---|
717 | 846 | |
---|
718 | 847 | #define MGMT_EV_DEVICE_DISCONNECTED 0x000C |
---|
719 | 848 | struct mgmt_ev_device_disconnected { |
---|
.. | .. |
---|
761 | 890 | __s8 rssi; |
---|
762 | 891 | __le32 flags; |
---|
763 | 892 | __le16 eir_len; |
---|
764 | | - __u8 eir[0]; |
---|
| 893 | + __u8 eir[]; |
---|
765 | 894 | } __packed; |
---|
766 | 895 | |
---|
767 | 896 | #define MGMT_EV_DISCOVERING 0x0013 |
---|
.. | .. |
---|
856 | 985 | struct mgmt_ev_local_oob_data_updated { |
---|
857 | 986 | __u8 type; |
---|
858 | 987 | __le16 eir_len; |
---|
859 | | - __u8 eir[0]; |
---|
| 988 | + __u8 eir[]; |
---|
860 | 989 | } __packed; |
---|
861 | 990 | |
---|
862 | 991 | #define MGMT_EV_ADVERTISING_ADDED 0x0023 |
---|
.. | .. |
---|
872 | 1001 | #define MGMT_EV_EXT_INFO_CHANGED 0x0025 |
---|
873 | 1002 | struct mgmt_ev_ext_info_changed { |
---|
874 | 1003 | __le16 eir_len; |
---|
875 | | - __u8 eir[0]; |
---|
| 1004 | + __u8 eir[]; |
---|
876 | 1005 | } __packed; |
---|
877 | 1006 | |
---|
878 | 1007 | #define MGMT_EV_PHY_CONFIGURATION_CHANGED 0x0026 |
---|
879 | 1008 | struct mgmt_ev_phy_configuration_changed { |
---|
880 | 1009 | __le32 selected_phys; |
---|
881 | 1010 | } __packed; |
---|
| 1011 | + |
---|
| 1012 | +#define MGMT_EV_EXP_FEATURE_CHANGED 0x0027 |
---|
| 1013 | +struct mgmt_ev_exp_feature_changed { |
---|
| 1014 | + __u8 uuid[16]; |
---|
| 1015 | + __le32 flags; |
---|
| 1016 | +} __packed; |
---|
| 1017 | + |
---|
| 1018 | +#define MGMT_EV_DEVICE_FLAGS_CHANGED 0x002a |
---|
| 1019 | +struct mgmt_ev_device_flags_changed { |
---|
| 1020 | + struct mgmt_addr_info addr; |
---|
| 1021 | + __le32 supported_flags; |
---|
| 1022 | + __le32 current_flags; |
---|
| 1023 | +} __packed; |
---|
| 1024 | + |
---|
| 1025 | +#define MGMT_EV_ADV_MONITOR_ADDED 0x002b |
---|
| 1026 | +struct mgmt_ev_adv_monitor_added { |
---|
| 1027 | + __le16 monitor_handle; |
---|
| 1028 | +} __packed; |
---|
| 1029 | + |
---|
| 1030 | +#define MGMT_EV_ADV_MONITOR_REMOVED 0x002c |
---|
| 1031 | +struct mgmt_ev_adv_monitor_removed { |
---|
| 1032 | + __le16 monitor_handle; |
---|
| 1033 | +} __packed; |
---|
| 1034 | + |
---|
| 1035 | +#define MGMT_EV_CONTROLLER_SUSPEND 0x002d |
---|
| 1036 | +struct mgmt_ev_controller_suspend { |
---|
| 1037 | + __u8 suspend_state; |
---|
| 1038 | +} __packed; |
---|
| 1039 | + |
---|
| 1040 | +#define MGMT_EV_CONTROLLER_RESUME 0x002e |
---|
| 1041 | +struct mgmt_ev_controller_resume { |
---|
| 1042 | + __u8 wake_reason; |
---|
| 1043 | + struct mgmt_addr_info addr; |
---|
| 1044 | +} __packed; |
---|
| 1045 | + |
---|
| 1046 | +#define MGMT_WAKE_REASON_NON_BT_WAKE 0x0 |
---|
| 1047 | +#define MGMT_WAKE_REASON_UNEXPECTED 0x1 |
---|
| 1048 | +#define MGMT_WAKE_REASON_REMOTE_WAKE 0x2 |
---|