aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-01-24 18:19:58 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-07 22:40:06 -0500
commitd5859e22cd40b73164b3e5d8d5d796f96edcc6af (patch)
tree6a5fa908020f59dd8b6dd94eb042f4a0634d1e20 /include/net/bluetooth
parentd83506003608910d24d5ace9ec06ad1bfd9ad110 (diff)
Bluetooth: Implement a more complete adapter initialization sequence
Using the managment interface means that user space doesn't need to do any HCI command sending at all. This patch moves the remaining initialization commands from user space to the kernel side. The patch makes use of the new feature of __hci_request which allows the request to be dynamically modified while it is ongoing (something that is needed to react appropriately to the local features and the version of the adapter). Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/hci.h11
-rw-r--r--include/net/bluetooth/hci_core.h2
2 files changed, 13 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 4e2f008d32e1..99ac3516fe9d 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -189,19 +189,26 @@ enum {
189#define LMP_PSCHEME 0x02 189#define LMP_PSCHEME 0x02
190#define LMP_PCONTROL 0x04 190#define LMP_PCONTROL 0x04
191 191
192#define LMP_RSSI_INQ 0x40
192#define LMP_ESCO 0x80 193#define LMP_ESCO 0x80
193 194
194#define LMP_EV4 0x01 195#define LMP_EV4 0x01
195#define LMP_EV5 0x02 196#define LMP_EV5 0x02
197#define LMP_LE 0x40
196 198
197#define LMP_SNIFF_SUBR 0x02 199#define LMP_SNIFF_SUBR 0x02
200#define LMP_PAUSE_ENC 0x04
198#define LMP_EDR_ESCO_2M 0x20 201#define LMP_EDR_ESCO_2M 0x20
199#define LMP_EDR_ESCO_3M 0x40 202#define LMP_EDR_ESCO_3M 0x40
200#define LMP_EDR_3S_ESCO 0x80 203#define LMP_EDR_3S_ESCO 0x80
201 204
205#define LMP_EXT_INQ 0x01
202#define LMP_SIMPLE_PAIR 0x08 206#define LMP_SIMPLE_PAIR 0x08
203#define LMP_NO_FLUSH 0x40 207#define LMP_NO_FLUSH 0x40
204 208
209#define LMP_LSTO 0x01
210#define LMP_INQ_TX_PWR 0x02
211
205/* Connection modes */ 212/* Connection modes */
206#define HCI_CM_ACTIVE 0x0000 213#define HCI_CM_ACTIVE 0x0000
207#define HCI_CM_HOLD 0x0001 214#define HCI_CM_HOLD 0x0001
@@ -556,6 +563,8 @@ struct hci_cp_host_buffer_size {
556 __le16 sco_max_pkt; 563 __le16 sco_max_pkt;
557} __packed; 564} __packed;
558 565
566#define HCI_OP_WRITE_INQUIRY_MODE 0x0c45
567
559#define HCI_OP_READ_SSP_MODE 0x0c55 568#define HCI_OP_READ_SSP_MODE 0x0c55
560struct hci_rp_read_ssp_mode { 569struct hci_rp_read_ssp_mode {
561 __u8 status; 570 __u8 status;
@@ -567,6 +576,8 @@ struct hci_cp_write_ssp_mode {
567 __u8 mode; 576 __u8 mode;
568} __packed; 577} __packed;
569 578
579#define HCI_OP_READ_INQ_RSP_TX_POWER 0x0c58
580
570#define HCI_OP_READ_LOCAL_VERSION 0x1001 581#define HCI_OP_READ_LOCAL_VERSION 0x1001
571struct hci_rp_read_local_version { 582struct hci_rp_read_local_version {
572 __u8 status; 583 __u8 status;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 0dbdcc5f44e4..71a3fbf1e785 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -91,7 +91,9 @@ struct hci_dev {
91 __u8 ssp_mode; 91 __u8 ssp_mode;
92 __u8 hci_ver; 92 __u8 hci_ver;
93 __u16 hci_rev; 93 __u16 hci_rev;
94 __u8 lmp_ver;
94 __u16 manufacturer; 95 __u16 manufacturer;
96 __le16 lmp_subver;
95 __u16 voice_setting; 97 __u16 voice_setting;
96 98
97 __u16 pkt_type; 99 __u16 pkt_type;