Lines Matching refs:sec_level
644 static __u8 seclevel_to_authreq(__u8 sec_level) in seclevel_to_authreq() argument
646 switch (sec_level) { in seclevel_to_authreq()
1102 else if (hcon->sec_level == BT_SECURITY_FIPS) in smp_notify_keys()
1292 authenticated = hcon->sec_level == BT_SECURITY_HIGH; in smp_distribute_keys()
1338 if (hcon->sec_level > BT_SECURITY_MEDIUM) in smp_distribute_keys()
1733 u8 key_size, auth, sec_level; in smp_cmd_pairing_req() local
1812 sec_level = BT_SECURITY_MEDIUM; in smp_cmd_pairing_req()
1814 sec_level = authreq_to_seclevel(auth); in smp_cmd_pairing_req()
1816 if (sec_level > conn->hcon->pending_sec_level) in smp_cmd_pairing_req()
1817 conn->hcon->pending_sec_level = sec_level; in smp_cmd_pairing_req()
2207 static bool smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level) in smp_ltk_encrypt() argument
2216 if (smp_ltk_sec_level(key) < sec_level) in smp_ltk_encrypt()
2231 bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level, in smp_sufficient_security() argument
2234 if (sec_level == BT_SECURITY_LOW) in smp_sufficient_security()
2248 if (hcon->sec_level >= sec_level) in smp_sufficient_security()
2261 u8 sec_level, auth; in smp_cmd_security_req() local
2277 sec_level = BT_SECURITY_MEDIUM; in smp_cmd_security_req()
2279 sec_level = authreq_to_seclevel(auth); in smp_cmd_security_req()
2281 if (smp_sufficient_security(hcon, sec_level, SMP_USE_LTK)) { in smp_cmd_security_req()
2286 smp_ltk_encrypt(conn, hcon->sec_level); in smp_cmd_security_req()
2290 if (sec_level > hcon->pending_sec_level) in smp_cmd_security_req()
2291 hcon->pending_sec_level = sec_level; in smp_cmd_security_req()
2318 int smp_conn_security(struct hci_conn *hcon, __u8 sec_level) in smp_conn_security() argument
2326 BT_DBG("conn %p hcon %p level 0x%2.2x", conn, hcon, sec_level); in smp_conn_security()
2335 if (smp_sufficient_security(hcon, sec_level, SMP_USE_LTK)) in smp_conn_security()
2338 if (sec_level > hcon->pending_sec_level) in smp_conn_security()
2339 hcon->pending_sec_level = sec_level; in smp_conn_security()
2365 authreq = seclevel_to_authreq(sec_level); in smp_conn_security()
2496 authenticated = (hcon->sec_level == BT_SECURITY_HIGH); in smp_cmd_master_ident()
2615 if (conn->hcon->sec_level > BT_SECURITY_MEDIUM) in smp_cmd_sign_info()