diff options
author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2011-06-14 13:37:41 -0300 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:38:48 -0800 |
commit | f663e347086a2b63ac0ab84e4e971ad36640b9a7 (patch) | |
tree | 097971bf70c47e1bd5cac2fa702cc44b52d08f48 /net | |
parent | 18a59ab31904dd5a03f9dcb3e67b103e6167b000 (diff) |
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/smp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 391888b88a92..c45dd737cdde 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -270,6 +270,9 @@ static u8 smp_cmd_pairing_req(struct l2cap_conn *conn, struct sk_buff *skb) mod_timer(&conn->security_timer, jiffies + msecs_to_jiffies(SMP_TIMEOUT)); + mod_timer(&conn->security_timer, jiffies + + msecs_to_jiffies(SMP_TIMEOUT)); + return 0; } |