diff options
| author | Johan Hedberg <johan.hedberg@nokia.com> | 2011-01-20 05:40:27 -0500 |
|---|---|---|
| committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-07 22:40:07 -0500 |
| commit | 8962ee74be48df16027100f657b2b12e8ef3d34d (patch) | |
| tree | bbafd1e6cf773c4712c57f578c84f44eae012ec0 /include/net/bluetooth | |
| parent | f7520543ab40341edbc2aeee7fef68218be19a0a (diff) | |
Bluetooth: Add disconnect managment command
This patch adds a disconnect command to the managment interface. Using
this command user space is able to force the disconnection of connected
devices. The command maps directly to the Disconnect HCI command.
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_core.h | 1 | ||||
| -rw-r--r-- | include/net/bluetooth/mgmt.h | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 746f8dc8aad1..2197a099a2b7 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
| @@ -716,6 +716,7 @@ int mgmt_connectable(u16 index, u8 connectable); | |||
| 716 | int mgmt_new_key(u16 index, struct link_key *key, u8 old_key_type); | 716 | int mgmt_new_key(u16 index, struct link_key *key, u8 old_key_type); |
| 717 | int mgmt_connected(u16 index, bdaddr_t *bdaddr); | 717 | int mgmt_connected(u16 index, bdaddr_t *bdaddr); |
| 718 | int mgmt_disconnected(u16 index, bdaddr_t *bdaddr); | 718 | int mgmt_disconnected(u16 index, bdaddr_t *bdaddr); |
| 719 | int mgmt_disconnect_failed(u16 index); | ||
| 719 | 720 | ||
| 720 | /* HCI info for socket */ | 721 | /* HCI info for socket */ |
| 721 | #define hci_pi(sk) ((struct hci_pinfo *) sk) | 722 | #define hci_pi(sk) ((struct hci_pinfo *) sk) |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 6719e9a36613..2c47601b6e63 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
| @@ -120,6 +120,16 @@ struct mgmt_cp_remove_key { | |||
| 120 | __u8 disconnect; | 120 | __u8 disconnect; |
| 121 | } __packed; | 121 | } __packed; |
| 122 | 122 | ||
| 123 | #define MGMT_OP_DISCONNECT 0x000F | ||
| 124 | struct mgmt_cp_disconnect { | ||
| 125 | __le16 index; | ||
| 126 | bdaddr_t bdaddr; | ||
| 127 | } __packed; | ||
| 128 | struct mgmt_rp_disconnect { | ||
| 129 | __le16 index; | ||
| 130 | bdaddr_t bdaddr; | ||
| 131 | } __packed; | ||
| 132 | |||
| 123 | #define MGMT_EV_CMD_COMPLETE 0x0001 | 133 | #define MGMT_EV_CMD_COMPLETE 0x0001 |
| 124 | struct mgmt_ev_cmd_complete { | 134 | struct mgmt_ev_cmd_complete { |
| 125 | __le16 opcode; | 135 | __le16 opcode; |
