aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-01-25 06:28:33 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-07 22:40:08 -0500
commit17fa4b9dff72fb3a1a68cc80caf98fc941d2b8b3 (patch)
tree34febcb1be7bf64995dd94c5db5755c5d9d7754f /include/net/bluetooth
parent980e1a537fed7dfa53e9a4b6e586b43341f8c2d5 (diff)
Bluetooth: Add set_io_capability management command
This patch adds a new set_io_capability management command which is used to set the IO capability for Secure Simple Pairing (SSP) as well as the Security Manager Protocol (SMP). The value is per hci_dev and each hci_conn object inherits it upon creation. 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.h8
-rw-r--r--include/net/bluetooth/hci_core.h2
-rw-r--r--include/net/bluetooth/mgmt.h6
3 files changed, 16 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index e8e52da2b26b..4bee030e4b52 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -402,6 +402,14 @@ struct hci_cp_reject_sync_conn_req {
402 __u8 reason; 402 __u8 reason;
403} __packed; 403} __packed;
404 404
405#define HCI_OP_IO_CAPABILITY_REPLY 0x042b
406struct hci_cp_io_capability_reply {
407 bdaddr_t bdaddr;
408 __u8 capability;
409 __u8 oob_data;
410 __u8 authentication;
411} __packed;
412
405#define HCI_OP_IO_CAPABILITY_NEG_REPLY 0x0434 413#define HCI_OP_IO_CAPABILITY_NEG_REPLY 0x0434
406struct hci_cp_io_capability_neg_reply { 414struct hci_cp_io_capability_neg_reply {
407 bdaddr_t bdaddr; 415 bdaddr_t bdaddr;
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 9ac3da6e4a9a..6163bff6fa91 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -106,6 +106,7 @@ struct hci_dev {
106 __u16 manufacturer; 106 __u16 manufacturer;
107 __le16 lmp_subver; 107 __le16 lmp_subver;
108 __u16 voice_setting; 108 __u16 voice_setting;
109 __u8 io_capability;
109 110
110 __u16 pkt_type; 111 __u16 pkt_type;
111 __u16 esco_type; 112 __u16 esco_type;
@@ -214,6 +215,7 @@ struct hci_conn {
214 __u8 sec_level; 215 __u8 sec_level;
215 __u8 pending_sec_level; 216 __u8 pending_sec_level;
216 __u8 pin_length; 217 __u8 pin_length;
218 __u8 io_capability;
217 __u8 power_save; 219 __u8 power_save;
218 __u16 disc_timeout; 220 __u16 disc_timeout;
219 unsigned long pend; 221 unsigned long pend;
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 46fb56d21b59..44ac55c85079 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -154,6 +154,12 @@ struct mgmt_cp_pin_code_neg_reply {
154 bdaddr_t bdaddr; 154 bdaddr_t bdaddr;
155} __packed; 155} __packed;
156 156
157#define MGMT_OP_SET_IO_CAPABILITY 0x0013
158struct mgmt_cp_set_io_capability {
159 __le16 index;
160 __u8 io_capability;
161} __packed;
162
157#define MGMT_EV_CMD_COMPLETE 0x0001 163#define MGMT_EV_CMD_COMPLETE 0x0001
158struct mgmt_ev_cmd_complete { 164struct mgmt_ev_cmd_complete {
159 __le16 opcode; 165 __le16 opcode;