summaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/mgmt.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2011-01-22 05:10:07 +0100
committerGustavo F. Padovan <padovan@profusion.mobi>2011-02-08 04:40:07 +0100
commit980e1a537fed7dfa53e9a4b6e586b43341f8c2d5 (patch)
tree36d7716d48a71e16f37afb5d8afdb527463826cd /include/net/bluetooth/mgmt.h
parentBluetooth: Create common cmd_complete function for mgmt.c (diff)
downloadlinux-980e1a537fed7dfa53e9a4b6e586b43341f8c2d5.tar.xz
linux-980e1a537fed7dfa53e9a4b6e586b43341f8c2d5.zip
Bluetooth: Add support for PIN code handling in the management interface
This patch adds the necessary commands and events needed to communicate PIN code related actions between the kernel and userspace. This includes a pin_code_request event as well as pin_code_reply and pin_code_negative_reply commands. Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net/bluetooth/mgmt.h')
-rw-r--r--include/net/bluetooth/mgmt.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 3d8d589fa559..46fb56d21b59 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -140,6 +140,20 @@ struct mgmt_rp_get_connections {
bdaddr_t conn[0];
} __packed;
+#define MGMT_OP_PIN_CODE_REPLY 0x0011
+struct mgmt_cp_pin_code_reply {
+ __le16 index;
+ bdaddr_t bdaddr;
+ __u8 pin_len;
+ __u8 pin_code[16];
+} __packed;
+
+#define MGMT_OP_PIN_CODE_NEG_REPLY 0x0012
+struct mgmt_cp_pin_code_neg_reply {
+ __le16 index;
+ bdaddr_t bdaddr;
+} __packed;
+
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
__le16 opcode;
@@ -201,3 +215,9 @@ struct mgmt_ev_connect_failed {
bdaddr_t bdaddr;
__u8 status;
} __packed;
+
+#define MGMT_EV_PIN_CODE_REQUEST 0x000E
+struct mgmt_ev_pin_code_request {
+ __le16 index;
+ bdaddr_t bdaddr;
+} __packed;