Lines Matching refs:hcon

598 	bt_dev_dbg(conn->hcon->hdev, "code 0x%2.2x", code);  in smp_send_cmd()
652 struct hci_conn *hcon = conn->hcon; in build_pairing_cmd() local
653 struct hci_dev *hdev = hcon->hdev; in build_pairing_cmd()
680 if (hcon->dst_type == ADDR_LE_DEV_PUBLIC) in build_pairing_cmd()
685 oob_data = hci_find_remote_oob_data(hdev, &hcon->dst, in build_pairing_cmd()
701 req->io_capability = conn->hcon->io_capability; in build_pairing_cmd()
712 rsp->io_capability = conn->hcon->io_capability; in build_pairing_cmd()
725 struct hci_dev *hdev = conn->hcon->hdev; in check_enc_key_size()
728 if (conn->hcon->pending_sec_level == BT_SECURITY_FIPS && in check_enc_key_size()
745 struct hci_conn *hcon = conn->hcon; in smp_chan_destroy() local
753 mgmt_smp_complete(hcon, complete); in smp_chan_destroy()
766 !hci_dev_test_flag(hcon->hdev, HCI_KEEP_DEBUG_KEYS)) { in smp_chan_destroy()
792 hci_conn_drop(hcon); in smp_chan_destroy()
797 struct hci_conn *hcon = conn->hcon; in smp_failure() local
804 mgmt_auth_failed(hcon, HCI_ERROR_AUTH_FAILURE); in smp_failure()
852 struct hci_conn *hcon = conn->hcon; in tk_request() local
862 bt_dev_dbg(hcon->hdev, "auth:%u lcl:%u rem:%u", auth, local_io, in tk_request()
883 hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT) in tk_request()
889 ret = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, in tk_request()
890 hcon->type, in tk_request()
891 hcon->dst_type, in tk_request()
908 if (hcon->pending_sec_level < BT_SECURITY_HIGH) in tk_request()
909 hcon->pending_sec_level = BT_SECURITY_HIGH; in tk_request()
916 if (hcon->role == HCI_ROLE_MASTER) in tk_request()
928 bt_dev_dbg(hcon->hdev, "PassKey: %u", passkey); in tk_request()
933 ret = mgmt_user_passkey_request(hcon->hdev, &hcon->dst, in tk_request()
934 hcon->type, hcon->dst_type); in tk_request()
936 ret = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, in tk_request()
937 hcon->type, hcon->dst_type, in tk_request()
940 ret = mgmt_user_passkey_notify(hcon->hdev, &hcon->dst, in tk_request()
941 hcon->type, hcon->dst_type, in tk_request()
953 bt_dev_dbg(conn->hcon->hdev, "conn %p", conn); in smp_confirm()
956 conn->hcon->init_addr_type, &conn->hcon->init_addr, in smp_confirm()
957 conn->hcon->resp_addr_type, &conn->hcon->resp_addr, in smp_confirm()
966 if (conn->hcon->out) in smp_confirm()
977 struct hci_conn *hcon = conn->hcon; in smp_random() local
981 bt_dev_dbg(conn->hcon->hdev, "conn %p %s", conn, in smp_random()
982 conn->hcon->out ? "initiator" : "responder"); in smp_random()
985 hcon->init_addr_type, &hcon->init_addr, in smp_random()
986 hcon->resp_addr_type, &hcon->resp_addr, confirm); in smp_random()
991 bt_dev_err(hcon->hdev, "pairing failed " in smp_random()
996 if (hcon->out) { in smp_random()
1003 if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags)) in smp_random()
1006 hci_le_start_enc(hcon, ediv, rand, stk, smp->enc_key_size); in smp_random()
1007 hcon->enc_key_size = smp->enc_key_size; in smp_random()
1008 set_bit(HCI_CONN_STK_ENCRYPT, &hcon->flags); in smp_random()
1019 if (hcon->pending_sec_level == BT_SECURITY_HIGH) in smp_random()
1028 hci_add_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, in smp_random()
1039 struct hci_conn *hcon = conn->hcon; in smp_notify_keys() local
1040 struct hci_dev *hdev = hcon->hdev; in smp_notify_keys()
1045 if (hcon->type == ACL_LINK) { in smp_notify_keys()
1046 if (hcon->key_type == HCI_LK_DEBUG_COMBINATION) in smp_notify_keys()
1050 &hcon->flags); in smp_notify_keys()
1067 if (hcon->type == LE_LINK) { in smp_notify_keys()
1068 bacpy(&hcon->dst, &smp->remote_irk->bdaddr); in smp_notify_keys()
1069 hcon->dst_type = smp->remote_irk->addr_type; in smp_notify_keys()
1075 smp->csrk->bdaddr_type = hcon->dst_type; in smp_notify_keys()
1076 bacpy(&smp->csrk->bdaddr, &hcon->dst); in smp_notify_keys()
1081 smp->responder_csrk->bdaddr_type = hcon->dst_type; in smp_notify_keys()
1082 bacpy(&smp->responder_csrk->bdaddr, &hcon->dst); in smp_notify_keys()
1087 smp->ltk->bdaddr_type = hcon->dst_type; in smp_notify_keys()
1088 bacpy(&smp->ltk->bdaddr, &hcon->dst); in smp_notify_keys()
1093 smp->responder_ltk->bdaddr_type = hcon->dst_type; in smp_notify_keys()
1094 bacpy(&smp->responder_ltk->bdaddr, &hcon->dst); in smp_notify_keys()
1104 else if (hcon->sec_level == BT_SECURITY_FIPS) in smp_notify_keys()
1109 key = hci_add_link_key(hdev, smp->conn->hcon, &hcon->dst, in smp_notify_keys()
1128 struct hci_conn *hcon = smp->conn->hcon; in sc_add_ltk() local
1136 if (hcon->pending_sec_level == BT_SECURITY_FIPS) in sc_add_ltk()
1141 smp->ltk = hci_add_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, in sc_add_ltk()
1200 struct hci_conn *hcon = smp->conn->hcon; in sc_generate_ltk() local
1201 struct hci_dev *hdev = hcon->hdev; in sc_generate_ltk()
1204 key = hci_find_link_key(hdev, &hcon->dst); in sc_generate_ltk()
1237 struct hci_conn *hcon = conn->hcon; in smp_distribute_keys() local
1238 struct hci_dev *hdev = hcon->hdev; in smp_distribute_keys()
1246 if (hcon->out && (smp->remote_key_dist & KEY_DIST_MASK)) { in smp_distribute_keys()
1253 if (hcon->out) { in smp_distribute_keys()
1262 if (hcon->type == LE_LINK && (*keydist & SMP_DIST_LINK_KEY)) in smp_distribute_keys()
1264 if (hcon->type == ACL_LINK && (*keydist & SMP_DIST_ENC_KEY)) in smp_distribute_keys()
1294 authenticated = hcon->sec_level == BT_SECURITY_HIGH; in smp_distribute_keys()
1295 ltk = hci_add_ltk(hdev, &hcon->dst, hcon->dst_type, in smp_distribute_keys()
1323 bacpy(&addrinfo.bdaddr, &hcon->src); in smp_distribute_keys()
1324 addrinfo.addr_type = hcon->src_type; in smp_distribute_keys()
1341 if (hcon->sec_level > BT_SECURITY_MEDIUM) in smp_distribute_keys()
1372 bt_dev_dbg(conn->hcon->hdev, "conn %p", conn); in smp_timeout()
1374 hci_disconnect(conn->hcon, HCI_ERROR_REMOTE_USER_TERM); in smp_timeout()
1379 struct hci_conn *hcon = conn->hcon; in smp_chan_create() local
1389 bt_dev_err(hcon->hdev, "Unable to create CMAC crypto context"); in smp_chan_create()
1395 bt_dev_err(hcon->hdev, "Unable to create ECDH crypto context"); in smp_chan_create()
1406 hci_conn_hold(hcon); in smp_chan_create()
1419 struct hci_conn *hcon = smp->conn->hcon; in sc_mackey_and_ltk() local
1422 if (hcon->out) { in sc_mackey_and_ltk()
1430 memcpy(a, &hcon->init_addr, 6); in sc_mackey_and_ltk()
1431 memcpy(b, &hcon->resp_addr, 6); in sc_mackey_and_ltk()
1432 a[6] = hcon->init_addr_type; in sc_mackey_and_ltk()
1433 b[6] = hcon->resp_addr_type; in sc_mackey_and_ltk()
1440 struct hci_conn *hcon = smp->conn->hcon; in sc_dhkey_check() local
1445 memcpy(a, &hcon->init_addr, 6); in sc_dhkey_check()
1446 memcpy(b, &hcon->resp_addr, 6); in sc_dhkey_check()
1447 a[6] = hcon->init_addr_type; in sc_dhkey_check()
1448 b[6] = hcon->resp_addr_type; in sc_dhkey_check()
1450 if (hcon->out) { in sc_dhkey_check()
1463 put_unaligned_le32(hcon->passkey_notify, r); in sc_dhkey_check()
1477 struct hci_conn *hcon = conn->hcon; in sc_passkey_send_confirm() local
1481 r = ((hcon->passkey_notify >> smp->passkey_round) & 0x01); in sc_passkey_send_confirm()
1498 struct hci_conn *hcon = conn->hcon; in sc_passkey_round() local
1499 struct hci_dev *hdev = hcon->hdev; in sc_passkey_round()
1508 r = ((hcon->passkey_notify >> smp->passkey_round) & 0x01); in sc_passkey_round()
1529 if (!hcon->out) { in sc_passkey_round()
1557 if (hcon->out) { in sc_passkey_round()
1568 if (!hcon->out) in sc_passkey_round()
1585 struct hci_conn *hcon = conn->hcon; in sc_user_reply() local
1598 hcon->passkey_notify = le32_to_cpu(passkey); in sc_user_reply()
1613 if (hcon->out) { in sc_user_reply()
1624 int smp_user_confirm_reply(struct hci_conn *hcon, u16 mgmt_op, __le32 passkey) in smp_user_confirm_reply() argument
1626 struct l2cap_conn *conn = hcon->l2cap_data; in smp_user_confirm_reply()
1635 bt_dev_dbg(conn->hcon->hdev, ""); in smp_user_confirm_reply()
1658 bt_dev_dbg(conn->hcon->hdev, "PassKey: %u", value); in smp_user_confirm_reply()
1694 struct hci_dev *hdev = conn->hcon->hdev; in build_bredr_pairing_cmd()
1714 req->max_key_size = conn->hcon->enc_key_size; in build_bredr_pairing_cmd()
1724 rsp->max_key_size = conn->hcon->enc_key_size; in build_bredr_pairing_cmd()
1735 struct hci_dev *hdev = conn->hcon->hdev; in smp_cmd_pairing_req()
1745 if (conn->hcon->role != HCI_ROLE_SLAVE) in smp_cmd_pairing_req()
1778 if (conn->hcon->type == ACL_LINK) { in smp_cmd_pairing_req()
1780 if (!test_bit(HCI_CONN_AES_CCM, &conn->hcon->flags) && in smp_cmd_pairing_req()
1815 if (conn->hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT) in smp_cmd_pairing_req()
1820 if (sec_level > conn->hcon->pending_sec_level) in smp_cmd_pairing_req()
1821 conn->hcon->pending_sec_level = sec_level; in smp_cmd_pairing_req()
1824 if (conn->hcon->pending_sec_level >= BT_SECURITY_HIGH) { in smp_cmd_pairing_req()
1827 method = get_auth_method(smp, conn->hcon->io_capability, in smp_cmd_pairing_req()
1871 struct hci_dev *hdev = smp->conn->hcon->hdev; in sc_send_public_key()
1927 struct hci_dev *hdev = conn->hcon->hdev; in smp_cmd_pairing_rsp()
1936 if (conn->hcon->role != HCI_ROLE_MASTER) in smp_cmd_pairing_rsp()
1971 if (conn->hcon->type == ACL_LINK) { in smp_cmd_pairing_rsp()
1980 else if (conn->hcon->pending_sec_level > BT_SECURITY_HIGH) in smp_cmd_pairing_rsp()
1981 conn->hcon->pending_sec_level = BT_SECURITY_HIGH; in smp_cmd_pairing_rsp()
1984 if (conn->hcon->pending_sec_level >= BT_SECURITY_HIGH) { in smp_cmd_pairing_rsp()
2026 bt_dev_dbg(conn->hcon->hdev, ""); in sc_check_confirm()
2031 if (conn->hcon->out) { in sc_check_confirm()
2047 struct hci_conn *hcon = conn->hcon; in fixup_sc_false_positive() local
2048 struct hci_dev *hdev = hcon->hdev; in fixup_sc_false_positive()
2053 if (hcon->out) in fixup_sc_false_positive()
2085 struct hci_conn *hcon = conn->hcon; in smp_cmd_pairing_confirm() local
2086 struct hci_dev *hdev = hcon->hdev; in smp_cmd_pairing_confirm()
2089 hcon->out ? "initiator" : "responder"); in smp_cmd_pairing_confirm()
2111 if (conn->hcon->out) { in smp_cmd_pairing_confirm()
2130 struct hci_conn *hcon = conn->hcon; in smp_cmd_pairing_random() local
2135 bt_dev_dbg(hcon->hdev, "conn %p", conn); in smp_cmd_pairing_random()
2146 if (hcon->out) { in smp_cmd_pairing_random()
2159 if (!hcon->out) in smp_cmd_pairing_random()
2170 if (hcon->out) { in smp_cmd_pairing_random()
2193 if (hci_find_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, in smp_cmd_pairing_random()
2194 hcon->role)) { in smp_cmd_pairing_random()
2211 if (hcon->out) { in smp_cmd_pairing_random()
2228 err = mgmt_user_confirm_request(hcon->hdev, &hcon->dst, hcon->type, in smp_cmd_pairing_random()
2229 hcon->dst_type, passkey, confirm_hint); in smp_cmd_pairing_random()
2241 struct hci_conn *hcon = conn->hcon; in smp_ltk_encrypt() local
2243 key = hci_find_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, hcon->role); in smp_ltk_encrypt()
2250 if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags)) in smp_ltk_encrypt()
2253 hci_le_start_enc(hcon, key->ediv, key->rand, key->val, key->enc_size); in smp_ltk_encrypt()
2254 hcon->enc_key_size = key->enc_size; in smp_ltk_encrypt()
2257 clear_bit(HCI_CONN_STK_ENCRYPT, &hcon->flags); in smp_ltk_encrypt()
2262 bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level, in smp_sufficient_security() argument
2275 test_bit(HCI_CONN_STK_ENCRYPT, &hcon->flags) && in smp_sufficient_security()
2276 hci_find_ltk(hcon->hdev, &hcon->dst, hcon->dst_type, hcon->role)) in smp_sufficient_security()
2279 if (hcon->sec_level >= sec_level) in smp_sufficient_security()
2289 struct hci_conn *hcon = conn->hcon; in smp_cmd_security_req() local
2290 struct hci_dev *hdev = hcon->hdev; in smp_cmd_security_req()
2299 if (hcon->role != HCI_ROLE_MASTER) in smp_cmd_security_req()
2307 if (hcon->io_capability == HCI_IO_NO_INPUT_OUTPUT) in smp_cmd_security_req()
2312 if (smp_sufficient_security(hcon, sec_level, SMP_USE_LTK)) { in smp_cmd_security_req()
2317 smp_ltk_encrypt(conn, hcon->sec_level); in smp_cmd_security_req()
2321 if (sec_level > hcon->pending_sec_level) in smp_cmd_security_req()
2322 hcon->pending_sec_level = sec_level; in smp_cmd_security_req()
2324 if (smp_ltk_encrypt(conn, hcon->pending_sec_level)) in smp_cmd_security_req()
2349 int smp_conn_security(struct hci_conn *hcon, __u8 sec_level) in smp_conn_security() argument
2351 struct l2cap_conn *conn = hcon->l2cap_data; in smp_conn_security()
2357 bt_dev_dbg(hcon->hdev, "conn %p hcon %p level 0x%2.2x", conn, hcon, in smp_conn_security()
2364 if (!hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED)) in smp_conn_security()
2367 if (smp_sufficient_security(hcon, sec_level, SMP_USE_LTK)) in smp_conn_security()
2370 if (sec_level > hcon->pending_sec_level) in smp_conn_security()
2371 hcon->pending_sec_level = sec_level; in smp_conn_security()
2373 if (hcon->role == HCI_ROLE_MASTER) in smp_conn_security()
2374 if (smp_ltk_encrypt(conn, hcon->pending_sec_level)) in smp_conn_security()
2379 bt_dev_err(hcon->hdev, "security requested but not available"); in smp_conn_security()
2399 if (hci_dev_test_flag(hcon->hdev, HCI_SC_ENABLED)) { in smp_conn_security()
2401 if (hci_dev_test_flag(hcon->hdev, HCI_SSP_ENABLED)) in smp_conn_security()
2408 if (!hci_dev_test_flag(hcon->hdev, HCI_FORCE_NO_MITM)) { in smp_conn_security()
2412 if (hcon->io_capability != HCI_IO_NO_INPUT_OUTPUT || in smp_conn_security()
2413 hcon->pending_sec_level > BT_SECURITY_MEDIUM) in smp_conn_security()
2417 if (hcon->role == HCI_ROLE_MASTER) { in smp_conn_security()
2444 struct hci_conn *hcon; in smp_cancel_and_remove_pairing() local
2453 hcon = hci_conn_hash_lookup_le(hdev, bdaddr, addr_type); in smp_cancel_and_remove_pairing()
2454 if (!hcon) in smp_cancel_and_remove_pairing()
2457 conn = hcon->l2cap_data; in smp_cancel_and_remove_pairing()
2494 bt_dev_dbg(conn->hcon->hdev, "conn %p", conn); in smp_cmd_encrypt_info()
2500 if (hci_is_blocked_key(conn->hcon->hdev, HCI_BLOCKED_KEY_TYPE_LTK, in smp_cmd_encrypt_info()
2502 bt_dev_warn_ratelimited(conn->hcon->hdev, in smp_cmd_encrypt_info()
2504 &conn->hcon->dst); in smp_cmd_encrypt_info()
2522 struct hci_dev *hdev = conn->hcon->hdev; in smp_cmd_initiator_ident()
2523 struct hci_conn *hcon = conn->hcon; in smp_cmd_initiator_ident() local
2542 authenticated = (hcon->sec_level == BT_SECURITY_HIGH); in smp_cmd_initiator_ident()
2543 ltk = hci_add_ltk(hdev, &hcon->dst, hcon->dst_type, SMP_LTK, in smp_cmd_initiator_ident()
2559 bt_dev_dbg(conn->hcon->hdev, ""); in smp_cmd_ident_info()
2565 if (hci_is_blocked_key(conn->hcon->hdev, HCI_BLOCKED_KEY_TYPE_IRK, in smp_cmd_ident_info()
2567 bt_dev_warn_ratelimited(conn->hcon->hdev, in smp_cmd_ident_info()
2569 &conn->hcon->dst); in smp_cmd_ident_info()
2588 struct hci_conn *hcon = conn->hcon; in smp_cmd_ident_addr_info() local
2591 bt_dev_dbg(hcon->hdev, ""); in smp_cmd_ident_addr_info()
2616 bt_dev_err(hcon->hdev, "ignoring IRK with no identity address"); in smp_cmd_ident_addr_info()
2625 if (hci_is_identity_address(&hcon->dst, hcon->dst_type) && in smp_cmd_ident_addr_info()
2626 (bacmp(&info->bdaddr, &hcon->dst) || in smp_cmd_ident_addr_info()
2627 info->addr_type != hcon->dst_type)) { in smp_cmd_ident_addr_info()
2628 bt_dev_err(hcon->hdev, in smp_cmd_ident_addr_info()
2636 if (hci_bdaddr_is_rpa(&hcon->dst, hcon->dst_type)) in smp_cmd_ident_addr_info()
2637 bacpy(&rpa, &hcon->dst); in smp_cmd_ident_addr_info()
2641 smp->remote_irk = hci_add_irk(conn->hcon->hdev, &smp->id_addr, in smp_cmd_ident_addr_info()
2658 bt_dev_dbg(conn->hcon->hdev, "conn %p", conn); in smp_cmd_sign_info()
2670 if (conn->hcon->sec_level > BT_SECURITY_MEDIUM) in smp_cmd_sign_info()
2685 struct hci_conn *hcon = conn->hcon; in sc_select_method() local
2698 if (hcon->out) { in sc_select_method()
2730 struct hci_conn *hcon = conn->hcon; in smp_cmd_public_key() local
2733 struct hci_dev *hdev = hcon->hdev; in smp_cmd_public_key()
2767 if (!hcon->out) { in smp_cmd_public_key()
2806 hcon->pending_sec_level = BT_SECURITY_MEDIUM; in smp_cmd_public_key()
2808 hcon->pending_sec_level = BT_SECURITY_FIPS; in smp_cmd_public_key()
2814 get_random_bytes(&hcon->passkey_notify, in smp_cmd_public_key()
2815 sizeof(hcon->passkey_notify)); in smp_cmd_public_key()
2816 hcon->passkey_notify %= 1000000; in smp_cmd_public_key()
2817 hcon->passkey_entered = 0; in smp_cmd_public_key()
2819 if (mgmt_user_passkey_notify(hdev, &hcon->dst, hcon->type, in smp_cmd_public_key()
2820 hcon->dst_type, in smp_cmd_public_key()
2821 hcon->passkey_notify, in smp_cmd_public_key()
2822 hcon->passkey_entered)) in smp_cmd_public_key()
2829 if (hcon->out) in smp_cmd_public_key()
2838 if (hcon->out) in smp_cmd_public_key()
2842 if (mgmt_user_passkey_request(hdev, &hcon->dst, hcon->type, in smp_cmd_public_key()
2843 hcon->dst_type)) in smp_cmd_public_key()
2853 if (conn->hcon->out) in smp_cmd_public_key()
2871 struct hci_conn *hcon = conn->hcon; in smp_cmd_dhkey_check() local
2877 bt_dev_dbg(hcon->hdev, "conn %p", conn); in smp_cmd_dhkey_check()
2882 memcpy(a, &hcon->init_addr, 6); in smp_cmd_dhkey_check()
2883 memcpy(b, &hcon->resp_addr, 6); in smp_cmd_dhkey_check()
2884 a[6] = hcon->init_addr_type; in smp_cmd_dhkey_check()
2885 b[6] = hcon->resp_addr_type; in smp_cmd_dhkey_check()
2887 if (hcon->out) { in smp_cmd_dhkey_check()
2900 put_unaligned_le32(hcon->passkey_notify, r); in smp_cmd_dhkey_check()
2912 if (!hcon->out) { in smp_cmd_dhkey_check()
2924 if (hcon->out) { in smp_cmd_dhkey_check()
2925 hci_le_start_enc(hcon, 0, 0, smp->tk, smp->enc_key_size); in smp_cmd_dhkey_check()
2926 hcon->enc_key_size = smp->enc_key_size; in smp_cmd_dhkey_check()
2937 bt_dev_dbg(conn->hcon->hdev, "value 0x%02x", kp->value); in smp_cmd_keypress_notify()
2945 struct hci_conn *hcon = conn->hcon; in smp_sig_channel() local
2953 if (!hci_dev_test_flag(hcon->hdev, HCI_LE_ENABLED)) { in smp_sig_channel()
3034 bt_dev_dbg(hcon->hdev, "Unknown command code 0x%2.2x", code); in smp_sig_channel()
3049 bt_dev_err(hcon->hdev, "unexpected SMP command 0x%02x from %pMR", in smp_sig_channel()
3050 code, &hcon->dst); in smp_sig_channel()
3059 bt_dev_dbg(conn->hcon->hdev, "chan %p", chan); in smp_teardown_cb()
3071 struct hci_conn *hcon = conn->hcon; in bredr_pairing() local
3072 struct hci_dev *hdev = hcon->hdev; in bredr_pairing()
3079 if (!test_bit(HCI_CONN_NEW_LINK_KEY, &hcon->flags)) in bredr_pairing()
3083 if (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags)) in bredr_pairing()
3087 if (hcon->role != HCI_ROLE_MASTER) in bredr_pairing()
3095 if (!test_bit(HCI_CONN_AES_CCM, &hcon->flags) && in bredr_pairing()
3104 if (!lmp_host_le_capable(hcon)) in bredr_pairing()
3139 struct hci_conn *hcon = conn->hcon; in smp_resume_cb() local
3141 bt_dev_dbg(hcon->hdev, "chan %p", chan); in smp_resume_cb()
3143 if (hcon->type == ACL_LINK) { in smp_resume_cb()
3151 if (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags)) in smp_resume_cb()
3162 struct hci_conn *hcon = conn->hcon; in smp_ready_cb() local
3164 bt_dev_dbg(hcon->hdev, "chan %p", chan); in smp_ready_cb()
3174 if (hcon->type == ACL_LINK && test_bit(HCI_CONN_ENCRYPT, &hcon->flags)) in smp_ready_cb()
3182 bt_dev_dbg(chan->conn->hcon->hdev, "chan %p", chan); in smp_recv_cb()
3191 hci_disconnect(chan->conn->hcon, HCI_ERROR_AUTH_FAILURE); in smp_recv_cb()