|
@@ -889,7 +889,7 @@ static int hci_conn_auth(struct hci_conn *conn, __u8 sec_level, __u8 auth_type)
|
|
/* If we're already encrypted set the REAUTH_PEND flag,
|
|
/* If we're already encrypted set the REAUTH_PEND flag,
|
|
* otherwise set the ENCRYPT_PEND.
|
|
* otherwise set the ENCRYPT_PEND.
|
|
*/
|
|
*/
|
|
- if (conn->key_type != 0xff)
|
|
|
|
|
|
+ if (conn->link_mode & HCI_LM_ENCRYPT)
|
|
set_bit(HCI_CONN_REAUTH_PEND, &conn->flags);
|
|
set_bit(HCI_CONN_REAUTH_PEND, &conn->flags);
|
|
else
|
|
else
|
|
set_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
|
|
set_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
|