Bluetooth: Add support for SMP timeout

This patch adds support for disconnecting the link when SMP procedure
takes more than 30 seconds.

SMP begins when either the Pairing Request command is sent or the
Pairing Response is received, and it ends when the link is encrypted
(or terminated). Vol 3, Part H Section 3.4.

Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
This commit is contained in:
Vinicius Costa Gomes
2011-06-14 13:37:41 -03:00
committed by Gustavo F. Padovan
parent 94ac02726c
commit 5d3de7df18
3 changed files with 60 additions and 30 deletions

View File

@@ -401,6 +401,8 @@ struct l2cap_conn {
__u8 pcnf[16]; /* SMP Pairing Confirm */
__u8 tk[16]; /* SMP Temporary Key */
struct timer_list security_timer;
struct list_head chan_l;
rwlock_t chan_lock;
};