diff options
Diffstat (limited to 'include/net/bluetooth/hci.h')
-rw-r--r-- | include/net/bluetooth/hci.h | 81 |
1 files changed, 78 insertions, 3 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 15f10841e2b5..b90eec5e9c06 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -35,6 +35,8 @@ | |||
35 | 35 | ||
36 | #define HCI_MAX_AMP_ASSOC_SIZE 672 | 36 | #define HCI_MAX_AMP_ASSOC_SIZE 672 |
37 | 37 | ||
38 | #define HCI_MAX_CSB_DATA_SIZE 252 | ||
39 | |||
38 | /* HCI dev events */ | 40 | /* HCI dev events */ |
39 | #define HCI_DEV_REG 1 | 41 | #define HCI_DEV_REG 1 |
40 | #define HCI_DEV_UNREG 2 | 42 | #define HCI_DEV_UNREG 2 |
@@ -110,6 +112,7 @@ enum { | |||
110 | HCI_SERVICE_CACHE, | 112 | HCI_SERVICE_CACHE, |
111 | HCI_DEBUG_KEYS, | 113 | HCI_DEBUG_KEYS, |
112 | HCI_UNREGISTER, | 114 | HCI_UNREGISTER, |
115 | HCI_USER_CHANNEL, | ||
113 | 116 | ||
114 | HCI_LE_SCAN, | 117 | HCI_LE_SCAN, |
115 | HCI_SSP_ENABLED, | 118 | HCI_SSP_ENABLED, |
@@ -121,6 +124,7 @@ enum { | |||
121 | HCI_LINK_SECURITY, | 124 | HCI_LINK_SECURITY, |
122 | HCI_PERIODIC_INQ, | 125 | HCI_PERIODIC_INQ, |
123 | HCI_FAST_CONNECTABLE, | 126 | HCI_FAST_CONNECTABLE, |
127 | HCI_BREDR_ENABLED, | ||
124 | }; | 128 | }; |
125 | 129 | ||
126 | /* A mask for the flags that are supposed to remain when a reset happens | 130 | /* A mask for the flags that are supposed to remain when a reset happens |
@@ -624,6 +628,24 @@ struct hci_rp_logical_link_cancel { | |||
624 | __u8 flow_spec_id; | 628 | __u8 flow_spec_id; |
625 | } __packed; | 629 | } __packed; |
626 | 630 | ||
631 | #define HCI_OP_SET_CSB 0x0441 | ||
632 | struct hci_cp_set_csb { | ||
633 | __u8 enable; | ||
634 | __u8 lt_addr; | ||
635 | __u8 lpo_allowed; | ||
636 | __le16 packet_type; | ||
637 | __le16 interval_min; | ||
638 | __le16 interval_max; | ||
639 | __le16 csb_sv_tout; | ||
640 | } __packed; | ||
641 | struct hci_rp_set_csb { | ||
642 | __u8 status; | ||
643 | __u8 lt_addr; | ||
644 | __le16 interval; | ||
645 | } __packed; | ||
646 | |||
647 | #define HCI_OP_START_SYNC_TRAIN 0x0443 | ||
648 | |||
627 | #define HCI_OP_SNIFF_MODE 0x0803 | 649 | #define HCI_OP_SNIFF_MODE 0x0803 |
628 | struct hci_cp_sniff_mode { | 650 | struct hci_cp_sniff_mode { |
629 | __le16 handle; | 651 | __le16 handle; |
@@ -694,9 +716,6 @@ struct hci_cp_sniff_subrate { | |||
694 | } __packed; | 716 | } __packed; |
695 | 717 | ||
696 | #define HCI_OP_SET_EVENT_MASK 0x0c01 | 718 | #define HCI_OP_SET_EVENT_MASK 0x0c01 |
697 | struct hci_cp_set_event_mask { | ||
698 | __u8 mask[8]; | ||
699 | } __packed; | ||
700 | 719 | ||
701 | #define HCI_OP_RESET 0x0c03 | 720 | #define HCI_OP_RESET 0x0c03 |
702 | 721 | ||
@@ -826,6 +845,8 @@ struct hci_rp_read_inq_rsp_tx_power { | |||
826 | __s8 tx_power; | 845 | __s8 tx_power; |
827 | } __packed; | 846 | } __packed; |
828 | 847 | ||
848 | #define HCI_OP_SET_EVENT_MASK_PAGE_2 0x0c63 | ||
849 | |||
829 | #define HCI_OP_READ_FLOW_CONTROL_MODE 0x0c66 | 850 | #define HCI_OP_READ_FLOW_CONTROL_MODE 0x0c66 |
830 | struct hci_rp_read_flow_control_mode { | 851 | struct hci_rp_read_flow_control_mode { |
831 | __u8 status; | 852 | __u8 status; |
@@ -838,6 +859,50 @@ struct hci_cp_write_le_host_supported { | |||
838 | __u8 simul; | 859 | __u8 simul; |
839 | } __packed; | 860 | } __packed; |
840 | 861 | ||
862 | #define HCI_OP_SET_RESERVED_LT_ADDR 0x0c74 | ||
863 | struct hci_cp_set_reserved_lt_addr { | ||
864 | __u8 lt_addr; | ||
865 | } __packed; | ||
866 | struct hci_rp_set_reserved_lt_addr { | ||
867 | __u8 status; | ||
868 | __u8 lt_addr; | ||
869 | } __packed; | ||
870 | |||
871 | #define HCI_OP_DELETE_RESERVED_LT_ADDR 0x0c75 | ||
872 | struct hci_cp_delete_reserved_lt_addr { | ||
873 | __u8 lt_addr; | ||
874 | } __packed; | ||
875 | struct hci_rp_delete_reserved_lt_addr { | ||
876 | __u8 status; | ||
877 | __u8 lt_addr; | ||
878 | } __packed; | ||
879 | |||
880 | #define HCI_OP_SET_CSB_DATA 0x0c76 | ||
881 | struct hci_cp_set_csb_data { | ||
882 | __u8 lt_addr; | ||
883 | __u8 fragment; | ||
884 | __u8 data_length; | ||
885 | __u8 data[HCI_MAX_CSB_DATA_SIZE]; | ||
886 | } __packed; | ||
887 | struct hci_rp_set_csb_data { | ||
888 | __u8 status; | ||
889 | __u8 lt_addr; | ||
890 | } __packed; | ||
891 | |||
892 | #define HCI_OP_READ_SYNC_TRAIN_PARAMS 0x0c77 | ||
893 | |||
894 | #define HCI_OP_WRITE_SYNC_TRAIN_PARAMS 0x0c78 | ||
895 | struct hci_cp_write_sync_train_params { | ||
896 | __le16 interval_min; | ||
897 | __le16 interval_max; | ||
898 | __le32 sync_train_tout; | ||
899 | __u8 service_data; | ||
900 | } __packed; | ||
901 | struct hci_rp_write_sync_train_params { | ||
902 | __u8 status; | ||
903 | __le16 sync_train_int; | ||
904 | } __packed; | ||
905 | |||
841 | #define HCI_OP_READ_LOCAL_VERSION 0x1001 | 906 | #define HCI_OP_READ_LOCAL_VERSION 0x1001 |
842 | struct hci_rp_read_local_version { | 907 | struct hci_rp_read_local_version { |
843 | __u8 status; | 908 | __u8 status; |
@@ -975,6 +1040,8 @@ struct hci_rp_le_read_local_features { | |||
975 | __u8 features[8]; | 1040 | __u8 features[8]; |
976 | } __packed; | 1041 | } __packed; |
977 | 1042 | ||
1043 | #define HCI_OP_LE_SET_RANDOM_ADDR 0x2005 | ||
1044 | |||
978 | #define HCI_OP_LE_READ_ADV_TX_POWER 0x2007 | 1045 | #define HCI_OP_LE_READ_ADV_TX_POWER 0x2007 |
979 | struct hci_rp_le_read_adv_tx_power { | 1046 | struct hci_rp_le_read_adv_tx_power { |
980 | __u8 status; | 1047 | __u8 status; |
@@ -1438,6 +1505,13 @@ struct hci_ev_num_comp_blocks { | |||
1438 | struct hci_comp_blocks_info handles[0]; | 1505 | struct hci_comp_blocks_info handles[0]; |
1439 | } __packed; | 1506 | } __packed; |
1440 | 1507 | ||
1508 | #define HCI_EV_SYNC_TRAIN_COMPLETE 0x4F | ||
1509 | struct hci_ev_sync_train_complete { | ||
1510 | __u8 status; | ||
1511 | } __packed; | ||
1512 | |||
1513 | #define HCI_EV_SLAVE_PAGE_RESP_TIMEOUT 0x54 | ||
1514 | |||
1441 | /* Low energy meta events */ | 1515 | /* Low energy meta events */ |
1442 | #define LE_CONN_ROLE_MASTER 0x00 | 1516 | #define LE_CONN_ROLE_MASTER 0x00 |
1443 | 1517 | ||
@@ -1571,6 +1645,7 @@ struct sockaddr_hci { | |||
1571 | #define HCI_DEV_NONE 0xffff | 1645 | #define HCI_DEV_NONE 0xffff |
1572 | 1646 | ||
1573 | #define HCI_CHANNEL_RAW 0 | 1647 | #define HCI_CHANNEL_RAW 0 |
1648 | #define HCI_CHANNEL_USER 1 | ||
1574 | #define HCI_CHANNEL_MONITOR 2 | 1649 | #define HCI_CHANNEL_MONITOR 2 |
1575 | #define HCI_CHANNEL_CONTROL 3 | 1650 | #define HCI_CHANNEL_CONTROL 3 |
1576 | 1651 | ||