aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/hci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/bluetooth/hci.h')
-rw-r--r--include/net/bluetooth/hci.h68
1 files changed, 64 insertions, 4 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index a8a9eb6af966..3cc294919312 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -72,8 +72,6 @@ enum {
72 HCI_INQUIRY, 72 HCI_INQUIRY,
73 73
74 HCI_RAW, 74 HCI_RAW,
75
76 HCI_SECMGR
77}; 75};
78 76
79/* HCI ioctl defines */ 77/* HCI ioctl defines */
@@ -86,6 +84,7 @@ enum {
86#define HCIGETDEVINFO _IOR('H', 211, int) 84#define HCIGETDEVINFO _IOR('H', 211, int)
87#define HCIGETCONNLIST _IOR('H', 212, int) 85#define HCIGETCONNLIST _IOR('H', 212, int)
88#define HCIGETCONNINFO _IOR('H', 213, int) 86#define HCIGETCONNINFO _IOR('H', 213, int)
87#define HCIGETAUTHINFO _IOR('H', 215, int)
89 88
90#define HCISETRAW _IOW('H', 220, int) 89#define HCISETRAW _IOW('H', 220, int)
91#define HCISETSCAN _IOW('H', 221, int) 90#define HCISETSCAN _IOW('H', 221, int)
@@ -97,8 +96,6 @@ enum {
97#define HCISETACLMTU _IOW('H', 227, int) 96#define HCISETACLMTU _IOW('H', 227, int)
98#define HCISETSCOMTU _IOW('H', 228, int) 97#define HCISETSCOMTU _IOW('H', 228, int)
99 98
100#define HCISETSECMGR _IOW('H', 230, int)
101
102#define HCIINQUIRY _IOR('H', 240, int) 99#define HCIINQUIRY _IOR('H', 240, int)
103 100
104/* HCI timeouts */ 101/* HCI timeouts */
@@ -137,6 +134,8 @@ enum {
137#define ESCO_EV4 0x0010 134#define ESCO_EV4 0x0010
138#define ESCO_EV5 0x0020 135#define ESCO_EV5 0x0020
139 136
137#define SCO_ESCO_MASK (ESCO_HV1 | ESCO_HV2 | ESCO_HV3)
138
140/* ACL flags */ 139/* ACL flags */
141#define ACL_CONT 0x01 140#define ACL_CONT 0x01
142#define ACL_START 0x02 141#define ACL_START 0x02
@@ -178,6 +177,8 @@ enum {
178 177
179#define LMP_SNIFF_SUBR 0x02 178#define LMP_SNIFF_SUBR 0x02
180 179
180#define LMP_SIMPLE_PAIR 0x08
181
181/* Connection modes */ 182/* Connection modes */
182#define HCI_CM_ACTIVE 0x0000 183#define HCI_CM_ACTIVE 0x0000
183#define HCI_CM_HOLD 0x0001 184#define HCI_CM_HOLD 0x0001
@@ -199,6 +200,14 @@ enum {
199#define HCI_LM_RELIABLE 0x0010 200#define HCI_LM_RELIABLE 0x0010
200#define HCI_LM_SECURE 0x0020 201#define HCI_LM_SECURE 0x0020
201 202
203/* Authentication types */
204#define HCI_AT_NO_BONDING 0x00
205#define HCI_AT_NO_BONDING_MITM 0x01
206#define HCI_AT_DEDICATED_BONDING 0x02
207#define HCI_AT_DEDICATED_BONDING_MITM 0x03
208#define HCI_AT_GENERAL_BONDING 0x04
209#define HCI_AT_GENERAL_BONDING_MITM 0x05
210
202/* ----- HCI Commands ---- */ 211/* ----- HCI Commands ---- */
203#define HCI_OP_INQUIRY 0x0401 212#define HCI_OP_INQUIRY 0x0401
204struct hci_cp_inquiry { 213struct hci_cp_inquiry {
@@ -402,6 +411,17 @@ struct hci_rp_write_link_policy {
402 __le16 handle; 411 __le16 handle;
403} __attribute__ ((packed)); 412} __attribute__ ((packed));
404 413
414#define HCI_OP_READ_DEF_LINK_POLICY 0x080e
415struct hci_rp_read_def_link_policy {
416 __u8 status;
417 __le16 policy;
418} __attribute__ ((packed));
419
420#define HCI_OP_WRITE_DEF_LINK_POLICY 0x080f
421struct hci_cp_write_def_link_policy {
422 __le16 policy;
423} __attribute__ ((packed));
424
405#define HCI_OP_SNIFF_SUBRATE 0x0811 425#define HCI_OP_SNIFF_SUBRATE 0x0811
406struct hci_cp_sniff_subrate { 426struct hci_cp_sniff_subrate {
407 __le16 handle; 427 __le16 handle;
@@ -501,6 +521,17 @@ struct hci_cp_host_buffer_size {
501 __le16 sco_max_pkt; 521 __le16 sco_max_pkt;
502} __attribute__ ((packed)); 522} __attribute__ ((packed));
503 523
524#define HCI_OP_READ_SSP_MODE 0x0c55
525struct hci_rp_read_ssp_mode {
526 __u8 status;
527 __u8 mode;
528} __attribute__ ((packed));
529
530#define HCI_OP_WRITE_SSP_MODE 0x0c56
531struct hci_cp_write_ssp_mode {
532 __u8 mode;
533} __attribute__ ((packed));
534
504#define HCI_OP_READ_LOCAL_VERSION 0x1001 535#define HCI_OP_READ_LOCAL_VERSION 0x1001
505struct hci_rp_read_local_version { 536struct hci_rp_read_local_version {
506 __u8 status; 537 __u8 status;
@@ -696,6 +727,13 @@ struct hci_ev_clock_offset {
696 __le16 clock_offset; 727 __le16 clock_offset;
697} __attribute__ ((packed)); 728} __attribute__ ((packed));
698 729
730#define HCI_EV_PKT_TYPE_CHANGE 0x1d
731struct hci_ev_pkt_type_change {
732 __u8 status;
733 __le16 handle;
734 __le16 pkt_type;
735} __attribute__ ((packed));
736
699#define HCI_EV_PSCAN_REP_MODE 0x20 737#define HCI_EV_PSCAN_REP_MODE 0x20
700struct hci_ev_pscan_rep_mode { 738struct hci_ev_pscan_rep_mode {
701 bdaddr_t bdaddr; 739 bdaddr_t bdaddr;
@@ -774,6 +812,23 @@ struct extended_inquiry_info {
774 __u8 data[240]; 812 __u8 data[240];
775} __attribute__ ((packed)); 813} __attribute__ ((packed));
776 814
815#define HCI_EV_IO_CAPA_REQUEST 0x31
816struct hci_ev_io_capa_request {
817 bdaddr_t bdaddr;
818} __attribute__ ((packed));
819
820#define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36
821struct hci_ev_simple_pair_complete {
822 __u8 status;
823 bdaddr_t bdaddr;
824} __attribute__ ((packed));
825
826#define HCI_EV_REMOTE_HOST_FEATURES 0x3d
827struct hci_ev_remote_host_features {
828 bdaddr_t bdaddr;
829 __u8 features[8];
830} __attribute__ ((packed));
831
777/* Internal events generated by Bluetooth stack */ 832/* Internal events generated by Bluetooth stack */
778#define HCI_EV_STACK_INTERNAL 0xfd 833#define HCI_EV_STACK_INTERNAL 0xfd
779struct hci_ev_stack_internal { 834struct hci_ev_stack_internal {
@@ -951,6 +1006,11 @@ struct hci_conn_info_req {
951 struct hci_conn_info conn_info[0]; 1006 struct hci_conn_info conn_info[0];
952}; 1007};
953 1008
1009struct hci_auth_info_req {
1010 bdaddr_t bdaddr;
1011 __u8 type;
1012};
1013
954struct hci_inquiry_req { 1014struct hci_inquiry_req {
955 __u16 dev_id; 1015 __u16 dev_id;
956 __u16 flags; 1016 __u16 flags;