diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2011-01-21 23:09:08 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-07 22:40:07 -0500 |
commit | 17d5c04cb597418a177c3ca18dfde679636dd51c (patch) | |
tree | 8f852ff43fe8a4da609a47a9f6e331d289a64a8c /include/net/bluetooth | |
parent | 8962ee74be48df16027100f657b2b12e8ef3d34d (diff) |
Bluetooth: Add support for connect failed management event
This patch add a new connect failed management event to track failures
in connecting to remote devices. It is particularly useful for security
mode 3 scenarios when we don't have a connected state while pairing but
still need to detect when the connect attempt failed.
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 | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 2197a099a2b7..45caae62cb8e 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -717,6 +717,7 @@ 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 | int mgmt_disconnect_failed(u16 index); |
720 | int mgmt_connect_failed(u16 index, bdaddr_t *bdaddr, u8 status); | ||
720 | 721 | ||
721 | /* HCI info for socket */ | 722 | /* HCI info for socket */ |
722 | #define hci_pi(sk) ((struct hci_pinfo *) sk) | 723 | #define hci_pi(sk) ((struct hci_pinfo *) sk) |
diff --git a/include/net/bluetooth/mgmt.h b/include/net/bluetooth/mgmt.h index 2c47601b6e63..1d822f2c0f1a 100644 --- a/include/net/bluetooth/mgmt.h +++ b/include/net/bluetooth/mgmt.h | |||
@@ -184,3 +184,10 @@ struct mgmt_ev_disconnected { | |||
184 | __le16 index; | 184 | __le16 index; |
185 | bdaddr_t bdaddr; | 185 | bdaddr_t bdaddr; |
186 | } __packed; | 186 | } __packed; |
187 | |||
188 | #define MGMT_EV_CONNECT_FAILED 0x000D | ||
189 | struct mgmt_ev_connect_failed { | ||
190 | __le16 index; | ||
191 | bdaddr_t bdaddr; | ||
192 | __u8 status; | ||
193 | } __packed; | ||