aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/smp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 414c5151aa46..35f57090ddd0 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -837,7 +837,7 @@ static u8 smp_cmd_pairing_random(struct l2cap_conn *conn, struct sk_buff *skb)
837 return smp_random(smp); 837 return smp_random(smp);
838} 838}
839 839
840static u8 smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level) 840static bool smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level)
841{ 841{
842 struct smp_ltk *key; 842 struct smp_ltk *key;
843 struct hci_conn *hcon = conn->hcon; 843 struct hci_conn *hcon = conn->hcon;
@@ -845,18 +845,18 @@ static u8 smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level)
845 key = hci_find_ltk_by_addr(hcon->hdev, &hcon->dst, hcon->dst_type, 845 key = hci_find_ltk_by_addr(hcon->hdev, &hcon->dst, hcon->dst_type,
846 hcon->out); 846 hcon->out);
847 if (!key) 847 if (!key)
848 return 0; 848 return false;
849 849
850 if (sec_level > BT_SECURITY_MEDIUM && !key->authenticated) 850 if (sec_level > BT_SECURITY_MEDIUM && !key->authenticated)
851 return 0; 851 return false;
852 852
853 if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags)) 853 if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags))
854 return 1; 854 return true;
855 855
856 hci_le_start_enc(hcon, key->ediv, key->rand, key->val); 856 hci_le_start_enc(hcon, key->ediv, key->rand, key->val);
857 hcon->enc_key_size = key->enc_size; 857 hcon->enc_key_size = key->enc_size;
858 858
859 return 1; 859 return true;
860} 860}
861 861
862static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb) 862static u8 smp_cmd_security_req(struct l2cap_conn *conn, struct sk_buff *skb)