diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-06-18 14:39:25 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-18 14:39:25 -0400 |
commit | 2ee3f63d39dbebd94b4a77df04455617ce12156b (patch) | |
tree | 55a96da26db65b0649fb4203512f9a10b7a3f4e1 /net/bluetooth/smp.c | |
parent | 62a02c98ce03bb214009509a4802b7b63f59621c (diff) | |
parent | 616a8394b5df8c88f4dd416f4527439a4e365034 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r-- | net/bluetooth/smp.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 3d1cc164557d..f2829a7932e2 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -544,7 +544,7 @@ static u8 smp_random(struct smp_chan *smp) hci_le_start_enc(hcon, ediv, rand, stk); hcon->enc_key_size = smp->enc_key_size; } else { - u8 stk[16]; + u8 stk[16], auth; __le64 rand = 0; __le16 ediv = 0; @@ -556,8 +556,13 @@ static u8 smp_random(struct smp_chan *smp) memset(stk + smp->enc_key_size, 0, SMP_MAX_ENC_KEY_SIZE - smp->enc_key_size); + if (hcon->pending_sec_level == BT_SECURITY_HIGH) + auth = 1; + else + auth = 0; + hci_add_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, - HCI_SMP_STK_SLAVE, 0, stk, smp->enc_key_size, + HCI_SMP_STK_SLAVE, auth, stk, smp->enc_key_size, ediv, rand); } |