aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_conn.c
diff options
context:
space:
mode:
authorWaldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com>2011-05-31 09:49:25 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-06-08 15:58:18 -0400
commit19f8def031bfa50c579149b200bfeeb919727b27 (patch)
tree8f1fded6804d6e5d1537938f29b5e2c6f71e19fe /net/bluetooth/hci_conn.c
parent3581508571b513ed2e66d71f9708d6be907460fd (diff)
Bluetooth: Fix auth_complete_evt for legacy units
Legacy devices don't re-authenticate the link properly if a link key already exists. Thus, don't update sec_level for this case even if hci_auth_complete_evt indicates success. Otherwise the sec_level will not reflect a real security on the link. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_conn.c')
-rw-r--r--net/bluetooth/hci_conn.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index 3163330cd4f..e67540216cd 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -548,6 +548,8 @@ static int hci_conn_auth(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
548 cp.handle = cpu_to_le16(conn->handle); 548 cp.handle = cpu_to_le16(conn->handle);
549 hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED, 549 hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED,
550 sizeof(cp), &cp); 550 sizeof(cp), &cp);
551 if (conn->key_type != 0xff)
552 set_bit(HCI_CONN_REAUTH_PEND, &conn->pend);
551 } 553 }
552 554
553 return 0; 555 return 0;