summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJohan Hedberg2010-12-29 23:18:33 +0100
committerGustavo F. Padovan2011-02-08 04:40:05 +0100
commit9fbcbb455dd01abfad4f314b618ac51d566114cb (patch)
treed82d36ff143611df2a41f4249432420d649d3576 /include
parentBluetooth: Add support for set_discoverable management command (diff)
downloadkernel-qcow2-linux-9fbcbb455dd01abfad4f314b618ac51d566114cb.tar.gz
kernel-qcow2-linux-9fbcbb455dd01abfad4f314b618ac51d566114cb.tar.xz
kernel-qcow2-linux-9fbcbb455dd01abfad4f314b618ac51d566114cb.zip
Bluetooth: Add set_connectable management command
This patch adds a set_connectable command as well as a corresponding event to the management interface. It's mainly useful for setting an adapter as connectable from a non-initialized state as well as setting an already initialized adapter as non-connectable (mostly useful for qualification purposes). Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include')
-rw-r--r--include/net/bluetooth/hci_core.h1
-rw-r--r--include/net/bluetooth/mgmt.h17
2 files changed, 18 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index ee5ec4f17a15..ba3dbe3188ed 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -676,6 +676,7 @@ int mgmt_index_added(u16 index);
int mgmt_index_removed(u16 index);
int mgmt_powered(u16 index, u8 powered);
int mgmt_discoverable(u16 index, u8 discoverable);
+int mgmt_connectable(u16 index, u8 connectable);
/* HCI info for socket */
#define hci_pi(sk) ((struct hci_pinfo *) sk)
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h
index 434dbcf28b6e..008acf54147a 100644
--- a/include/net/bluetooth/mgmt.h
+++ b/include/net/bluetooth/mgmt.h
@@ -47,6 +47,7 @@ struct mgmt_rp_read_info {
__le16 index;
__u8 type;
__u8 powered;
+ __u8 connectable;
__u8 discoverable;
__u8 pairable;
__u8 sec_mode;
@@ -78,6 +79,16 @@ struct mgmt_rp_set_discoverable {
__u8 discoverable;
} __packed;
+#define MGMT_OP_SET_CONNECTABLE 0x0007
+struct mgmt_cp_set_connectable {
+ __le16 index;
+ __u8 connectable;
+} __packed;
+struct mgmt_rp_set_connectable {
+ __le16 index;
+ __u8 connectable;
+} __packed;
+
#define MGMT_EV_CMD_COMPLETE 0x0001
struct mgmt_ev_cmd_complete {
__le16 opcode;
@@ -117,3 +128,9 @@ struct mgmt_ev_discoverable {
__le16 index;
__u8 discoverable;
} __packed;
+
+#define MGMT_EV_CONNECTABLE 0x0008
+struct mgmt_ev_connectable {
+ __le16 index;
+ __u8 connectable;
+} __packed;