diff options
author | John W. Linville <linville@tuxdriver.com> | 2014-06-05 14:10:07 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-05 14:10:07 -0400 |
commit | 67be1e4f4b0a512f6af3a7db681ae9b62d31de5e (patch) | |
tree | 690ef67ff6b630344e8fd86c7c84b0d31f468f24 /net/bluetooth/mgmt.c | |
parent | a715c7ddd65a1a3b2839b8ebd759bb2d361f7675 (diff) | |
parent | 8a96f3cd22878fc0bb564a8478a6e17c0b8dca73 (diff) | |
download | linux-stable-67be1e4f4b0a512f6af3a7db681ae9b62d31de5e.tar.gz linux-stable-67be1e4f4b0a512f6af3a7db681ae9b62d31de5e.tar.bz2 linux-stable-67be1e4f4b0a512f6af3a7db681ae9b62d31de5e.zip |
Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 5e9c21a5525f..0fce54412ffd 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -4546,10 +4546,16 @@ static int load_long_term_keys(struct sock *sk, struct hci_dev *hdev, else type = HCI_SMP_LTK_SLAVE; - if (key->type == MGMT_LTK_UNAUTHENTICATED) + switch (key->type) { + case MGMT_LTK_UNAUTHENTICATED: authenticated = 0x00; - else + break; + case MGMT_LTK_AUTHENTICATED: authenticated = 0x01; + break; + default: + continue; + } hci_add_ltk(hdev, &key->addr.bdaddr, addr_type, type, authenticated, key->val, key->enc_size, key->ediv, |