aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/smp.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-02-28 11:10:03 -0500
committerMarcel Holtmann <marcel@holtmann.org>2014-02-28 11:17:46 -0500
commite3098be40bbde0fdd5fcfa6bf28491db421d333a (patch)
tree343f1e8eb406a28036c57a4a0317ac0e4930be71 /net/bluetooth/smp.h
parent38ccdc93326f61b84734028e586ed522a53b733a (diff)
Bluetooth: Delay LTK encryption to let remote receive all keys
Some devices may refuse to re-encrypt with the LTK if they haven't received all our keys yet. This patch adds a 250ms delay before attempting re-encryption with the LTK. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/smp.h')
-rw-r--r--net/bluetooth/smp.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/smp.h b/net/bluetooth/smp.h
index 676395f93702..f55d83617218 100644
--- a/net/bluetooth/smp.h
+++ b/net/bluetooth/smp.h
@@ -121,6 +121,8 @@ struct smp_cmd_security_req {
121#define SMP_FLAG_LTK_ENCRYPT 4 121#define SMP_FLAG_LTK_ENCRYPT 4
122#define SMP_FLAG_COMPLETE 5 122#define SMP_FLAG_COMPLETE 5
123 123
124#define SMP_REENCRYPT_TIMEOUT msecs_to_jiffies(250)
125
124struct smp_chan { 126struct smp_chan {
125 struct l2cap_conn *conn; 127 struct l2cap_conn *conn;
126 u8 preq[7]; /* SMP Pairing Request */ 128 u8 preq[7]; /* SMP Pairing Request */
@@ -140,6 +142,7 @@ struct smp_chan {
140 unsigned long smp_flags; 142 unsigned long smp_flags;
141 struct work_struct confirm; 143 struct work_struct confirm;
142 struct work_struct random; 144 struct work_struct random;
145 struct delayed_work reencrypt;
143}; 146};
144 147
145/* SMP Commands */ 148/* SMP Commands */