diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2011-02-19 10:06:00 -0500 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-02-21 15:22:44 -0500 |
commit | 2a61169209c72317d4933f8d22f749a6a61a3d36 (patch) | |
tree | d95e0016c704382f2f520ea6f3ac97d5a3b07ae4 /net/bluetooth/mgmt.c | |
parent | ac56fb13c0508181b4227b8ada6d47aaaf72794c (diff) |
Bluetooth: Add mgmt_auth_failed event
To properly track bonding completion an event to indicate authentication
failure is needed. This event will be sent whenever an authentication
complete HCI event with a non-zero status comes. It will also be sent
when we're acting in acceptor role for SSP authentication in which case
the controller will send a Simple Pairing Complete event.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 0d3d613baac2..46e2c39c8956 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -1647,3 +1647,14 @@ int mgmt_user_confirm_neg_reply_complete(u16 index, bdaddr_t *bdaddr, | |||
1647 | return confirm_reply_complete(index, bdaddr, status, | 1647 | return confirm_reply_complete(index, bdaddr, status, |
1648 | MGMT_OP_USER_CONFIRM_NEG_REPLY); | 1648 | MGMT_OP_USER_CONFIRM_NEG_REPLY); |
1649 | } | 1649 | } |
1650 | |||
1651 | int mgmt_auth_failed(u16 index, bdaddr_t *bdaddr, u8 status) | ||
1652 | { | ||
1653 | struct mgmt_ev_auth_failed ev; | ||
1654 | |||
1655 | put_unaligned_le16(index, &ev.index); | ||
1656 | bacpy(&ev.bdaddr, bdaddr); | ||
1657 | ev.status = status; | ||
1658 | |||
1659 | return mgmt_event(MGMT_EV_AUTH_FAILED, &ev, sizeof(ev), NULL); | ||
1660 | } | ||