11da177e4SLinus Torvalds /* 21da177e4SLinus Torvalds BlueZ - Bluetooth protocol stack for Linux 31da177e4SLinus Torvalds Copyright (C) 2000-2001 Qualcomm Incorporated 41da177e4SLinus Torvalds 51da177e4SLinus Torvalds Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> 61da177e4SLinus Torvalds 71da177e4SLinus Torvalds This program is free software; you can redistribute it and/or modify 81da177e4SLinus Torvalds it under the terms of the GNU General Public License version 2 as 91da177e4SLinus Torvalds published by the Free Software Foundation; 101da177e4SLinus Torvalds 111da177e4SLinus Torvalds THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 121da177e4SLinus Torvalds OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 131da177e4SLinus Torvalds FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. 141da177e4SLinus Torvalds IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY 151da177e4SLinus Torvalds CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES 161da177e4SLinus Torvalds WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 171da177e4SLinus Torvalds ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 181da177e4SLinus Torvalds OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 191da177e4SLinus Torvalds 201da177e4SLinus Torvalds ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, 211da177e4SLinus Torvalds COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS 221da177e4SLinus Torvalds SOFTWARE IS DISCLAIMED. 231da177e4SLinus Torvalds */ 241da177e4SLinus Torvalds 251da177e4SLinus Torvalds #ifndef __HCI_H 261da177e4SLinus Torvalds #define __HCI_H 271da177e4SLinus Torvalds 281da177e4SLinus Torvalds #define HCI_MAX_ACL_SIZE 1024 291da177e4SLinus Torvalds #define HCI_MAX_SCO_SIZE 255 301da177e4SLinus Torvalds #define HCI_MAX_EVENT_SIZE 260 311da177e4SLinus Torvalds #define HCI_MAX_FRAME_SIZE (HCI_MAX_ACL_SIZE + 4) 321da177e4SLinus Torvalds 331da177e4SLinus Torvalds /* HCI dev events */ 341da177e4SLinus Torvalds #define HCI_DEV_REG 1 351da177e4SLinus Torvalds #define HCI_DEV_UNREG 2 361da177e4SLinus Torvalds #define HCI_DEV_UP 3 371da177e4SLinus Torvalds #define HCI_DEV_DOWN 4 381da177e4SLinus Torvalds #define HCI_DEV_SUSPEND 5 391da177e4SLinus Torvalds #define HCI_DEV_RESUME 6 401da177e4SLinus Torvalds 411da177e4SLinus Torvalds /* HCI notify events */ 421da177e4SLinus Torvalds #define HCI_NOTIFY_CONN_ADD 1 431da177e4SLinus Torvalds #define HCI_NOTIFY_CONN_DEL 2 441da177e4SLinus Torvalds #define HCI_NOTIFY_VOICE_SETTING 3 451da177e4SLinus Torvalds 46c13854ceSMarcel Holtmann /* HCI bus types */ 470ac53939SMarcel Holtmann #define HCI_VIRTUAL 0 481da177e4SLinus Torvalds #define HCI_USB 1 491da177e4SLinus Torvalds #define HCI_PCCARD 2 501da177e4SLinus Torvalds #define HCI_UART 3 511da177e4SLinus Torvalds #define HCI_RS232 4 521da177e4SLinus Torvalds #define HCI_PCI 5 530ac53939SMarcel Holtmann #define HCI_SDIO 6 541da177e4SLinus Torvalds 55943da25dSMarcel Holtmann /* HCI controller types */ 56943da25dSMarcel Holtmann #define HCI_BREDR 0x00 578f1e1742SDavid Vrabel #define HCI_AMP 0x01 58943da25dSMarcel Holtmann 591da177e4SLinus Torvalds /* HCI device quirks */ 601da177e4SLinus Torvalds enum { 617a9d4020SMarcel Holtmann HCI_QUIRK_NO_RESET, 62da1f5198SMarcel Holtmann HCI_QUIRK_RAW_DEVICE, 63da1f5198SMarcel Holtmann HCI_QUIRK_FIXUP_BUFFER_SIZE 641da177e4SLinus Torvalds }; 651da177e4SLinus Torvalds 661da177e4SLinus Torvalds /* HCI device flags */ 671da177e4SLinus Torvalds enum { 681da177e4SLinus Torvalds HCI_UP, 691da177e4SLinus Torvalds HCI_INIT, 701da177e4SLinus Torvalds HCI_RUNNING, 711da177e4SLinus Torvalds 721da177e4SLinus Torvalds HCI_PSCAN, 731da177e4SLinus Torvalds HCI_ISCAN, 741da177e4SLinus Torvalds HCI_AUTH, 751da177e4SLinus Torvalds HCI_ENCRYPT, 761da177e4SLinus Torvalds HCI_INQUIRY, 771da177e4SLinus Torvalds 781da177e4SLinus Torvalds HCI_RAW, 79ab81cbf9SJohan Hedberg 8010572132SGustavo F. Padovan HCI_RESET, 811da177e4SLinus Torvalds }; 821da177e4SLinus Torvalds 83d23264a8SAndre Guedes /* 84d23264a8SAndre Guedes * BR/EDR and/or LE controller flags: the flags defined here should represent 85d23264a8SAndre Guedes * states from the controller. 86d23264a8SAndre Guedes */ 87d23264a8SAndre Guedes enum { 88a8b2d5c2SJohan Hedberg HCI_SETUP, 89a8b2d5c2SJohan Hedberg HCI_AUTO_OFF, 90a8b2d5c2SJohan Hedberg HCI_MGMT, 91a8b2d5c2SJohan Hedberg HCI_PAIRABLE, 92a8b2d5c2SJohan Hedberg HCI_SERVICE_CACHE, 93a8b2d5c2SJohan Hedberg HCI_LINK_KEYS, 94a8b2d5c2SJohan Hedberg HCI_DEBUG_KEYS, 9594324962SJohan Hovold HCI_UNREGISTER, 96a8b2d5c2SJohan Hedberg 97d23264a8SAndre Guedes HCI_LE_SCAN, 9884bde9d6SJohan Hedberg HCI_SSP_ENABLED, 996d80dfd0SJohan Hedberg HCI_HS_ENABLED, 10006199cf8SJohan Hedberg HCI_LE_ENABLED, 1015e5282bbSJohan Hedberg HCI_CONNECTABLE, 1025e5282bbSJohan Hedberg HCI_DISCOVERABLE, 10347990ea0SJohan Hedberg HCI_LINK_SECURITY, 104c95f0ba7SJohan Hedberg HCI_PENDING_CLASS, 105d23264a8SAndre Guedes }; 106d23264a8SAndre Guedes 1071da177e4SLinus Torvalds /* HCI ioctl defines */ 1081da177e4SLinus Torvalds #define HCIDEVUP _IOW('H', 201, int) 1091da177e4SLinus Torvalds #define HCIDEVDOWN _IOW('H', 202, int) 1101da177e4SLinus Torvalds #define HCIDEVRESET _IOW('H', 203, int) 1111da177e4SLinus Torvalds #define HCIDEVRESTAT _IOW('H', 204, int) 1121da177e4SLinus Torvalds 1131da177e4SLinus Torvalds #define HCIGETDEVLIST _IOR('H', 210, int) 1141da177e4SLinus Torvalds #define HCIGETDEVINFO _IOR('H', 211, int) 1151da177e4SLinus Torvalds #define HCIGETCONNLIST _IOR('H', 212, int) 1161da177e4SLinus Torvalds #define HCIGETCONNINFO _IOR('H', 213, int) 11740be492fSMarcel Holtmann #define HCIGETAUTHINFO _IOR('H', 215, int) 1181da177e4SLinus Torvalds 1191da177e4SLinus Torvalds #define HCISETRAW _IOW('H', 220, int) 1201da177e4SLinus Torvalds #define HCISETSCAN _IOW('H', 221, int) 1211da177e4SLinus Torvalds #define HCISETAUTH _IOW('H', 222, int) 1221da177e4SLinus Torvalds #define HCISETENCRYPT _IOW('H', 223, int) 1231da177e4SLinus Torvalds #define HCISETPTYPE _IOW('H', 224, int) 1241da177e4SLinus Torvalds #define HCISETLINKPOL _IOW('H', 225, int) 1251da177e4SLinus Torvalds #define HCISETLINKMODE _IOW('H', 226, int) 1261da177e4SLinus Torvalds #define HCISETACLMTU _IOW('H', 227, int) 1271da177e4SLinus Torvalds #define HCISETSCOMTU _IOW('H', 228, int) 1281da177e4SLinus Torvalds 129f0358568SJohan Hedberg #define HCIBLOCKADDR _IOW('H', 230, int) 130f0358568SJohan Hedberg #define HCIUNBLOCKADDR _IOW('H', 231, int) 131f0358568SJohan Hedberg 1321da177e4SLinus Torvalds #define HCIINQUIRY _IOR('H', 240, int) 1331da177e4SLinus Torvalds 1341da177e4SLinus Torvalds /* HCI timeouts */ 13504837f64SMarcel Holtmann #define HCI_CONNECT_TIMEOUT (40000) /* 40 seconds */ 13604837f64SMarcel Holtmann #define HCI_DISCONN_TIMEOUT (2000) /* 2 seconds */ 137052b30b0SMarcel Holtmann #define HCI_PAIRING_TIMEOUT (60000) /* 60 seconds */ 13804837f64SMarcel Holtmann #define HCI_IDLE_TIMEOUT (6000) /* 6 seconds */ 13904837f64SMarcel Holtmann #define HCI_INIT_TIMEOUT (10000) /* 10 seconds */ 1406bd32326SVille Tervo #define HCI_CMD_TIMEOUT (1000) /* 1 seconds */ 141cc48dc0aSAndrei Emeltchenko #define HCI_ACL_TX_TIMEOUT (45000) /* 45 seconds */ 1421da177e4SLinus Torvalds 1435b7f9909SMarcel Holtmann /* HCI data types */ 1441da177e4SLinus Torvalds #define HCI_COMMAND_PKT 0x01 1451da177e4SLinus Torvalds #define HCI_ACLDATA_PKT 0x02 1461da177e4SLinus Torvalds #define HCI_SCODATA_PKT 0x03 1471da177e4SLinus Torvalds #define HCI_EVENT_PKT 0x04 1481da177e4SLinus Torvalds #define HCI_VENDOR_PKT 0xff 1491da177e4SLinus Torvalds 1505b7f9909SMarcel Holtmann /* HCI packet types */ 1511da177e4SLinus Torvalds #define HCI_DM1 0x0008 1521da177e4SLinus Torvalds #define HCI_DM3 0x0400 1531da177e4SLinus Torvalds #define HCI_DM5 0x4000 1541da177e4SLinus Torvalds #define HCI_DH1 0x0010 1551da177e4SLinus Torvalds #define HCI_DH3 0x0800 1561da177e4SLinus Torvalds #define HCI_DH5 0x8000 1571da177e4SLinus Torvalds 1581da177e4SLinus Torvalds #define HCI_HV1 0x0020 1591da177e4SLinus Torvalds #define HCI_HV2 0x0040 1601da177e4SLinus Torvalds #define HCI_HV3 0x0080 1611da177e4SLinus Torvalds 1621da177e4SLinus Torvalds #define SCO_PTYPE_MASK (HCI_HV1 | HCI_HV2 | HCI_HV3) 1631da177e4SLinus Torvalds #define ACL_PTYPE_MASK (~SCO_PTYPE_MASK) 1641da177e4SLinus Torvalds 1655b7f9909SMarcel Holtmann /* eSCO packet types */ 1665b7f9909SMarcel Holtmann #define ESCO_HV1 0x0001 1675b7f9909SMarcel Holtmann #define ESCO_HV2 0x0002 1685b7f9909SMarcel Holtmann #define ESCO_HV3 0x0004 1695b7f9909SMarcel Holtmann #define ESCO_EV3 0x0008 1705b7f9909SMarcel Holtmann #define ESCO_EV4 0x0010 1715b7f9909SMarcel Holtmann #define ESCO_EV5 0x0020 172efc7688bSMarcel Holtmann #define ESCO_2EV3 0x0040 173efc7688bSMarcel Holtmann #define ESCO_3EV3 0x0080 174efc7688bSMarcel Holtmann #define ESCO_2EV5 0x0100 175efc7688bSMarcel Holtmann #define ESCO_3EV5 0x0200 1765b7f9909SMarcel Holtmann 177a8746417SMarcel Holtmann #define SCO_ESCO_MASK (ESCO_HV1 | ESCO_HV2 | ESCO_HV3) 178efc7688bSMarcel Holtmann #define EDR_ESCO_MASK (ESCO_2EV3 | ESCO_3EV3 | ESCO_2EV5 | ESCO_3EV5) 179a8746417SMarcel Holtmann 1801da177e4SLinus Torvalds /* ACL flags */ 181e702112fSAndrei Emeltchenko #define ACL_START_NO_FLUSH 0x00 1821da177e4SLinus Torvalds #define ACL_CONT 0x01 1831da177e4SLinus Torvalds #define ACL_START 0x02 1841da177e4SLinus Torvalds #define ACL_ACTIVE_BCAST 0x04 1851da177e4SLinus Torvalds #define ACL_PICO_BCAST 0x08 1861da177e4SLinus Torvalds 1871da177e4SLinus Torvalds /* Baseband links */ 1881da177e4SLinus Torvalds #define SCO_LINK 0x00 1891da177e4SLinus Torvalds #define ACL_LINK 0x01 1905b7f9909SMarcel Holtmann #define ESCO_LINK 0x02 191fcd89c09SVille Tervo /* Low Energy links do not have defined link type. Use invented one */ 192fcd89c09SVille Tervo #define LE_LINK 0x80 1931da177e4SLinus Torvalds 1941da177e4SLinus Torvalds /* LMP features */ 1951da177e4SLinus Torvalds #define LMP_3SLOT 0x01 1961da177e4SLinus Torvalds #define LMP_5SLOT 0x02 1971da177e4SLinus Torvalds #define LMP_ENCRYPT 0x04 1981da177e4SLinus Torvalds #define LMP_SOFFSET 0x08 1991da177e4SLinus Torvalds #define LMP_TACCURACY 0x10 2001da177e4SLinus Torvalds #define LMP_RSWITCH 0x20 2011da177e4SLinus Torvalds #define LMP_HOLD 0x40 20204837f64SMarcel Holtmann #define LMP_SNIFF 0x80 2031da177e4SLinus Torvalds 2041da177e4SLinus Torvalds #define LMP_PARK 0x01 2051da177e4SLinus Torvalds #define LMP_RSSI 0x02 2061da177e4SLinus Torvalds #define LMP_QUALITY 0x04 2071da177e4SLinus Torvalds #define LMP_SCO 0x08 2081da177e4SLinus Torvalds #define LMP_HV2 0x10 2091da177e4SLinus Torvalds #define LMP_HV3 0x20 2101da177e4SLinus Torvalds #define LMP_ULAW 0x40 2111da177e4SLinus Torvalds #define LMP_ALAW 0x80 2121da177e4SLinus Torvalds 2131da177e4SLinus Torvalds #define LMP_CVSD 0x01 2141da177e4SLinus Torvalds #define LMP_PSCHEME 0x02 2151da177e4SLinus Torvalds #define LMP_PCONTROL 0x04 2161da177e4SLinus Torvalds 217d5859e22SJohan Hedberg #define LMP_RSSI_INQ 0x40 2185b7f9909SMarcel Holtmann #define LMP_ESCO 0x80 2195b7f9909SMarcel Holtmann 2205b7f9909SMarcel Holtmann #define LMP_EV4 0x01 2215b7f9909SMarcel Holtmann #define LMP_EV5 0x02 22269ab39eaSJohan Hedberg #define LMP_NO_BREDR 0x20 223d5859e22SJohan Hedberg #define LMP_LE 0x40 2245b7f9909SMarcel Holtmann 22504837f64SMarcel Holtmann #define LMP_SNIFF_SUBR 0x02 226d5859e22SJohan Hedberg #define LMP_PAUSE_ENC 0x04 227efc7688bSMarcel Holtmann #define LMP_EDR_ESCO_2M 0x20 228efc7688bSMarcel Holtmann #define LMP_EDR_ESCO_3M 0x40 229efc7688bSMarcel Holtmann #define LMP_EDR_3S_ESCO 0x80 23004837f64SMarcel Holtmann 231d5859e22SJohan Hedberg #define LMP_EXT_INQ 0x01 232e6100a25SAndre Guedes #define LMP_SIMUL_LE_BR 0x02 233769be974SMarcel Holtmann #define LMP_SIMPLE_PAIR 0x08 234e702112fSAndrei Emeltchenko #define LMP_NO_FLUSH 0x40 235769be974SMarcel Holtmann 236d5859e22SJohan Hedberg #define LMP_LSTO 0x01 237d5859e22SJohan Hedberg #define LMP_INQ_TX_PWR 0x02 238971e3a4bSAndre Guedes #define LMP_EXTFEATURES 0x80 239d5859e22SJohan Hedberg 240eead27daSAndre Guedes /* Extended LMP features */ 241cc2c04ecSJohan Hedberg #define LMP_HOST_SSP 0x01 242eead27daSAndre Guedes #define LMP_HOST_LE 0x02 243cc2c04ecSJohan Hedberg #define LMP_HOST_LE_BREDR 0x04 244eead27daSAndre Guedes 24504837f64SMarcel Holtmann /* Connection modes */ 24604837f64SMarcel Holtmann #define HCI_CM_ACTIVE 0x0000 24704837f64SMarcel Holtmann #define HCI_CM_HOLD 0x0001 24804837f64SMarcel Holtmann #define HCI_CM_SNIFF 0x0002 24904837f64SMarcel Holtmann #define HCI_CM_PARK 0x0003 25004837f64SMarcel Holtmann 2511da177e4SLinus Torvalds /* Link policies */ 2521da177e4SLinus Torvalds #define HCI_LP_RSWITCH 0x0001 2531da177e4SLinus Torvalds #define HCI_LP_HOLD 0x0002 2541da177e4SLinus Torvalds #define HCI_LP_SNIFF 0x0004 2551da177e4SLinus Torvalds #define HCI_LP_PARK 0x0008 2561da177e4SLinus Torvalds 25704837f64SMarcel Holtmann /* Link modes */ 2581da177e4SLinus Torvalds #define HCI_LM_ACCEPT 0x8000 2591da177e4SLinus Torvalds #define HCI_LM_MASTER 0x0001 2601da177e4SLinus Torvalds #define HCI_LM_AUTH 0x0002 2611da177e4SLinus Torvalds #define HCI_LM_ENCRYPT 0x0004 2621da177e4SLinus Torvalds #define HCI_LM_TRUSTED 0x0008 2631da177e4SLinus Torvalds #define HCI_LM_RELIABLE 0x0010 2641da177e4SLinus Torvalds #define HCI_LM_SECURE 0x0020 2651da177e4SLinus Torvalds 26640be492fSMarcel Holtmann /* Authentication types */ 26740be492fSMarcel Holtmann #define HCI_AT_NO_BONDING 0x00 26840be492fSMarcel Holtmann #define HCI_AT_NO_BONDING_MITM 0x01 26940be492fSMarcel Holtmann #define HCI_AT_DEDICATED_BONDING 0x02 27040be492fSMarcel Holtmann #define HCI_AT_DEDICATED_BONDING_MITM 0x03 27140be492fSMarcel Holtmann #define HCI_AT_GENERAL_BONDING 0x04 27240be492fSMarcel Holtmann #define HCI_AT_GENERAL_BONDING_MITM 0x05 27340be492fSMarcel Holtmann 274b6020ba0SWaldemar Rymarkiewicz /* Link Key types */ 275b6020ba0SWaldemar Rymarkiewicz #define HCI_LK_COMBINATION 0x00 276b6020ba0SWaldemar Rymarkiewicz #define HCI_LK_LOCAL_UNIT 0x01 277b6020ba0SWaldemar Rymarkiewicz #define HCI_LK_REMOTE_UNIT 0x02 278b6020ba0SWaldemar Rymarkiewicz #define HCI_LK_DEBUG_COMBINATION 0x03 279b6020ba0SWaldemar Rymarkiewicz #define HCI_LK_UNAUTH_COMBINATION 0x04 280b6020ba0SWaldemar Rymarkiewicz #define HCI_LK_AUTH_COMBINATION 0x05 281b6020ba0SWaldemar Rymarkiewicz #define HCI_LK_CHANGED_COMBINATION 0x06 282b899efafSVinicius Costa Gomes /* The spec doesn't define types for SMP keys, the _MASTER suffix is implied */ 283b899efafSVinicius Costa Gomes #define HCI_SMP_STK 0x80 284b899efafSVinicius Costa Gomes #define HCI_SMP_STK_SLAVE 0x81 285b899efafSVinicius Costa Gomes #define HCI_SMP_LTK 0x82 286b899efafSVinicius Costa Gomes #define HCI_SMP_LTK_SLAVE 0x83 287b6020ba0SWaldemar Rymarkiewicz 2889f5a0d7bSAndrei Emeltchenko /* ---- HCI Error Codes ---- */ 2899f5a0d7bSAndrei Emeltchenko #define HCI_ERROR_AUTH_FAILURE 0x05 2909f5a0d7bSAndrei Emeltchenko #define HCI_ERROR_REJ_BAD_ADDR 0x0f 2919f5a0d7bSAndrei Emeltchenko #define HCI_ERROR_REMOTE_USER_TERM 0x13 2929f5a0d7bSAndrei Emeltchenko #define HCI_ERROR_LOCAL_HOST_TERM 0x16 2939f5a0d7bSAndrei Emeltchenko #define HCI_ERROR_PAIRING_NOT_ALLOWED 0x18 2949f5a0d7bSAndrei Emeltchenko 2952455a3eaSAndrei Emeltchenko /* Flow control modes */ 2962455a3eaSAndrei Emeltchenko #define HCI_FLOW_CTL_MODE_PACKET_BASED 0x00 2972455a3eaSAndrei Emeltchenko #define HCI_FLOW_CTL_MODE_BLOCK_BASED 0x01 2982455a3eaSAndrei Emeltchenko 29932748db0SJohan Hedberg /* Extended Inquiry Response field types */ 30032748db0SJohan Hedberg #define EIR_FLAGS 0x01 /* flags */ 30132748db0SJohan Hedberg #define EIR_UUID16_SOME 0x02 /* 16-bit UUID, more available */ 30232748db0SJohan Hedberg #define EIR_UUID16_ALL 0x03 /* 16-bit UUID, all listed */ 30332748db0SJohan Hedberg #define EIR_UUID32_SOME 0x04 /* 32-bit UUID, more available */ 30432748db0SJohan Hedberg #define EIR_UUID32_ALL 0x05 /* 32-bit UUID, all listed */ 30532748db0SJohan Hedberg #define EIR_UUID128_SOME 0x06 /* 128-bit UUID, more available */ 30632748db0SJohan Hedberg #define EIR_UUID128_ALL 0x07 /* 128-bit UUID, all listed */ 30732748db0SJohan Hedberg #define EIR_NAME_SHORT 0x08 /* shortened local name */ 30832748db0SJohan Hedberg #define EIR_NAME_COMPLETE 0x09 /* complete local name */ 30932748db0SJohan Hedberg #define EIR_TX_POWER 0x0A /* transmit power level */ 3109ec9fc8aSJohan Hedberg #define EIR_CLASS_OF_DEV 0x0D /* Class of Device */ 3119ec9fc8aSJohan Hedberg #define EIR_SSP_HASH_C 0x0E /* Simple Pairing Hash C */ 3129ec9fc8aSJohan Hedberg #define EIR_SSP_RAND_R 0x0F /* Simple Pairing Randomizer R */ 31332748db0SJohan Hedberg #define EIR_DEVICE_ID 0x10 /* device ID */ 31432748db0SJohan Hedberg 3151da177e4SLinus Torvalds /* ----- HCI Commands ---- */ 3166bd32326SVille Tervo #define HCI_OP_NOP 0x0000 3176bd32326SVille Tervo 318a9de9248SMarcel Holtmann #define HCI_OP_INQUIRY 0x0401 319a9de9248SMarcel Holtmann struct hci_cp_inquiry { 320a9de9248SMarcel Holtmann __u8 lap[3]; 321a9de9248SMarcel Holtmann __u8 length; 322a9de9248SMarcel Holtmann __u8 num_rsp; 32366c853ccSGustavo F. Padovan } __packed; 3241da177e4SLinus Torvalds 325a9de9248SMarcel Holtmann #define HCI_OP_INQUIRY_CANCEL 0x0402 326a9de9248SMarcel Holtmann 327a9de9248SMarcel Holtmann #define HCI_OP_EXIT_PERIODIC_INQ 0x0404 328a9de9248SMarcel Holtmann 329a9de9248SMarcel Holtmann #define HCI_OP_CREATE_CONN 0x0405 330a9de9248SMarcel Holtmann struct hci_cp_create_conn { 331a9de9248SMarcel Holtmann bdaddr_t bdaddr; 332a9de9248SMarcel Holtmann __le16 pkt_type; 333a9de9248SMarcel Holtmann __u8 pscan_rep_mode; 334a9de9248SMarcel Holtmann __u8 pscan_mode; 335a9de9248SMarcel Holtmann __le16 clock_offset; 336a9de9248SMarcel Holtmann __u8 role_switch; 33766c853ccSGustavo F. Padovan } __packed; 3381da177e4SLinus Torvalds 339a9de9248SMarcel Holtmann #define HCI_OP_DISCONNECT 0x0406 340a9de9248SMarcel Holtmann struct hci_cp_disconnect { 341a9de9248SMarcel Holtmann __le16 handle; 342a9de9248SMarcel Holtmann __u8 reason; 34366c853ccSGustavo F. Padovan } __packed; 3441da177e4SLinus Torvalds 345a9de9248SMarcel Holtmann #define HCI_OP_ADD_SCO 0x0407 346a9de9248SMarcel Holtmann struct hci_cp_add_sco { 347a9de9248SMarcel Holtmann __le16 handle; 348a9de9248SMarcel Holtmann __le16 pkt_type; 34966c853ccSGustavo F. Padovan } __packed; 350a9de9248SMarcel Holtmann 351a9de9248SMarcel Holtmann #define HCI_OP_CREATE_CONN_CANCEL 0x0408 352a9de9248SMarcel Holtmann struct hci_cp_create_conn_cancel { 3531da177e4SLinus Torvalds bdaddr_t bdaddr; 35466c853ccSGustavo F. Padovan } __packed; 3551da177e4SLinus Torvalds 356a9de9248SMarcel Holtmann #define HCI_OP_ACCEPT_CONN_REQ 0x0409 357a9de9248SMarcel Holtmann struct hci_cp_accept_conn_req { 358a9de9248SMarcel Holtmann bdaddr_t bdaddr; 359a9de9248SMarcel Holtmann __u8 role; 36066c853ccSGustavo F. Padovan } __packed; 3611da177e4SLinus Torvalds 362a9de9248SMarcel Holtmann #define HCI_OP_REJECT_CONN_REQ 0x040a 363a9de9248SMarcel Holtmann struct hci_cp_reject_conn_req { 364a9de9248SMarcel Holtmann bdaddr_t bdaddr; 365a9de9248SMarcel Holtmann __u8 reason; 36666c853ccSGustavo F. Padovan } __packed; 3671da177e4SLinus Torvalds 368a9de9248SMarcel Holtmann #define HCI_OP_LINK_KEY_REPLY 0x040b 369a9de9248SMarcel Holtmann struct hci_cp_link_key_reply { 370a9de9248SMarcel Holtmann bdaddr_t bdaddr; 371a9de9248SMarcel Holtmann __u8 link_key[16]; 37266c853ccSGustavo F. Padovan } __packed; 3731da177e4SLinus Torvalds 374a9de9248SMarcel Holtmann #define HCI_OP_LINK_KEY_NEG_REPLY 0x040c 375a9de9248SMarcel Holtmann struct hci_cp_link_key_neg_reply { 376a9de9248SMarcel Holtmann bdaddr_t bdaddr; 37766c853ccSGustavo F. Padovan } __packed; 3781da177e4SLinus Torvalds 379a9de9248SMarcel Holtmann #define HCI_OP_PIN_CODE_REPLY 0x040d 380a9de9248SMarcel Holtmann struct hci_cp_pin_code_reply { 381a9de9248SMarcel Holtmann bdaddr_t bdaddr; 382a9de9248SMarcel Holtmann __u8 pin_len; 383a9de9248SMarcel Holtmann __u8 pin_code[16]; 38466c853ccSGustavo F. Padovan } __packed; 385980e1a53SJohan Hedberg struct hci_rp_pin_code_reply { 386980e1a53SJohan Hedberg __u8 status; 387980e1a53SJohan Hedberg bdaddr_t bdaddr; 388980e1a53SJohan Hedberg } __packed; 389a9de9248SMarcel Holtmann 390a9de9248SMarcel Holtmann #define HCI_OP_PIN_CODE_NEG_REPLY 0x040e 391a9de9248SMarcel Holtmann struct hci_cp_pin_code_neg_reply { 392a9de9248SMarcel Holtmann bdaddr_t bdaddr; 39366c853ccSGustavo F. Padovan } __packed; 394980e1a53SJohan Hedberg struct hci_rp_pin_code_neg_reply { 395980e1a53SJohan Hedberg __u8 status; 396980e1a53SJohan Hedberg bdaddr_t bdaddr; 397980e1a53SJohan Hedberg } __packed; 398a9de9248SMarcel Holtmann 399a9de9248SMarcel Holtmann #define HCI_OP_CHANGE_CONN_PTYPE 0x040f 400a9de9248SMarcel Holtmann struct hci_cp_change_conn_ptype { 401a9de9248SMarcel Holtmann __le16 handle; 402a9de9248SMarcel Holtmann __le16 pkt_type; 40366c853ccSGustavo F. Padovan } __packed; 404a9de9248SMarcel Holtmann 405a9de9248SMarcel Holtmann #define HCI_OP_AUTH_REQUESTED 0x0411 406a9de9248SMarcel Holtmann struct hci_cp_auth_requested { 407a9de9248SMarcel Holtmann __le16 handle; 40866c853ccSGustavo F. Padovan } __packed; 409a9de9248SMarcel Holtmann 410a9de9248SMarcel Holtmann #define HCI_OP_SET_CONN_ENCRYPT 0x0413 411a9de9248SMarcel Holtmann struct hci_cp_set_conn_encrypt { 412a9de9248SMarcel Holtmann __le16 handle; 413a9de9248SMarcel Holtmann __u8 encrypt; 41466c853ccSGustavo F. Padovan } __packed; 415a9de9248SMarcel Holtmann 416a9de9248SMarcel Holtmann #define HCI_OP_CHANGE_CONN_LINK_KEY 0x0415 417a9de9248SMarcel Holtmann struct hci_cp_change_conn_link_key { 418a9de9248SMarcel Holtmann __le16 handle; 41966c853ccSGustavo F. Padovan } __packed; 420a9de9248SMarcel Holtmann 421a9de9248SMarcel Holtmann #define HCI_OP_REMOTE_NAME_REQ 0x0419 422a9de9248SMarcel Holtmann struct hci_cp_remote_name_req { 423a9de9248SMarcel Holtmann bdaddr_t bdaddr; 424a9de9248SMarcel Holtmann __u8 pscan_rep_mode; 425a9de9248SMarcel Holtmann __u8 pscan_mode; 426a9de9248SMarcel Holtmann __le16 clock_offset; 42766c853ccSGustavo F. Padovan } __packed; 428a9de9248SMarcel Holtmann 429a9de9248SMarcel Holtmann #define HCI_OP_REMOTE_NAME_REQ_CANCEL 0x041a 430a9de9248SMarcel Holtmann struct hci_cp_remote_name_req_cancel { 431a9de9248SMarcel Holtmann bdaddr_t bdaddr; 43266c853ccSGustavo F. Padovan } __packed; 433a9de9248SMarcel Holtmann 434a9de9248SMarcel Holtmann #define HCI_OP_READ_REMOTE_FEATURES 0x041b 435a9de9248SMarcel Holtmann struct hci_cp_read_remote_features { 436a9de9248SMarcel Holtmann __le16 handle; 43766c853ccSGustavo F. Padovan } __packed; 438a9de9248SMarcel Holtmann 439a9de9248SMarcel Holtmann #define HCI_OP_READ_REMOTE_EXT_FEATURES 0x041c 440a9de9248SMarcel Holtmann struct hci_cp_read_remote_ext_features { 441a9de9248SMarcel Holtmann __le16 handle; 442a9de9248SMarcel Holtmann __u8 page; 44366c853ccSGustavo F. Padovan } __packed; 444a9de9248SMarcel Holtmann 445a9de9248SMarcel Holtmann #define HCI_OP_READ_REMOTE_VERSION 0x041d 446a9de9248SMarcel Holtmann struct hci_cp_read_remote_version { 447a9de9248SMarcel Holtmann __le16 handle; 44866c853ccSGustavo F. Padovan } __packed; 449a9de9248SMarcel Holtmann 450a9de9248SMarcel Holtmann #define HCI_OP_SETUP_SYNC_CONN 0x0428 451a9de9248SMarcel Holtmann struct hci_cp_setup_sync_conn { 452a9de9248SMarcel Holtmann __le16 handle; 453a9de9248SMarcel Holtmann __le32 tx_bandwidth; 454a9de9248SMarcel Holtmann __le32 rx_bandwidth; 455a9de9248SMarcel Holtmann __le16 max_latency; 456a9de9248SMarcel Holtmann __le16 voice_setting; 457a9de9248SMarcel Holtmann __u8 retrans_effort; 458a9de9248SMarcel Holtmann __le16 pkt_type; 45966c853ccSGustavo F. Padovan } __packed; 460a9de9248SMarcel Holtmann 461a9de9248SMarcel Holtmann #define HCI_OP_ACCEPT_SYNC_CONN_REQ 0x0429 462a9de9248SMarcel Holtmann struct hci_cp_accept_sync_conn_req { 463a9de9248SMarcel Holtmann bdaddr_t bdaddr; 464a9de9248SMarcel Holtmann __le32 tx_bandwidth; 465a9de9248SMarcel Holtmann __le32 rx_bandwidth; 466a9de9248SMarcel Holtmann __le16 max_latency; 467a9de9248SMarcel Holtmann __le16 content_format; 468a9de9248SMarcel Holtmann __u8 retrans_effort; 469a9de9248SMarcel Holtmann __le16 pkt_type; 47066c853ccSGustavo F. Padovan } __packed; 471a9de9248SMarcel Holtmann 472a9de9248SMarcel Holtmann #define HCI_OP_REJECT_SYNC_CONN_REQ 0x042a 473a9de9248SMarcel Holtmann struct hci_cp_reject_sync_conn_req { 474a9de9248SMarcel Holtmann bdaddr_t bdaddr; 475a9de9248SMarcel Holtmann __u8 reason; 47666c853ccSGustavo F. Padovan } __packed; 477a9de9248SMarcel Holtmann 47817fa4b9dSJohan Hedberg #define HCI_OP_IO_CAPABILITY_REPLY 0x042b 47917fa4b9dSJohan Hedberg struct hci_cp_io_capability_reply { 48017fa4b9dSJohan Hedberg bdaddr_t bdaddr; 48117fa4b9dSJohan Hedberg __u8 capability; 48217fa4b9dSJohan Hedberg __u8 oob_data; 48317fa4b9dSJohan Hedberg __u8 authentication; 48417fa4b9dSJohan Hedberg } __packed; 48517fa4b9dSJohan Hedberg 486a5c29683SJohan Hedberg #define HCI_OP_USER_CONFIRM_REPLY 0x042c 487a5c29683SJohan Hedberg struct hci_cp_user_confirm_reply { 488a5c29683SJohan Hedberg bdaddr_t bdaddr; 489a5c29683SJohan Hedberg } __packed; 490a5c29683SJohan Hedberg struct hci_rp_user_confirm_reply { 491a5c29683SJohan Hedberg __u8 status; 492a5c29683SJohan Hedberg bdaddr_t bdaddr; 493a5c29683SJohan Hedberg } __packed; 494a5c29683SJohan Hedberg 495a5c29683SJohan Hedberg #define HCI_OP_USER_CONFIRM_NEG_REPLY 0x042d 496a5c29683SJohan Hedberg 4979ad4019aSBrian Gix #define HCI_OP_USER_PASSKEY_REPLY 0x042e 4989ad4019aSBrian Gix struct hci_cp_user_passkey_reply { 4999ad4019aSBrian Gix bdaddr_t bdaddr; 5009ad4019aSBrian Gix __le32 passkey; 5019ad4019aSBrian Gix } __packed; 5029ad4019aSBrian Gix 5039ad4019aSBrian Gix #define HCI_OP_USER_PASSKEY_NEG_REPLY 0x042f 5049ad4019aSBrian Gix 5052763eda6SSzymon Janc #define HCI_OP_REMOTE_OOB_DATA_REPLY 0x0430 5062763eda6SSzymon Janc struct hci_cp_remote_oob_data_reply { 5072763eda6SSzymon Janc bdaddr_t bdaddr; 5082763eda6SSzymon Janc __u8 hash[16]; 5092763eda6SSzymon Janc __u8 randomizer[16]; 5102763eda6SSzymon Janc } __packed; 5112763eda6SSzymon Janc 5122763eda6SSzymon Janc #define HCI_OP_REMOTE_OOB_DATA_NEG_REPLY 0x0433 5132763eda6SSzymon Janc struct hci_cp_remote_oob_data_neg_reply { 5142763eda6SSzymon Janc bdaddr_t bdaddr; 5152763eda6SSzymon Janc } __packed; 5162763eda6SSzymon Janc 51703b555e1SJohan Hedberg #define HCI_OP_IO_CAPABILITY_NEG_REPLY 0x0434 51803b555e1SJohan Hedberg struct hci_cp_io_capability_neg_reply { 51903b555e1SJohan Hedberg bdaddr_t bdaddr; 52003b555e1SJohan Hedberg __u8 reason; 52103b555e1SJohan Hedberg } __packed; 52203b555e1SJohan Hedberg 523a9de9248SMarcel Holtmann #define HCI_OP_SNIFF_MODE 0x0803 524a9de9248SMarcel Holtmann struct hci_cp_sniff_mode { 525a9de9248SMarcel Holtmann __le16 handle; 526a9de9248SMarcel Holtmann __le16 max_interval; 527a9de9248SMarcel Holtmann __le16 min_interval; 528a9de9248SMarcel Holtmann __le16 attempt; 529a9de9248SMarcel Holtmann __le16 timeout; 53066c853ccSGustavo F. Padovan } __packed; 531a9de9248SMarcel Holtmann 532a9de9248SMarcel Holtmann #define HCI_OP_EXIT_SNIFF_MODE 0x0804 533a9de9248SMarcel Holtmann struct hci_cp_exit_sniff_mode { 534a9de9248SMarcel Holtmann __le16 handle; 53566c853ccSGustavo F. Padovan } __packed; 536a9de9248SMarcel Holtmann 537a9de9248SMarcel Holtmann #define HCI_OP_ROLE_DISCOVERY 0x0809 538a9de9248SMarcel Holtmann struct hci_cp_role_discovery { 539a9de9248SMarcel Holtmann __le16 handle; 54066c853ccSGustavo F. Padovan } __packed; 541a9de9248SMarcel Holtmann struct hci_rp_role_discovery { 542a9de9248SMarcel Holtmann __u8 status; 543a9de9248SMarcel Holtmann __le16 handle; 544a9de9248SMarcel Holtmann __u8 role; 54566c853ccSGustavo F. Padovan } __packed; 546a9de9248SMarcel Holtmann 547a9de9248SMarcel Holtmann #define HCI_OP_SWITCH_ROLE 0x080b 548a9de9248SMarcel Holtmann struct hci_cp_switch_role { 549a9de9248SMarcel Holtmann bdaddr_t bdaddr; 550a9de9248SMarcel Holtmann __u8 role; 55166c853ccSGustavo F. Padovan } __packed; 552a9de9248SMarcel Holtmann 553a9de9248SMarcel Holtmann #define HCI_OP_READ_LINK_POLICY 0x080c 554a9de9248SMarcel Holtmann struct hci_cp_read_link_policy { 555a9de9248SMarcel Holtmann __le16 handle; 55666c853ccSGustavo F. Padovan } __packed; 557a9de9248SMarcel Holtmann struct hci_rp_read_link_policy { 558a9de9248SMarcel Holtmann __u8 status; 559a9de9248SMarcel Holtmann __le16 handle; 560a9de9248SMarcel Holtmann __le16 policy; 56166c853ccSGustavo F. Padovan } __packed; 562a9de9248SMarcel Holtmann 563a9de9248SMarcel Holtmann #define HCI_OP_WRITE_LINK_POLICY 0x080d 564a9de9248SMarcel Holtmann struct hci_cp_write_link_policy { 565a9de9248SMarcel Holtmann __le16 handle; 566a9de9248SMarcel Holtmann __le16 policy; 56766c853ccSGustavo F. Padovan } __packed; 568a9de9248SMarcel Holtmann struct hci_rp_write_link_policy { 569a9de9248SMarcel Holtmann __u8 status; 570a9de9248SMarcel Holtmann __le16 handle; 57166c853ccSGustavo F. Padovan } __packed; 572a9de9248SMarcel Holtmann 573e4e8e37cSMarcel Holtmann #define HCI_OP_READ_DEF_LINK_POLICY 0x080e 574e4e8e37cSMarcel Holtmann struct hci_rp_read_def_link_policy { 575e4e8e37cSMarcel Holtmann __u8 status; 576e4e8e37cSMarcel Holtmann __le16 policy; 57766c853ccSGustavo F. Padovan } __packed; 578e4e8e37cSMarcel Holtmann 579e4e8e37cSMarcel Holtmann #define HCI_OP_WRITE_DEF_LINK_POLICY 0x080f 580e4e8e37cSMarcel Holtmann struct hci_cp_write_def_link_policy { 581e4e8e37cSMarcel Holtmann __le16 policy; 58266c853ccSGustavo F. Padovan } __packed; 583e4e8e37cSMarcel Holtmann 584a9de9248SMarcel Holtmann #define HCI_OP_SNIFF_SUBRATE 0x0811 585a9de9248SMarcel Holtmann struct hci_cp_sniff_subrate { 586a9de9248SMarcel Holtmann __le16 handle; 587a9de9248SMarcel Holtmann __le16 max_latency; 588a9de9248SMarcel Holtmann __le16 min_remote_timeout; 589a9de9248SMarcel Holtmann __le16 min_local_timeout; 59066c853ccSGustavo F. Padovan } __packed; 591a9de9248SMarcel Holtmann 592a9de9248SMarcel Holtmann #define HCI_OP_SET_EVENT_MASK 0x0c01 593a9de9248SMarcel Holtmann struct hci_cp_set_event_mask { 594a9de9248SMarcel Holtmann __u8 mask[8]; 59566c853ccSGustavo F. Padovan } __packed; 596a9de9248SMarcel Holtmann 597a9de9248SMarcel Holtmann #define HCI_OP_RESET 0x0c03 598a9de9248SMarcel Holtmann 599a9de9248SMarcel Holtmann #define HCI_OP_SET_EVENT_FLT 0x0c05 6001da177e4SLinus Torvalds struct hci_cp_set_event_flt { 6011da177e4SLinus Torvalds __u8 flt_type; 6021da177e4SLinus Torvalds __u8 cond_type; 6031da177e4SLinus Torvalds __u8 condition[0]; 60466c853ccSGustavo F. Padovan } __packed; 6051da177e4SLinus Torvalds 6061da177e4SLinus Torvalds /* Filter types */ 6071da177e4SLinus Torvalds #define HCI_FLT_CLEAR_ALL 0x00 6081da177e4SLinus Torvalds #define HCI_FLT_INQ_RESULT 0x01 6091da177e4SLinus Torvalds #define HCI_FLT_CONN_SETUP 0x02 6101da177e4SLinus Torvalds 6111da177e4SLinus Torvalds /* CONN_SETUP Condition types */ 6121da177e4SLinus Torvalds #define HCI_CONN_SETUP_ALLOW_ALL 0x00 6131da177e4SLinus Torvalds #define HCI_CONN_SETUP_ALLOW_CLASS 0x01 6141da177e4SLinus Torvalds #define HCI_CONN_SETUP_ALLOW_BDADDR 0x02 6151da177e4SLinus Torvalds 6161da177e4SLinus Torvalds /* CONN_SETUP Conditions */ 6171da177e4SLinus Torvalds #define HCI_CONN_SETUP_AUTO_OFF 0x01 6181da177e4SLinus Torvalds #define HCI_CONN_SETUP_AUTO_ON 0x02 6191da177e4SLinus Torvalds 620b0916ea0SJohan Hedberg #define HCI_OP_DELETE_STORED_LINK_KEY 0x0c12 621b0916ea0SJohan Hedberg struct hci_cp_delete_stored_link_key { 622b0916ea0SJohan Hedberg bdaddr_t bdaddr; 623b0916ea0SJohan Hedberg __u8 delete_all; 624b0916ea0SJohan Hedberg } __packed; 625b0916ea0SJohan Hedberg 6261f6c6378SJohan Hedberg #define HCI_MAX_NAME_LENGTH 248 6271f6c6378SJohan Hedberg 628a9de9248SMarcel Holtmann #define HCI_OP_WRITE_LOCAL_NAME 0x0c13 629a9de9248SMarcel Holtmann struct hci_cp_write_local_name { 6301f6c6378SJohan Hedberg __u8 name[HCI_MAX_NAME_LENGTH]; 63166c853ccSGustavo F. Padovan } __packed; 632a9de9248SMarcel Holtmann 633a9de9248SMarcel Holtmann #define HCI_OP_READ_LOCAL_NAME 0x0c14 634a9de9248SMarcel Holtmann struct hci_rp_read_local_name { 635a9de9248SMarcel Holtmann __u8 status; 6361f6c6378SJohan Hedberg __u8 name[HCI_MAX_NAME_LENGTH]; 63766c853ccSGustavo F. Padovan } __packed; 638a9de9248SMarcel Holtmann 639a9de9248SMarcel Holtmann #define HCI_OP_WRITE_CA_TIMEOUT 0x0c16 640a9de9248SMarcel Holtmann 641a9de9248SMarcel Holtmann #define HCI_OP_WRITE_PG_TIMEOUT 0x0c18 642a9de9248SMarcel Holtmann 643a9de9248SMarcel Holtmann #define HCI_OP_WRITE_SCAN_ENABLE 0x0c1a 644a9de9248SMarcel Holtmann #define SCAN_DISABLED 0x00 645a9de9248SMarcel Holtmann #define SCAN_INQUIRY 0x01 646a9de9248SMarcel Holtmann #define SCAN_PAGE 0x02 647a9de9248SMarcel Holtmann 648a9de9248SMarcel Holtmann #define HCI_OP_READ_AUTH_ENABLE 0x0c1f 649a9de9248SMarcel Holtmann 650a9de9248SMarcel Holtmann #define HCI_OP_WRITE_AUTH_ENABLE 0x0c20 651a9de9248SMarcel Holtmann #define AUTH_DISABLED 0x00 652a9de9248SMarcel Holtmann #define AUTH_ENABLED 0x01 653a9de9248SMarcel Holtmann 654a9de9248SMarcel Holtmann #define HCI_OP_READ_ENCRYPT_MODE 0x0c21 655a9de9248SMarcel Holtmann 656a9de9248SMarcel Holtmann #define HCI_OP_WRITE_ENCRYPT_MODE 0x0c22 657a9de9248SMarcel Holtmann #define ENCRYPT_DISABLED 0x00 658a9de9248SMarcel Holtmann #define ENCRYPT_P2P 0x01 659a9de9248SMarcel Holtmann #define ENCRYPT_BOTH 0x02 660a9de9248SMarcel Holtmann 661a9de9248SMarcel Holtmann #define HCI_OP_READ_CLASS_OF_DEV 0x0c23 662a9de9248SMarcel Holtmann struct hci_rp_read_class_of_dev { 6631da177e4SLinus Torvalds __u8 status; 6641da177e4SLinus Torvalds __u8 dev_class[3]; 66566c853ccSGustavo F. Padovan } __packed; 6661da177e4SLinus Torvalds 667a9de9248SMarcel Holtmann #define HCI_OP_WRITE_CLASS_OF_DEV 0x0c24 668a9de9248SMarcel Holtmann struct hci_cp_write_class_of_dev { 6691da177e4SLinus Torvalds __u8 dev_class[3]; 67066c853ccSGustavo F. Padovan } __packed; 6711da177e4SLinus Torvalds 672a9de9248SMarcel Holtmann #define HCI_OP_READ_VOICE_SETTING 0x0c25 6731da177e4SLinus Torvalds struct hci_rp_read_voice_setting { 6741da177e4SLinus Torvalds __u8 status; 6751ebb9252SMarcel Holtmann __le16 voice_setting; 67666c853ccSGustavo F. Padovan } __packed; 6771da177e4SLinus Torvalds 678a9de9248SMarcel Holtmann #define HCI_OP_WRITE_VOICE_SETTING 0x0c26 6791da177e4SLinus Torvalds struct hci_cp_write_voice_setting { 6801ebb9252SMarcel Holtmann __le16 voice_setting; 68166c853ccSGustavo F. Padovan } __packed; 6821da177e4SLinus Torvalds 683a9de9248SMarcel Holtmann #define HCI_OP_HOST_BUFFER_SIZE 0x0c33 6841da177e4SLinus Torvalds struct hci_cp_host_buffer_size { 6851ebb9252SMarcel Holtmann __le16 acl_mtu; 6861da177e4SLinus Torvalds __u8 sco_mtu; 6871ebb9252SMarcel Holtmann __le16 acl_max_pkt; 6881ebb9252SMarcel Holtmann __le16 sco_max_pkt; 68966c853ccSGustavo F. Padovan } __packed; 6901da177e4SLinus Torvalds 691d5859e22SJohan Hedberg #define HCI_OP_WRITE_INQUIRY_MODE 0x0c45 692d5859e22SJohan Hedberg 69380a1e1dbSJohan Hedberg #define HCI_MAX_EIR_LENGTH 240 69480a1e1dbSJohan Hedberg 69580a1e1dbSJohan Hedberg #define HCI_OP_WRITE_EIR 0x0c52 69680a1e1dbSJohan Hedberg struct hci_cp_write_eir { 697816a11d5SJohan Hedberg __u8 fec; 698816a11d5SJohan Hedberg __u8 data[HCI_MAX_EIR_LENGTH]; 69980a1e1dbSJohan Hedberg } __packed; 70080a1e1dbSJohan Hedberg 701333140b5SMarcel Holtmann #define HCI_OP_READ_SSP_MODE 0x0c55 702333140b5SMarcel Holtmann struct hci_rp_read_ssp_mode { 703333140b5SMarcel Holtmann __u8 status; 704333140b5SMarcel Holtmann __u8 mode; 70566c853ccSGustavo F. Padovan } __packed; 706333140b5SMarcel Holtmann 707333140b5SMarcel Holtmann #define HCI_OP_WRITE_SSP_MODE 0x0c56 708333140b5SMarcel Holtmann struct hci_cp_write_ssp_mode { 709333140b5SMarcel Holtmann __u8 mode; 71066c853ccSGustavo F. Padovan } __packed; 711333140b5SMarcel Holtmann 712c35938b2SSzymon Janc #define HCI_OP_READ_LOCAL_OOB_DATA 0x0c57 713c35938b2SSzymon Janc struct hci_rp_read_local_oob_data { 714c35938b2SSzymon Janc __u8 status; 715c35938b2SSzymon Janc __u8 hash[16]; 716c35938b2SSzymon Janc __u8 randomizer[16]; 717c35938b2SSzymon Janc } __packed; 718c35938b2SSzymon Janc 719d5859e22SJohan Hedberg #define HCI_OP_READ_INQ_RSP_TX_POWER 0x0c58 720d5859e22SJohan Hedberg 7211e89cffbSAndrei Emeltchenko #define HCI_OP_READ_FLOW_CONTROL_MODE 0x0c66 7221e89cffbSAndrei Emeltchenko struct hci_rp_read_flow_control_mode { 7231e89cffbSAndrei Emeltchenko __u8 status; 7241e89cffbSAndrei Emeltchenko __u8 mode; 7251e89cffbSAndrei Emeltchenko } __packed; 7261e89cffbSAndrei Emeltchenko 727f9b49306SAndre Guedes #define HCI_OP_WRITE_LE_HOST_SUPPORTED 0x0c6d 728f9b49306SAndre Guedes struct hci_cp_write_le_host_supported { 729f9b49306SAndre Guedes __u8 le; 730f9b49306SAndre Guedes __u8 simul; 731f9b49306SAndre Guedes } __packed; 732f9b49306SAndre Guedes 733a9de9248SMarcel Holtmann #define HCI_OP_READ_LOCAL_VERSION 0x1001 734a9de9248SMarcel Holtmann struct hci_rp_read_local_version { 7351da177e4SLinus Torvalds __u8 status; 736a9de9248SMarcel Holtmann __u8 hci_ver; 737a9de9248SMarcel Holtmann __le16 hci_rev; 738a9de9248SMarcel Holtmann __u8 lmp_ver; 739a9de9248SMarcel Holtmann __le16 manufacturer; 740a9de9248SMarcel Holtmann __le16 lmp_subver; 74166c853ccSGustavo F. Padovan } __packed; 7421da177e4SLinus Torvalds 743a9de9248SMarcel Holtmann #define HCI_OP_READ_LOCAL_COMMANDS 0x1002 744a9de9248SMarcel Holtmann struct hci_rp_read_local_commands { 7451da177e4SLinus Torvalds __u8 status; 746a9de9248SMarcel Holtmann __u8 commands[64]; 74766c853ccSGustavo F. Padovan } __packed; 7481da177e4SLinus Torvalds 749a9de9248SMarcel Holtmann #define HCI_OP_READ_LOCAL_FEATURES 0x1003 750a9de9248SMarcel Holtmann struct hci_rp_read_local_features { 751a9de9248SMarcel Holtmann __u8 status; 752a9de9248SMarcel Holtmann __u8 features[8]; 75366c853ccSGustavo F. Padovan } __packed; 754a9de9248SMarcel Holtmann 755a9de9248SMarcel Holtmann #define HCI_OP_READ_LOCAL_EXT_FEATURES 0x1004 756971e3a4bSAndre Guedes struct hci_cp_read_local_ext_features { 757971e3a4bSAndre Guedes __u8 page; 758971e3a4bSAndre Guedes } __packed; 759a9de9248SMarcel Holtmann struct hci_rp_read_local_ext_features { 760a9de9248SMarcel Holtmann __u8 status; 761a9de9248SMarcel Holtmann __u8 page; 762a9de9248SMarcel Holtmann __u8 max_page; 763a9de9248SMarcel Holtmann __u8 features[8]; 76466c853ccSGustavo F. Padovan } __packed; 765a9de9248SMarcel Holtmann 766a9de9248SMarcel Holtmann #define HCI_OP_READ_BUFFER_SIZE 0x1005 767a9de9248SMarcel Holtmann struct hci_rp_read_buffer_size { 768a9de9248SMarcel Holtmann __u8 status; 769a9de9248SMarcel Holtmann __le16 acl_mtu; 770a9de9248SMarcel Holtmann __u8 sco_mtu; 771a9de9248SMarcel Holtmann __le16 acl_max_pkt; 772a9de9248SMarcel Holtmann __le16 sco_max_pkt; 77366c853ccSGustavo F. Padovan } __packed; 774a9de9248SMarcel Holtmann 775a9de9248SMarcel Holtmann #define HCI_OP_READ_BD_ADDR 0x1009 776a9de9248SMarcel Holtmann struct hci_rp_read_bd_addr { 777a9de9248SMarcel Holtmann __u8 status; 7781da177e4SLinus Torvalds bdaddr_t bdaddr; 77966c853ccSGustavo F. Padovan } __packed; 7801da177e4SLinus Torvalds 781350ee4cfSAndrei Emeltchenko #define HCI_OP_READ_DATA_BLOCK_SIZE 0x100a 782350ee4cfSAndrei Emeltchenko struct hci_rp_read_data_block_size { 783350ee4cfSAndrei Emeltchenko __u8 status; 784350ee4cfSAndrei Emeltchenko __le16 max_acl_len; 785350ee4cfSAndrei Emeltchenko __le16 block_len; 786350ee4cfSAndrei Emeltchenko __le16 num_blocks; 787350ee4cfSAndrei Emeltchenko } __packed; 788350ee4cfSAndrei Emeltchenko 789f6422ec6SAntti Julku #define HCI_OP_WRITE_PAGE_SCAN_ACTIVITY 0x0c1c 790f6422ec6SAntti Julku struct hci_cp_write_page_scan_activity { 791f6422ec6SAntti Julku __le16 interval; 792f6422ec6SAntti Julku __le16 window; 793f6422ec6SAntti Julku } __packed; 794f6422ec6SAntti Julku 795f6422ec6SAntti Julku #define HCI_OP_WRITE_PAGE_SCAN_TYPE 0x0c47 796f6422ec6SAntti Julku #define PAGE_SCAN_TYPE_STANDARD 0x00 797f6422ec6SAntti Julku #define PAGE_SCAN_TYPE_INTERLACED 0x01 798f6422ec6SAntti Julku 799928abaa7SAndrei Emeltchenko #define HCI_OP_READ_LOCAL_AMP_INFO 0x1409 800928abaa7SAndrei Emeltchenko struct hci_rp_read_local_amp_info { 801928abaa7SAndrei Emeltchenko __u8 status; 802928abaa7SAndrei Emeltchenko __u8 amp_status; 803928abaa7SAndrei Emeltchenko __le32 total_bw; 804928abaa7SAndrei Emeltchenko __le32 max_bw; 805928abaa7SAndrei Emeltchenko __le32 min_latency; 806928abaa7SAndrei Emeltchenko __le32 max_pdu; 807928abaa7SAndrei Emeltchenko __u8 amp_type; 808928abaa7SAndrei Emeltchenko __le16 pal_cap; 809928abaa7SAndrei Emeltchenko __le16 max_assoc_size; 810928abaa7SAndrei Emeltchenko __le32 max_flush_to; 811928abaa7SAndrei Emeltchenko __le32 be_flush_to; 812928abaa7SAndrei Emeltchenko } __packed; 813928abaa7SAndrei Emeltchenko 81463185f64SVille Tervo #define HCI_OP_LE_SET_EVENT_MASK 0x2001 81563185f64SVille Tervo struct hci_cp_le_set_event_mask { 81663185f64SVille Tervo __u8 mask[8]; 81763185f64SVille Tervo } __packed; 81863185f64SVille Tervo 81963185f64SVille Tervo #define HCI_OP_LE_READ_BUFFER_SIZE 0x2002 82063185f64SVille Tervo struct hci_rp_le_read_buffer_size { 82163185f64SVille Tervo __u8 status; 82263185f64SVille Tervo __le16 le_mtu; 82363185f64SVille Tervo __u8 le_max_pkt; 82463185f64SVille Tervo } __packed; 82563185f64SVille Tervo 82607f7fa5dSAndre Guedes #define HCI_OP_LE_SET_SCAN_PARAM 0x200b 82707f7fa5dSAndre Guedes struct hci_cp_le_set_scan_param { 82807f7fa5dSAndre Guedes __u8 type; 82907f7fa5dSAndre Guedes __le16 interval; 83007f7fa5dSAndre Guedes __le16 window; 83107f7fa5dSAndre Guedes __u8 own_address_type; 83207f7fa5dSAndre Guedes __u8 filter_policy; 83307f7fa5dSAndre Guedes } __packed; 83407f7fa5dSAndre Guedes 83568a8aea4SAndrei Emeltchenko #define LE_SCANNING_DISABLED 0x00 83668a8aea4SAndrei Emeltchenko #define LE_SCANNING_ENABLED 0x01 83768a8aea4SAndrei Emeltchenko 838eb9d91f5SAndre Guedes #define HCI_OP_LE_SET_SCAN_ENABLE 0x200c 839eb9d91f5SAndre Guedes struct hci_cp_le_set_scan_enable { 840eb9d91f5SAndre Guedes __u8 enable; 841eb9d91f5SAndre Guedes __u8 filter_dup; 842eb9d91f5SAndre Guedes } __packed; 843eb9d91f5SAndre Guedes 84463185f64SVille Tervo #define HCI_OP_LE_CREATE_CONN 0x200d 84563185f64SVille Tervo struct hci_cp_le_create_conn { 84663185f64SVille Tervo __le16 scan_interval; 84763185f64SVille Tervo __le16 scan_window; 84863185f64SVille Tervo __u8 filter_policy; 84963185f64SVille Tervo __u8 peer_addr_type; 85063185f64SVille Tervo bdaddr_t peer_addr; 85163185f64SVille Tervo __u8 own_address_type; 85263185f64SVille Tervo __le16 conn_interval_min; 85363185f64SVille Tervo __le16 conn_interval_max; 85463185f64SVille Tervo __le16 conn_latency; 85563185f64SVille Tervo __le16 supervision_timeout; 85663185f64SVille Tervo __le16 min_ce_len; 85763185f64SVille Tervo __le16 max_ce_len; 85863185f64SVille Tervo } __packed; 85963185f64SVille Tervo 86063185f64SVille Tervo #define HCI_OP_LE_CREATE_CONN_CANCEL 0x200e 86163185f64SVille Tervo 8622ce603ebSClaudio Takahasi #define HCI_OP_LE_CONN_UPDATE 0x2013 8632ce603ebSClaudio Takahasi struct hci_cp_le_conn_update { 8642ce603ebSClaudio Takahasi __le16 handle; 8652ce603ebSClaudio Takahasi __le16 conn_interval_min; 8662ce603ebSClaudio Takahasi __le16 conn_interval_max; 8672ce603ebSClaudio Takahasi __le16 conn_latency; 8682ce603ebSClaudio Takahasi __le16 supervision_timeout; 8692ce603ebSClaudio Takahasi __le16 min_ce_len; 8702ce603ebSClaudio Takahasi __le16 max_ce_len; 8712ce603ebSClaudio Takahasi } __packed; 8722ce603ebSClaudio Takahasi 873a7a595f6SVinicius Costa Gomes #define HCI_OP_LE_START_ENC 0x2019 874a7a595f6SVinicius Costa Gomes struct hci_cp_le_start_enc { 875a7a595f6SVinicius Costa Gomes __le16 handle; 876a7a595f6SVinicius Costa Gomes __u8 rand[8]; 877a7a595f6SVinicius Costa Gomes __le16 ediv; 878a7a595f6SVinicius Costa Gomes __u8 ltk[16]; 879a7a595f6SVinicius Costa Gomes } __packed; 880a7a595f6SVinicius Costa Gomes 881a7a595f6SVinicius Costa Gomes #define HCI_OP_LE_LTK_REPLY 0x201a 882a7a595f6SVinicius Costa Gomes struct hci_cp_le_ltk_reply { 883a7a595f6SVinicius Costa Gomes __le16 handle; 884a7a595f6SVinicius Costa Gomes __u8 ltk[16]; 885a7a595f6SVinicius Costa Gomes } __packed; 886a7a595f6SVinicius Costa Gomes struct hci_rp_le_ltk_reply { 887a7a595f6SVinicius Costa Gomes __u8 status; 888a7a595f6SVinicius Costa Gomes __le16 handle; 889a7a595f6SVinicius Costa Gomes } __packed; 890a7a595f6SVinicius Costa Gomes 891a7a595f6SVinicius Costa Gomes #define HCI_OP_LE_LTK_NEG_REPLY 0x201b 892a7a595f6SVinicius Costa Gomes struct hci_cp_le_ltk_neg_reply { 893a7a595f6SVinicius Costa Gomes __le16 handle; 894a7a595f6SVinicius Costa Gomes } __packed; 895a7a595f6SVinicius Costa Gomes struct hci_rp_le_ltk_neg_reply { 896a7a595f6SVinicius Costa Gomes __u8 status; 897a7a595f6SVinicius Costa Gomes __le16 handle; 898a7a595f6SVinicius Costa Gomes } __packed; 899a7a595f6SVinicius Costa Gomes 9001da177e4SLinus Torvalds /* ---- HCI Events ---- */ 9011da177e4SLinus Torvalds #define HCI_EV_INQUIRY_COMPLETE 0x01 9021da177e4SLinus Torvalds 9031da177e4SLinus Torvalds #define HCI_EV_INQUIRY_RESULT 0x02 9041da177e4SLinus Torvalds struct inquiry_info { 9051da177e4SLinus Torvalds bdaddr_t bdaddr; 9061da177e4SLinus Torvalds __u8 pscan_rep_mode; 9071da177e4SLinus Torvalds __u8 pscan_period_mode; 9081da177e4SLinus Torvalds __u8 pscan_mode; 9091da177e4SLinus Torvalds __u8 dev_class[3]; 9101ebb9252SMarcel Holtmann __le16 clock_offset; 91166c853ccSGustavo F. Padovan } __packed; 9121da177e4SLinus Torvalds 9131da177e4SLinus Torvalds #define HCI_EV_CONN_COMPLETE 0x03 9141da177e4SLinus Torvalds struct hci_ev_conn_complete { 9151da177e4SLinus Torvalds __u8 status; 9161ebb9252SMarcel Holtmann __le16 handle; 9171da177e4SLinus Torvalds bdaddr_t bdaddr; 9181da177e4SLinus Torvalds __u8 link_type; 9191da177e4SLinus Torvalds __u8 encr_mode; 92066c853ccSGustavo F. Padovan } __packed; 9211da177e4SLinus Torvalds 9221da177e4SLinus Torvalds #define HCI_EV_CONN_REQUEST 0x04 9231da177e4SLinus Torvalds struct hci_ev_conn_request { 9241da177e4SLinus Torvalds bdaddr_t bdaddr; 9251da177e4SLinus Torvalds __u8 dev_class[3]; 9261da177e4SLinus Torvalds __u8 link_type; 92766c853ccSGustavo F. Padovan } __packed; 9281da177e4SLinus Torvalds 9291da177e4SLinus Torvalds #define HCI_EV_DISCONN_COMPLETE 0x05 9301da177e4SLinus Torvalds struct hci_ev_disconn_complete { 9311da177e4SLinus Torvalds __u8 status; 9321ebb9252SMarcel Holtmann __le16 handle; 9331da177e4SLinus Torvalds __u8 reason; 93466c853ccSGustavo F. Padovan } __packed; 9351da177e4SLinus Torvalds 9361da177e4SLinus Torvalds #define HCI_EV_AUTH_COMPLETE 0x06 9371da177e4SLinus Torvalds struct hci_ev_auth_complete { 9381da177e4SLinus Torvalds __u8 status; 9391ebb9252SMarcel Holtmann __le16 handle; 94066c853ccSGustavo F. Padovan } __packed; 9411da177e4SLinus Torvalds 942a9de9248SMarcel Holtmann #define HCI_EV_REMOTE_NAME 0x07 943a9de9248SMarcel Holtmann struct hci_ev_remote_name { 944a9de9248SMarcel Holtmann __u8 status; 945a9de9248SMarcel Holtmann bdaddr_t bdaddr; 9461f6c6378SJohan Hedberg __u8 name[HCI_MAX_NAME_LENGTH]; 94766c853ccSGustavo F. Padovan } __packed; 948a9de9248SMarcel Holtmann 9491da177e4SLinus Torvalds #define HCI_EV_ENCRYPT_CHANGE 0x08 9501da177e4SLinus Torvalds struct hci_ev_encrypt_change { 9511da177e4SLinus Torvalds __u8 status; 9521ebb9252SMarcel Holtmann __le16 handle; 9531da177e4SLinus Torvalds __u8 encrypt; 95466c853ccSGustavo F. Padovan } __packed; 9551da177e4SLinus Torvalds 956a9de9248SMarcel Holtmann #define HCI_EV_CHANGE_LINK_KEY_COMPLETE 0x09 957a9de9248SMarcel Holtmann struct hci_ev_change_link_key_complete { 9581da177e4SLinus Torvalds __u8 status; 9591ebb9252SMarcel Holtmann __le16 handle; 96066c853ccSGustavo F. Padovan } __packed; 9611da177e4SLinus Torvalds 962a9de9248SMarcel Holtmann #define HCI_EV_REMOTE_FEATURES 0x0b 963a9de9248SMarcel Holtmann struct hci_ev_remote_features { 964a9de9248SMarcel Holtmann __u8 status; 965a9de9248SMarcel Holtmann __le16 handle; 966a9de9248SMarcel Holtmann __u8 features[8]; 96766c853ccSGustavo F. Padovan } __packed; 968a9de9248SMarcel Holtmann 969a9de9248SMarcel Holtmann #define HCI_EV_REMOTE_VERSION 0x0c 970a9de9248SMarcel Holtmann struct hci_ev_remote_version { 971a9de9248SMarcel Holtmann __u8 status; 972a9de9248SMarcel Holtmann __le16 handle; 973a9de9248SMarcel Holtmann __u8 lmp_ver; 974a9de9248SMarcel Holtmann __le16 manufacturer; 975a9de9248SMarcel Holtmann __le16 lmp_subver; 97666c853ccSGustavo F. Padovan } __packed; 977a9de9248SMarcel Holtmann 978a9de9248SMarcel Holtmann #define HCI_EV_QOS_SETUP_COMPLETE 0x0d 9791da177e4SLinus Torvalds struct hci_qos { 9801da177e4SLinus Torvalds __u8 service_type; 9811da177e4SLinus Torvalds __u32 token_rate; 9821da177e4SLinus Torvalds __u32 peak_bandwidth; 9831da177e4SLinus Torvalds __u32 latency; 9841da177e4SLinus Torvalds __u32 delay_variation; 98566c853ccSGustavo F. Padovan } __packed; 9861da177e4SLinus Torvalds struct hci_ev_qos_setup_complete { 9871da177e4SLinus Torvalds __u8 status; 9881ebb9252SMarcel Holtmann __le16 handle; 9891da177e4SLinus Torvalds struct hci_qos qos; 99066c853ccSGustavo F. Padovan } __packed; 9911da177e4SLinus Torvalds 992a9de9248SMarcel Holtmann #define HCI_EV_CMD_COMPLETE 0x0e 9931da177e4SLinus Torvalds struct hci_ev_cmd_complete { 9941da177e4SLinus Torvalds __u8 ncmd; 9951ebb9252SMarcel Holtmann __le16 opcode; 99666c853ccSGustavo F. Padovan } __packed; 9971da177e4SLinus Torvalds 998a9de9248SMarcel Holtmann #define HCI_EV_CMD_STATUS 0x0f 9991da177e4SLinus Torvalds struct hci_ev_cmd_status { 10001da177e4SLinus Torvalds __u8 status; 10011da177e4SLinus Torvalds __u8 ncmd; 10021ebb9252SMarcel Holtmann __le16 opcode; 100366c853ccSGustavo F. Padovan } __packed; 10041da177e4SLinus Torvalds 10051da177e4SLinus Torvalds #define HCI_EV_ROLE_CHANGE 0x12 10061da177e4SLinus Torvalds struct hci_ev_role_change { 10071da177e4SLinus Torvalds __u8 status; 10081da177e4SLinus Torvalds bdaddr_t bdaddr; 10091da177e4SLinus Torvalds __u8 role; 101066c853ccSGustavo F. Padovan } __packed; 10111da177e4SLinus Torvalds 1012a9de9248SMarcel Holtmann #define HCI_EV_NUM_COMP_PKTS 0x13 1013613a1c0cSAndrei Emeltchenko struct hci_comp_pkts_info { 1014613a1c0cSAndrei Emeltchenko __le16 handle; 1015613a1c0cSAndrei Emeltchenko __le16 count; 1016613a1c0cSAndrei Emeltchenko } __packed; 1017613a1c0cSAndrei Emeltchenko 1018a9de9248SMarcel Holtmann struct hci_ev_num_comp_pkts { 1019a9de9248SMarcel Holtmann __u8 num_hndl; 1020613a1c0cSAndrei Emeltchenko struct hci_comp_pkts_info handles[0]; 102166c853ccSGustavo F. Padovan } __packed; 1022a9de9248SMarcel Holtmann 10231da177e4SLinus Torvalds #define HCI_EV_MODE_CHANGE 0x14 10241da177e4SLinus Torvalds struct hci_ev_mode_change { 10251da177e4SLinus Torvalds __u8 status; 10261ebb9252SMarcel Holtmann __le16 handle; 10271da177e4SLinus Torvalds __u8 mode; 10281ebb9252SMarcel Holtmann __le16 interval; 102966c853ccSGustavo F. Padovan } __packed; 10301da177e4SLinus Torvalds 10311da177e4SLinus Torvalds #define HCI_EV_PIN_CODE_REQ 0x16 10321da177e4SLinus Torvalds struct hci_ev_pin_code_req { 10331da177e4SLinus Torvalds bdaddr_t bdaddr; 103466c853ccSGustavo F. Padovan } __packed; 10351da177e4SLinus Torvalds 10361da177e4SLinus Torvalds #define HCI_EV_LINK_KEY_REQ 0x17 10371da177e4SLinus Torvalds struct hci_ev_link_key_req { 10381da177e4SLinus Torvalds bdaddr_t bdaddr; 103966c853ccSGustavo F. Padovan } __packed; 10401da177e4SLinus Torvalds 10411da177e4SLinus Torvalds #define HCI_EV_LINK_KEY_NOTIFY 0x18 10421da177e4SLinus Torvalds struct hci_ev_link_key_notify { 10431da177e4SLinus Torvalds bdaddr_t bdaddr; 10441da177e4SLinus Torvalds __u8 link_key[16]; 10451da177e4SLinus Torvalds __u8 key_type; 104666c853ccSGustavo F. Padovan } __packed; 10471da177e4SLinus Torvalds 1048a9de9248SMarcel Holtmann #define HCI_EV_CLOCK_OFFSET 0x1c 10491da177e4SLinus Torvalds struct hci_ev_clock_offset { 10501da177e4SLinus Torvalds __u8 status; 10511ebb9252SMarcel Holtmann __le16 handle; 10521ebb9252SMarcel Holtmann __le16 clock_offset; 105366c853ccSGustavo F. Padovan } __packed; 10541da177e4SLinus Torvalds 1055a8746417SMarcel Holtmann #define HCI_EV_PKT_TYPE_CHANGE 0x1d 1056a8746417SMarcel Holtmann struct hci_ev_pkt_type_change { 1057a8746417SMarcel Holtmann __u8 status; 1058a8746417SMarcel Holtmann __le16 handle; 1059a8746417SMarcel Holtmann __le16 pkt_type; 106066c853ccSGustavo F. Padovan } __packed; 1061a8746417SMarcel Holtmann 106285a1e930SMarcel Holtmann #define HCI_EV_PSCAN_REP_MODE 0x20 106385a1e930SMarcel Holtmann struct hci_ev_pscan_rep_mode { 106485a1e930SMarcel Holtmann bdaddr_t bdaddr; 106585a1e930SMarcel Holtmann __u8 pscan_rep_mode; 106666c853ccSGustavo F. Padovan } __packed; 106785a1e930SMarcel Holtmann 1068a9de9248SMarcel Holtmann #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 1069a9de9248SMarcel Holtmann struct inquiry_info_with_rssi { 1070a9de9248SMarcel Holtmann bdaddr_t bdaddr; 1071a9de9248SMarcel Holtmann __u8 pscan_rep_mode; 1072a9de9248SMarcel Holtmann __u8 pscan_period_mode; 1073a9de9248SMarcel Holtmann __u8 dev_class[3]; 1074a9de9248SMarcel Holtmann __le16 clock_offset; 1075a9de9248SMarcel Holtmann __s8 rssi; 107666c853ccSGustavo F. Padovan } __packed; 1077a9de9248SMarcel Holtmann struct inquiry_info_with_rssi_and_pscan_mode { 1078a9de9248SMarcel Holtmann bdaddr_t bdaddr; 1079a9de9248SMarcel Holtmann __u8 pscan_rep_mode; 1080a9de9248SMarcel Holtmann __u8 pscan_period_mode; 1081a9de9248SMarcel Holtmann __u8 pscan_mode; 1082a9de9248SMarcel Holtmann __u8 dev_class[3]; 1083a9de9248SMarcel Holtmann __le16 clock_offset; 1084a9de9248SMarcel Holtmann __s8 rssi; 108566c853ccSGustavo F. Padovan } __packed; 1086a9de9248SMarcel Holtmann 1087a9de9248SMarcel Holtmann #define HCI_EV_REMOTE_EXT_FEATURES 0x23 1088a9de9248SMarcel Holtmann struct hci_ev_remote_ext_features { 1089a9de9248SMarcel Holtmann __u8 status; 1090a9de9248SMarcel Holtmann __le16 handle; 1091a9de9248SMarcel Holtmann __u8 page; 1092a9de9248SMarcel Holtmann __u8 max_page; 1093a9de9248SMarcel Holtmann __u8 features[8]; 109466c853ccSGustavo F. Padovan } __packed; 1095a9de9248SMarcel Holtmann 1096a9de9248SMarcel Holtmann #define HCI_EV_SYNC_CONN_COMPLETE 0x2c 1097a9de9248SMarcel Holtmann struct hci_ev_sync_conn_complete { 1098a9de9248SMarcel Holtmann __u8 status; 1099a9de9248SMarcel Holtmann __le16 handle; 1100a9de9248SMarcel Holtmann bdaddr_t bdaddr; 1101a9de9248SMarcel Holtmann __u8 link_type; 1102a9de9248SMarcel Holtmann __u8 tx_interval; 1103a9de9248SMarcel Holtmann __u8 retrans_window; 1104a9de9248SMarcel Holtmann __le16 rx_pkt_len; 1105a9de9248SMarcel Holtmann __le16 tx_pkt_len; 1106a9de9248SMarcel Holtmann __u8 air_mode; 110766c853ccSGustavo F. Padovan } __packed; 1108a9de9248SMarcel Holtmann 1109a9de9248SMarcel Holtmann #define HCI_EV_SYNC_CONN_CHANGED 0x2d 1110a9de9248SMarcel Holtmann struct hci_ev_sync_conn_changed { 1111a9de9248SMarcel Holtmann __u8 status; 1112a9de9248SMarcel Holtmann __le16 handle; 1113a9de9248SMarcel Holtmann __u8 tx_interval; 1114a9de9248SMarcel Holtmann __u8 retrans_window; 1115a9de9248SMarcel Holtmann __le16 rx_pkt_len; 1116a9de9248SMarcel Holtmann __le16 tx_pkt_len; 111766c853ccSGustavo F. Padovan } __packed; 1118a9de9248SMarcel Holtmann 1119a9de9248SMarcel Holtmann #define HCI_EV_SNIFF_SUBRATE 0x2e 112004837f64SMarcel Holtmann struct hci_ev_sniff_subrate { 112104837f64SMarcel Holtmann __u8 status; 112204837f64SMarcel Holtmann __le16 handle; 112304837f64SMarcel Holtmann __le16 max_tx_latency; 112404837f64SMarcel Holtmann __le16 max_rx_latency; 112504837f64SMarcel Holtmann __le16 max_remote_timeout; 112604837f64SMarcel Holtmann __le16 max_local_timeout; 112766c853ccSGustavo F. Padovan } __packed; 112804837f64SMarcel Holtmann 1129a9de9248SMarcel Holtmann #define HCI_EV_EXTENDED_INQUIRY_RESULT 0x2f 1130a9de9248SMarcel Holtmann struct extended_inquiry_info { 1131a9de9248SMarcel Holtmann bdaddr_t bdaddr; 1132a9de9248SMarcel Holtmann __u8 pscan_rep_mode; 1133a9de9248SMarcel Holtmann __u8 pscan_period_mode; 1134a9de9248SMarcel Holtmann __u8 dev_class[3]; 1135a9de9248SMarcel Holtmann __le16 clock_offset; 1136a9de9248SMarcel Holtmann __s8 rssi; 1137a9de9248SMarcel Holtmann __u8 data[240]; 113866c853ccSGustavo F. Padovan } __packed; 1139a9de9248SMarcel Holtmann 11400493684eSMarcel Holtmann #define HCI_EV_IO_CAPA_REQUEST 0x31 11410493684eSMarcel Holtmann struct hci_ev_io_capa_request { 11420493684eSMarcel Holtmann bdaddr_t bdaddr; 114366c853ccSGustavo F. Padovan } __packed; 11440493684eSMarcel Holtmann 114503b555e1SJohan Hedberg #define HCI_EV_IO_CAPA_REPLY 0x32 114603b555e1SJohan Hedberg struct hci_ev_io_capa_reply { 114703b555e1SJohan Hedberg bdaddr_t bdaddr; 114803b555e1SJohan Hedberg __u8 capability; 114903b555e1SJohan Hedberg __u8 oob_data; 115003b555e1SJohan Hedberg __u8 authentication; 115103b555e1SJohan Hedberg } __packed; 115203b555e1SJohan Hedberg 1153a5c29683SJohan Hedberg #define HCI_EV_USER_CONFIRM_REQUEST 0x33 1154a5c29683SJohan Hedberg struct hci_ev_user_confirm_req { 1155a5c29683SJohan Hedberg bdaddr_t bdaddr; 1156a5c29683SJohan Hedberg __le32 passkey; 1157a5c29683SJohan Hedberg } __packed; 1158a5c29683SJohan Hedberg 11599ad4019aSBrian Gix #define HCI_EV_USER_PASSKEY_REQUEST 0x34 11609ad4019aSBrian Gix struct hci_ev_user_passkey_req { 11619ad4019aSBrian Gix bdaddr_t bdaddr; 11629ad4019aSBrian Gix } __packed; 11639ad4019aSBrian Gix 11642763eda6SSzymon Janc #define HCI_EV_REMOTE_OOB_DATA_REQUEST 0x35 11652763eda6SSzymon Janc struct hci_ev_remote_oob_data_request { 11662763eda6SSzymon Janc bdaddr_t bdaddr; 11672763eda6SSzymon Janc } __packed; 11682763eda6SSzymon Janc 11690493684eSMarcel Holtmann #define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 11700493684eSMarcel Holtmann struct hci_ev_simple_pair_complete { 11710493684eSMarcel Holtmann __u8 status; 11720493684eSMarcel Holtmann bdaddr_t bdaddr; 117366c853ccSGustavo F. Padovan } __packed; 11740493684eSMarcel Holtmann 117541a96212SMarcel Holtmann #define HCI_EV_REMOTE_HOST_FEATURES 0x3d 117641a96212SMarcel Holtmann struct hci_ev_remote_host_features { 117741a96212SMarcel Holtmann bdaddr_t bdaddr; 117841a96212SMarcel Holtmann __u8 features[8]; 117966c853ccSGustavo F. Padovan } __packed; 118041a96212SMarcel Holtmann 118163185f64SVille Tervo #define HCI_EV_LE_META 0x3e 118263185f64SVille Tervo struct hci_ev_le_meta { 118363185f64SVille Tervo __u8 subevent; 118463185f64SVille Tervo } __packed; 118563185f64SVille Tervo 118625e89e99SAndrei Emeltchenko #define HCI_EV_NUM_COMP_BLOCKS 0x48 118725e89e99SAndrei Emeltchenko struct hci_comp_blocks_info { 118825e89e99SAndrei Emeltchenko __le16 handle; 118925e89e99SAndrei Emeltchenko __le16 pkts; 119025e89e99SAndrei Emeltchenko __le16 blocks; 119125e89e99SAndrei Emeltchenko } __packed; 119225e89e99SAndrei Emeltchenko 119325e89e99SAndrei Emeltchenko struct hci_ev_num_comp_blocks { 119425e89e99SAndrei Emeltchenko __le16 num_blocks; 119525e89e99SAndrei Emeltchenko __u8 num_hndl; 119625e89e99SAndrei Emeltchenko struct hci_comp_blocks_info handles[0]; 119725e89e99SAndrei Emeltchenko } __packed; 119825e89e99SAndrei Emeltchenko 119963185f64SVille Tervo /* Low energy meta events */ 120063185f64SVille Tervo #define HCI_EV_LE_CONN_COMPLETE 0x01 120163185f64SVille Tervo struct hci_ev_le_conn_complete { 120263185f64SVille Tervo __u8 status; 120363185f64SVille Tervo __le16 handle; 120463185f64SVille Tervo __u8 role; 120563185f64SVille Tervo __u8 bdaddr_type; 120663185f64SVille Tervo bdaddr_t bdaddr; 120763185f64SVille Tervo __le16 interval; 120863185f64SVille Tervo __le16 latency; 120963185f64SVille Tervo __le16 supervision_timeout; 121063185f64SVille Tervo __u8 clk_accurancy; 121163185f64SVille Tervo } __packed; 121263185f64SVille Tervo 1213a7a595f6SVinicius Costa Gomes #define HCI_EV_LE_LTK_REQ 0x05 1214a7a595f6SVinicius Costa Gomes struct hci_ev_le_ltk_req { 1215a7a595f6SVinicius Costa Gomes __le16 handle; 1216a7a595f6SVinicius Costa Gomes __u8 random[8]; 1217a7a595f6SVinicius Costa Gomes __le16 ediv; 1218a7a595f6SVinicius Costa Gomes } __packed; 1219a7a595f6SVinicius Costa Gomes 122057a56fd4SAnderson Briglia /* Advertising report event types */ 122157a56fd4SAnderson Briglia #define ADV_IND 0x00 122257a56fd4SAnderson Briglia #define ADV_DIRECT_IND 0x01 122357a56fd4SAnderson Briglia #define ADV_SCAN_IND 0x02 122457a56fd4SAnderson Briglia #define ADV_NONCONN_IND 0x03 122557a56fd4SAnderson Briglia #define ADV_SCAN_RSP 0x04 122657a56fd4SAnderson Briglia 122757a56fd4SAnderson Briglia #define ADDR_LE_DEV_PUBLIC 0x00 122857a56fd4SAnderson Briglia #define ADDR_LE_DEV_RANDOM 0x01 122957a56fd4SAnderson Briglia 123057a56fd4SAnderson Briglia #define HCI_EV_LE_ADVERTISING_REPORT 0x02 123157a56fd4SAnderson Briglia struct hci_ev_le_advertising_info { 123257a56fd4SAnderson Briglia __u8 evt_type; 123357a56fd4SAnderson Briglia __u8 bdaddr_type; 123457a56fd4SAnderson Briglia bdaddr_t bdaddr; 123557a56fd4SAnderson Briglia __u8 length; 123657a56fd4SAnderson Briglia __u8 data[0]; 123757a56fd4SAnderson Briglia } __packed; 123857a56fd4SAnderson Briglia 12391da177e4SLinus Torvalds /* Internal events generated by Bluetooth stack */ 1240a9de9248SMarcel Holtmann #define HCI_EV_STACK_INTERNAL 0xfd 12411da177e4SLinus Torvalds struct hci_ev_stack_internal { 12421da177e4SLinus Torvalds __u16 type; 12431da177e4SLinus Torvalds __u8 data[0]; 124466c853ccSGustavo F. Padovan } __packed; 12451da177e4SLinus Torvalds 12461da177e4SLinus Torvalds #define HCI_EV_SI_DEVICE 0x01 12471da177e4SLinus Torvalds struct hci_ev_si_device { 12481da177e4SLinus Torvalds __u16 event; 12491da177e4SLinus Torvalds __u16 dev_id; 125066c853ccSGustavo F. Padovan } __packed; 12511da177e4SLinus Torvalds 12521da177e4SLinus Torvalds #define HCI_EV_SI_SECURITY 0x02 12531da177e4SLinus Torvalds struct hci_ev_si_security { 12541da177e4SLinus Torvalds __u16 event; 12551da177e4SLinus Torvalds __u16 proto; 12561da177e4SLinus Torvalds __u16 subproto; 12571da177e4SLinus Torvalds __u8 incoming; 125866c853ccSGustavo F. Padovan } __packed; 12591da177e4SLinus Torvalds 12601da177e4SLinus Torvalds /* ---- HCI Packet structures ---- */ 12611da177e4SLinus Torvalds #define HCI_COMMAND_HDR_SIZE 3 12621da177e4SLinus Torvalds #define HCI_EVENT_HDR_SIZE 2 12631da177e4SLinus Torvalds #define HCI_ACL_HDR_SIZE 4 12641da177e4SLinus Torvalds #define HCI_SCO_HDR_SIZE 3 12651da177e4SLinus Torvalds 12661da177e4SLinus Torvalds struct hci_command_hdr { 12671ebb9252SMarcel Holtmann __le16 opcode; /* OCF & OGF */ 12681da177e4SLinus Torvalds __u8 plen; 126966c853ccSGustavo F. Padovan } __packed; 12701da177e4SLinus Torvalds 12711da177e4SLinus Torvalds struct hci_event_hdr { 12721da177e4SLinus Torvalds __u8 evt; 12731da177e4SLinus Torvalds __u8 plen; 127466c853ccSGustavo F. Padovan } __packed; 12751da177e4SLinus Torvalds 12761da177e4SLinus Torvalds struct hci_acl_hdr { 12771ebb9252SMarcel Holtmann __le16 handle; /* Handle & Flags(PB, BC) */ 12781ebb9252SMarcel Holtmann __le16 dlen; 127966c853ccSGustavo F. Padovan } __packed; 12801da177e4SLinus Torvalds 12811da177e4SLinus Torvalds struct hci_sco_hdr { 12821ebb9252SMarcel Holtmann __le16 handle; 12831da177e4SLinus Torvalds __u8 dlen; 128466c853ccSGustavo F. Padovan } __packed; 12851da177e4SLinus Torvalds 12862a123b86SArnaldo Carvalho de Melo #include <linux/skbuff.h> 12872a123b86SArnaldo Carvalho de Melo static inline struct hci_event_hdr *hci_event_hdr(const struct sk_buff *skb) 12882a123b86SArnaldo Carvalho de Melo { 12892a123b86SArnaldo Carvalho de Melo return (struct hci_event_hdr *) skb->data; 12902a123b86SArnaldo Carvalho de Melo } 12912a123b86SArnaldo Carvalho de Melo 12922a123b86SArnaldo Carvalho de Melo static inline struct hci_acl_hdr *hci_acl_hdr(const struct sk_buff *skb) 12932a123b86SArnaldo Carvalho de Melo { 12942a123b86SArnaldo Carvalho de Melo return (struct hci_acl_hdr *) skb->data; 12952a123b86SArnaldo Carvalho de Melo } 12962a123b86SArnaldo Carvalho de Melo 12972a123b86SArnaldo Carvalho de Melo static inline struct hci_sco_hdr *hci_sco_hdr(const struct sk_buff *skb) 12982a123b86SArnaldo Carvalho de Melo { 12992a123b86SArnaldo Carvalho de Melo return (struct hci_sco_hdr *) skb->data; 13002a123b86SArnaldo Carvalho de Melo } 13012a123b86SArnaldo Carvalho de Melo 13021da177e4SLinus Torvalds /* Command opcode pack/unpack */ 13031da177e4SLinus Torvalds #define hci_opcode_pack(ogf, ocf) (__u16) ((ocf & 0x03ff)|(ogf << 10)) 13041da177e4SLinus Torvalds #define hci_opcode_ogf(op) (op >> 10) 13051da177e4SLinus Torvalds #define hci_opcode_ocf(op) (op & 0x03ff) 13061da177e4SLinus Torvalds 13071da177e4SLinus Torvalds /* ACL handle and flags pack/unpack */ 13081da177e4SLinus Torvalds #define hci_handle_pack(h, f) (__u16) ((h & 0x0fff)|(f << 12)) 13091da177e4SLinus Torvalds #define hci_handle(h) (h & 0x0fff) 13101da177e4SLinus Torvalds #define hci_flags(h) (h >> 12) 13111da177e4SLinus Torvalds 13121da177e4SLinus Torvalds /* ---- HCI Sockets ---- */ 13131da177e4SLinus Torvalds 13141da177e4SLinus Torvalds /* Socket options */ 13151da177e4SLinus Torvalds #define HCI_DATA_DIR 1 13161da177e4SLinus Torvalds #define HCI_FILTER 2 13171da177e4SLinus Torvalds #define HCI_TIME_STAMP 3 13181da177e4SLinus Torvalds 13191da177e4SLinus Torvalds /* CMSG flags */ 13201da177e4SLinus Torvalds #define HCI_CMSG_DIR 0x0001 13211da177e4SLinus Torvalds #define HCI_CMSG_TSTAMP 0x0002 13221da177e4SLinus Torvalds 13231da177e4SLinus Torvalds struct sockaddr_hci { 13241da177e4SLinus Torvalds sa_family_t hci_family; 13251da177e4SLinus Torvalds unsigned short hci_dev; 1326c02178d2SJohan Hedberg unsigned short hci_channel; 13271da177e4SLinus Torvalds }; 13281da177e4SLinus Torvalds #define HCI_DEV_NONE 0xffff 13291da177e4SLinus Torvalds 1330c02178d2SJohan Hedberg #define HCI_CHANNEL_RAW 0 1331cd82e61cSMarcel Holtmann #define HCI_CHANNEL_MONITOR 2 1332*66f3b913SGustavo Padovan #define HCI_CHANNEL_CONTROL 3 1333c02178d2SJohan Hedberg 13341da177e4SLinus Torvalds struct hci_filter { 13351da177e4SLinus Torvalds unsigned long type_mask; 13361da177e4SLinus Torvalds unsigned long event_mask[2]; 1337905f3ed6SAl Viro __le16 opcode; 13381da177e4SLinus Torvalds }; 13391da177e4SLinus Torvalds 13401da177e4SLinus Torvalds struct hci_ufilter { 13411da177e4SLinus Torvalds __u32 type_mask; 13421da177e4SLinus Torvalds __u32 event_mask[2]; 1343905f3ed6SAl Viro __le16 opcode; 13441da177e4SLinus Torvalds }; 13451da177e4SLinus Torvalds 13461da177e4SLinus Torvalds #define HCI_FLT_TYPE_BITS 31 13471da177e4SLinus Torvalds #define HCI_FLT_EVENT_BITS 63 13481da177e4SLinus Torvalds #define HCI_FLT_OGF_BITS 63 13491da177e4SLinus Torvalds #define HCI_FLT_OCF_BITS 127 13501da177e4SLinus Torvalds 13511da177e4SLinus Torvalds /* ---- HCI Ioctl requests structures ---- */ 13521da177e4SLinus Torvalds struct hci_dev_stats { 13531da177e4SLinus Torvalds __u32 err_rx; 13541da177e4SLinus Torvalds __u32 err_tx; 13551da177e4SLinus Torvalds __u32 cmd_tx; 13561da177e4SLinus Torvalds __u32 evt_rx; 13571da177e4SLinus Torvalds __u32 acl_tx; 13581da177e4SLinus Torvalds __u32 acl_rx; 13591da177e4SLinus Torvalds __u32 sco_tx; 13601da177e4SLinus Torvalds __u32 sco_rx; 13611da177e4SLinus Torvalds __u32 byte_rx; 13621da177e4SLinus Torvalds __u32 byte_tx; 13631da177e4SLinus Torvalds }; 13641da177e4SLinus Torvalds 13651da177e4SLinus Torvalds struct hci_dev_info { 13661da177e4SLinus Torvalds __u16 dev_id; 13671da177e4SLinus Torvalds char name[8]; 13681da177e4SLinus Torvalds 13691da177e4SLinus Torvalds bdaddr_t bdaddr; 13701da177e4SLinus Torvalds 13711da177e4SLinus Torvalds __u32 flags; 13721da177e4SLinus Torvalds __u8 type; 13731da177e4SLinus Torvalds 13741da177e4SLinus Torvalds __u8 features[8]; 13751da177e4SLinus Torvalds 13761da177e4SLinus Torvalds __u32 pkt_type; 13771da177e4SLinus Torvalds __u32 link_policy; 13781da177e4SLinus Torvalds __u32 link_mode; 13791da177e4SLinus Torvalds 13801da177e4SLinus Torvalds __u16 acl_mtu; 13811da177e4SLinus Torvalds __u16 acl_pkts; 13821da177e4SLinus Torvalds __u16 sco_mtu; 13831da177e4SLinus Torvalds __u16 sco_pkts; 13841da177e4SLinus Torvalds 13851da177e4SLinus Torvalds struct hci_dev_stats stat; 13861da177e4SLinus Torvalds }; 13871da177e4SLinus Torvalds 13881da177e4SLinus Torvalds struct hci_conn_info { 13891da177e4SLinus Torvalds __u16 handle; 13901da177e4SLinus Torvalds bdaddr_t bdaddr; 13911da177e4SLinus Torvalds __u8 type; 13921da177e4SLinus Torvalds __u8 out; 13931da177e4SLinus Torvalds __u16 state; 13941da177e4SLinus Torvalds __u32 link_mode; 13951da177e4SLinus Torvalds }; 13961da177e4SLinus Torvalds 13971da177e4SLinus Torvalds struct hci_dev_req { 13981da177e4SLinus Torvalds __u16 dev_id; 13991da177e4SLinus Torvalds __u32 dev_opt; 14001da177e4SLinus Torvalds }; 14011da177e4SLinus Torvalds 14021da177e4SLinus Torvalds struct hci_dev_list_req { 14031da177e4SLinus Torvalds __u16 dev_num; 14041da177e4SLinus Torvalds struct hci_dev_req dev_req[0]; /* hci_dev_req structures */ 14051da177e4SLinus Torvalds }; 14061da177e4SLinus Torvalds 14071da177e4SLinus Torvalds struct hci_conn_list_req { 14081da177e4SLinus Torvalds __u16 dev_id; 14091da177e4SLinus Torvalds __u16 conn_num; 14101da177e4SLinus Torvalds struct hci_conn_info conn_info[0]; 14111da177e4SLinus Torvalds }; 14121da177e4SLinus Torvalds 14131da177e4SLinus Torvalds struct hci_conn_info_req { 14141da177e4SLinus Torvalds bdaddr_t bdaddr; 14151da177e4SLinus Torvalds __u8 type; 14161da177e4SLinus Torvalds struct hci_conn_info conn_info[0]; 14171da177e4SLinus Torvalds }; 14181da177e4SLinus Torvalds 141940be492fSMarcel Holtmann struct hci_auth_info_req { 142040be492fSMarcel Holtmann bdaddr_t bdaddr; 142140be492fSMarcel Holtmann __u8 type; 142240be492fSMarcel Holtmann }; 142340be492fSMarcel Holtmann 14241da177e4SLinus Torvalds struct hci_inquiry_req { 14251da177e4SLinus Torvalds __u16 dev_id; 14261da177e4SLinus Torvalds __u16 flags; 14271da177e4SLinus Torvalds __u8 lap[3]; 14281da177e4SLinus Torvalds __u8 length; 14291da177e4SLinus Torvalds __u8 num_rsp; 14301da177e4SLinus Torvalds }; 14311da177e4SLinus Torvalds #define IREQ_CACHE_FLUSH 0x0001 14321da177e4SLinus Torvalds 14338b281b9cSFabio Estevam extern bool enable_hs; 1434d7b7e796SMarcel Holtmann extern bool enable_le; 14358830f514SAndrei Emeltchenko 14361da177e4SLinus Torvalds #endif /* __HCI_H */ 1437