diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2011-01-22 06:09:08 +0200 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-08 01:40:07 -0200 |
commit | 17d5c04cb597418a177c3ca18dfde679636dd51c (patch) | |
tree | 8f852ff43fe8a4da609a47a9f6e331d289a64a8c /net/bluetooth/hci_event.c | |
parent | 8962ee74be48df16027100f657b2b12e8ef3d34d (diff) | |
download | op-kernel-dev-17d5c04cb597418a177c3ca18dfde679636dd51c.zip op-kernel-dev-17d5c04cb597418a177c3ca18dfde679636dd51c.tar.gz |
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 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 335c60b..995ae6c 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -1166,8 +1166,11 @@ static inline void hci_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *s hci_send_cmd(hdev, HCI_OP_CHANGE_CONN_PTYPE, sizeof(cp), &cp); } - } else + } else { conn->state = BT_CLOSED; + if (conn->type == ACL_LINK) + mgmt_connect_failed(hdev->id, &ev->bdaddr, ev->status); + } if (conn->type == ACL_LINK) hci_sco_setup(conn, ev->status); |