Bluetooth: Initialize default flow control mode
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / net / bluetooth / hci.h
index 139ce2aa6eee700ba396343a268eda4962daa142..66b26399a1ca4efc6b0a94982de8cb73a9dbfb3d 100644 (file)
@@ -88,6 +88,14 @@ enum {
        HCI_RESET,
 };
 
+/*
+ * BR/EDR and/or LE controller flags: the flags defined here should represent
+ * states from the controller.
+ */
+enum {
+       HCI_LE_SCAN,
+};
+
 /* HCI ioctl defines */
 #define HCIDEVUP       _IOW('H', 201, int)
 #define HCIDEVDOWN     _IOW('H', 202, int)
@@ -202,6 +210,7 @@ enum {
 
 #define LMP_EV4                0x01
 #define LMP_EV5                0x02
+#define LMP_NO_BREDR   0x20
 #define LMP_LE         0x40
 
 #define LMP_SNIFF_SUBR 0x02
@@ -271,6 +280,10 @@ enum {
 #define HCI_ERROR_LOCAL_HOST_TERM      0x16
 #define HCI_ERROR_PAIRING_NOT_ALLOWED  0x18
 
+/* Flow control modes */
+#define HCI_FLOW_CTL_MODE_PACKET_BASED 0x00
+#define HCI_FLOW_CTL_MODE_BLOCK_BASED  0x01
+
 /* -----  HCI Commands ---- */
 #define HCI_OP_NOP                     0x0000
 
@@ -453,6 +466,14 @@ struct hci_rp_user_confirm_reply {
 
 #define HCI_OP_USER_CONFIRM_NEG_REPLY  0x042d
 
+#define HCI_OP_USER_PASSKEY_REPLY              0x042e
+struct hci_cp_user_passkey_reply {
+       bdaddr_t bdaddr;
+       __le32  passkey;
+} __packed;
+
+#define HCI_OP_USER_PASSKEY_NEG_REPLY  0x042f
+
 #define HCI_OP_REMOTE_OOB_DATA_REPLY   0x0430
 struct hci_cp_remote_oob_data_reply {
        bdaddr_t bdaddr;
@@ -669,6 +690,12 @@ struct hci_rp_read_local_oob_data {
 
 #define HCI_OP_READ_INQ_RSP_TX_POWER   0x0c58
 
+#define HCI_OP_READ_FLOW_CONTROL_MODE  0x0c66
+struct hci_rp_read_flow_control_mode {
+       __u8     status;
+       __u8     mode;
+} __packed;
+
 #define HCI_OP_WRITE_LE_HOST_SUPPORTED 0x0c6d
 struct hci_cp_write_le_host_supported {
        __u8 le;
@@ -723,6 +750,14 @@ struct hci_rp_read_bd_addr {
        bdaddr_t bdaddr;
 } __packed;
 
+#define HCI_OP_READ_DATA_BLOCK_SIZE    0x100a
+struct hci_rp_read_data_block_size {
+       __u8     status;
+       __le16   max_acl_len;
+       __le16   block_len;
+       __le16   num_blocks;
+} __packed;
+
 #define HCI_OP_WRITE_PAGE_SCAN_ACTIVITY        0x0c1c
 struct hci_cp_write_page_scan_activity {
        __le16   interval;
@@ -760,6 +795,15 @@ struct hci_rp_le_read_buffer_size {
        __u8     le_max_pkt;
 } __packed;
 
+#define HCI_OP_LE_SET_SCAN_PARAM       0x200b
+struct hci_cp_le_set_scan_param {
+       __u8    type;
+       __le16  interval;
+       __le16  window;
+       __u8    own_address_type;
+       __u8    filter_policy;
+} __packed;
+
 #define HCI_OP_LE_SET_SCAN_ENABLE      0x200c
 struct hci_cp_le_set_scan_enable {
        __u8     enable;
@@ -1076,6 +1120,11 @@ struct hci_ev_user_confirm_req {
        __le32          passkey;
 } __packed;
 
+#define HCI_EV_USER_PASSKEY_REQUEST    0x34
+struct hci_ev_user_passkey_req {
+       bdaddr_t        bdaddr;
+} __packed;
+
 #define HCI_EV_REMOTE_OOB_DATA_REQUEST 0x35
 struct hci_ev_remote_oob_data_request {
        bdaddr_t bdaddr;
@@ -1331,4 +1380,6 @@ struct hci_inquiry_req {
 };
 #define IREQ_CACHE_FLUSH 0x0001
 
+extern int enable_hs;
+
 #endif /* __HCI_H */