Lines Matching refs:sec_level
634 static __u8 seclevel_to_authreq(__u8 sec_level) in seclevel_to_authreq() argument
636 switch (sec_level) { in seclevel_to_authreq()
1103 else if (hcon->sec_level == BT_SECURITY_FIPS) in smp_notify_keys()
1293 authenticated = hcon->sec_level == BT_SECURITY_HIGH; in smp_distribute_keys()
1339 if (hcon->sec_level > BT_SECURITY_MEDIUM) in smp_distribute_keys()
1734 u8 key_size, auth, sec_level; in smp_cmd_pairing_req() local
1813 sec_level = BT_SECURITY_MEDIUM; in smp_cmd_pairing_req()
1815 sec_level = authreq_to_seclevel(auth); in smp_cmd_pairing_req()
1817 if (sec_level > conn->hcon->pending_sec_level) in smp_cmd_pairing_req()
1818 conn->hcon->pending_sec_level = sec_level; in smp_cmd_pairing_req()
2232 static bool smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level) in smp_ltk_encrypt() argument
2241 if (smp_ltk_sec_level(key) < sec_level) in smp_ltk_encrypt()
2256 bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level, in smp_sufficient_security() argument
2259 if (sec_level == BT_SECURITY_LOW) in smp_sufficient_security()
2273 if (hcon->sec_level >= sec_level) in smp_sufficient_security()
2286 u8 sec_level, auth; in smp_cmd_security_req() local
2302 sec_level = BT_SECURITY_MEDIUM; in smp_cmd_security_req()
2304 sec_level = authreq_to_seclevel(auth); in smp_cmd_security_req()
2306 if (smp_sufficient_security(hcon, sec_level, SMP_USE_LTK)) { in smp_cmd_security_req()
2311 smp_ltk_encrypt(conn, hcon->sec_level); in smp_cmd_security_req()
2315 if (sec_level > hcon->pending_sec_level) in smp_cmd_security_req()
2316 hcon->pending_sec_level = sec_level; in smp_cmd_security_req()
2343 int smp_conn_security(struct hci_conn *hcon, __u8 sec_level) in smp_conn_security() argument
2351 BT_DBG("conn %p hcon %p level 0x%2.2x", conn, hcon, sec_level); in smp_conn_security()
2360 if (smp_sufficient_security(hcon, sec_level, SMP_USE_LTK)) in smp_conn_security()
2363 if (sec_level > hcon->pending_sec_level) in smp_conn_security()
2364 hcon->pending_sec_level = sec_level; in smp_conn_security()
2390 authreq = seclevel_to_authreq(sec_level); in smp_conn_security()
2535 authenticated = (hcon->sec_level == BT_SECURITY_HIGH); in smp_cmd_master_ident()
2663 if (conn->hcon->sec_level > BT_SECURITY_MEDIUM) in smp_cmd_sign_info()