Lines Matching refs:ev

2392 	struct hci_ev_conn_complete *ev = (void *) skb->data;  in hci_conn_complete_evt()  local
2399 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_conn_complete_evt()
2401 if (ev->link_type != SCO_LINK) in hci_conn_complete_evt()
2404 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_conn_complete_evt()
2411 if (!ev->status) { in hci_conn_complete_evt()
2412 conn->handle = __le16_to_cpu(ev->handle); in hci_conn_complete_evt()
2419 !hci_find_link_key(hdev, &ev->bdaddr)) in hci_conn_complete_evt()
2438 cp.handle = ev->handle; in hci_conn_complete_evt()
2448 cp.handle = ev->handle; in hci_conn_complete_evt()
2457 conn->dst_type, ev->status); in hci_conn_complete_evt()
2461 hci_sco_setup(conn, ev->status); in hci_conn_complete_evt()
2463 if (ev->status) { in hci_conn_complete_evt()
2464 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2466 } else if (ev->link_type != ACL_LINK) in hci_conn_complete_evt()
2467 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2486 struct hci_ev_conn_request *ev = (void *) skb->data; in hci_conn_request_evt() local
2492 BT_DBG("%s bdaddr %pMR type 0x%x", hdev->name, &ev->bdaddr, in hci_conn_request_evt()
2493 ev->link_type); in hci_conn_request_evt()
2495 mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type, in hci_conn_request_evt()
2499 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2503 if (hci_bdaddr_list_lookup(&hdev->blacklist, &ev->bdaddr, in hci_conn_request_evt()
2505 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2515 !hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr, in hci_conn_request_evt()
2517 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2525 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_conn_request_evt()
2527 memcpy(ie->data.dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2529 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, in hci_conn_request_evt()
2530 &ev->bdaddr); in hci_conn_request_evt()
2532 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_request_evt()
2541 memcpy(conn->dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2545 if (ev->link_type == ACL_LINK || in hci_conn_request_evt()
2550 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2562 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2597 struct hci_ev_disconn_complete *ev = (void *) skb->data; in hci_disconn_complete_evt() local
2604 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_complete_evt()
2608 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_disconn_complete_evt()
2612 if (ev->status) { in hci_disconn_complete_evt()
2614 conn->dst_type, ev->status); in hci_disconn_complete_evt()
2625 reason = hci_to_mgmt_reason(ev->reason); in hci_disconn_complete_evt()
2641 if (ev->reason != HCI_ERROR_CONNECTION_TIMEOUT) in hci_disconn_complete_evt()
2659 hci_disconn_cfm(conn, ev->reason); in hci_disconn_complete_evt()
2681 struct hci_ev_auth_complete *ev = (void *) skb->data; in hci_auth_complete_evt() local
2684 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_auth_complete_evt()
2688 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_auth_complete_evt()
2692 if (!ev->status) { in hci_auth_complete_evt()
2703 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_auth_complete_evt()
2706 mgmt_auth_failed(conn, ev->status); in hci_auth_complete_evt()
2713 if (!ev->status && hci_conn_ssp_enabled(conn)) { in hci_auth_complete_evt()
2715 cp.handle = ev->handle; in hci_auth_complete_evt()
2721 hci_connect_cfm(conn, ev->status); in hci_auth_complete_evt()
2725 hci_auth_cfm(conn, ev->status); in hci_auth_complete_evt()
2733 if (!ev->status) { in hci_auth_complete_evt()
2735 cp.handle = ev->handle; in hci_auth_complete_evt()
2741 hci_encrypt_cfm(conn, ev->status, 0x00); in hci_auth_complete_evt()
2751 struct hci_ev_remote_name *ev = (void *) skb->data; in hci_remote_name_evt() local
2760 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_name_evt()
2765 if (ev->status == 0) in hci_remote_name_evt()
2766 hci_check_pending_name(hdev, conn, &ev->bdaddr, ev->name, in hci_remote_name_evt()
2767 strnlen(ev->name, HCI_MAX_NAME_LENGTH)); in hci_remote_name_evt()
2769 hci_check_pending_name(hdev, conn, &ev->bdaddr, NULL, 0); in hci_remote_name_evt()
2849 struct hci_ev_encrypt_change *ev = (void *) skb->data; in hci_encrypt_change_evt() local
2852 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_encrypt_change_evt()
2856 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_encrypt_change_evt()
2860 if (!ev->status) { in hci_encrypt_change_evt()
2861 if (ev->encrypt) { in hci_encrypt_change_evt()
2871 if ((conn->type == ACL_LINK && ev->encrypt == 0x02) || in hci_encrypt_change_evt()
2883 if (ev->status && conn->type == LE_LINK) { in hci_encrypt_change_evt()
2890 if (ev->status && conn->state == BT_CONNECTED) { in hci_encrypt_change_evt()
2891 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_encrypt_change_evt()
2912 if (!ev->status && ev->encrypt && conn->type == ACL_LINK) { in hci_encrypt_change_evt()
2941 if (!ev->status) in hci_encrypt_change_evt()
2944 hci_connect_cfm(conn, ev->status); in hci_encrypt_change_evt()
2947 hci_encrypt_cfm(conn, ev->status, ev->encrypt); in hci_encrypt_change_evt()
2956 struct hci_ev_change_link_key_complete *ev = (void *) skb->data; in hci_change_link_key_complete_evt() local
2959 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_change_link_key_complete_evt()
2963 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_change_link_key_complete_evt()
2965 if (!ev->status) in hci_change_link_key_complete_evt()
2970 hci_key_change_cfm(conn, ev->status); in hci_change_link_key_complete_evt()
2979 struct hci_ev_remote_features *ev = (void *) skb->data; in hci_remote_features_evt() local
2982 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_remote_features_evt()
2986 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_features_evt()
2990 if (!ev->status) in hci_remote_features_evt()
2991 memcpy(conn->features[0], ev->features, 8); in hci_remote_features_evt()
2996 if (!ev->status && lmp_ext_feat_capable(hdev) && in hci_remote_features_evt()
2999 cp.handle = ev->handle; in hci_remote_features_evt()
3006 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_features_evt()
3017 hci_connect_cfm(conn, ev->status); in hci_remote_features_evt()
3030 struct hci_ev_cmd_complete *ev = (void *) skb->data; in hci_cmd_complete_evt() local
3032 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_complete_evt()
3033 *status = skb->data[sizeof(*ev)]; in hci_cmd_complete_evt()
3035 skb_pull(skb, sizeof(*ev)); in hci_cmd_complete_evt()
3354 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_complete_evt()
3369 struct hci_ev_cmd_status *ev = (void *) skb->data; in hci_cmd_status_evt() local
3371 skb_pull(skb, sizeof(*ev)); in hci_cmd_status_evt()
3373 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_status_evt()
3374 *status = ev->status; in hci_cmd_status_evt()
3378 hci_cs_inquiry(hdev, ev->status); in hci_cmd_status_evt()
3382 hci_cs_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3386 hci_cs_disconnect(hdev, ev->status); in hci_cmd_status_evt()
3390 hci_cs_add_sco(hdev, ev->status); in hci_cmd_status_evt()
3394 hci_cs_auth_requested(hdev, ev->status); in hci_cmd_status_evt()
3398 hci_cs_set_conn_encrypt(hdev, ev->status); in hci_cmd_status_evt()
3402 hci_cs_remote_name_req(hdev, ev->status); in hci_cmd_status_evt()
3406 hci_cs_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3410 hci_cs_read_remote_ext_features(hdev, ev->status); in hci_cmd_status_evt()
3414 hci_cs_setup_sync_conn(hdev, ev->status); in hci_cmd_status_evt()
3418 hci_cs_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3422 hci_cs_exit_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3426 hci_cs_switch_role(hdev, ev->status); in hci_cmd_status_evt()
3430 hci_cs_le_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3434 hci_cs_le_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3438 hci_cs_le_start_enc(hdev, ev->status); in hci_cmd_status_evt()
3442 hci_cs_le_ext_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3453 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_status_evt()
3462 if (ev->status || in hci_cmd_status_evt()
3464 hci_req_cmd_complete(hdev, *opcode, ev->status, req_complete, in hci_cmd_status_evt()
3473 struct hci_ev_hardware_error *ev = (void *) skb->data; in hci_hardware_error_evt() local
3475 hdev->hw_error_code = ev->code; in hci_hardware_error_evt()
3482 struct hci_ev_role_change *ev = (void *) skb->data; in hci_role_change_evt() local
3485 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_role_change_evt()
3489 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_role_change_evt()
3491 if (!ev->status) in hci_role_change_evt()
3492 conn->role = ev->role; in hci_role_change_evt()
3496 hci_role_switch_cfm(conn, ev->status, ev->role); in hci_role_change_evt()
3504 struct hci_ev_num_comp_pkts *ev = (void *) skb->data; in hci_num_comp_pkts_evt() local
3512 if (skb->len < sizeof(*ev) || skb->len < sizeof(*ev) + in hci_num_comp_pkts_evt()
3513 ev->num_hndl * sizeof(struct hci_comp_pkts_info)) { in hci_num_comp_pkts_evt()
3518 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl); in hci_num_comp_pkts_evt()
3520 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_pkts_evt()
3521 struct hci_comp_pkts_info *info = &ev->handles[i]; in hci_num_comp_pkts_evt()
3592 struct hci_ev_num_comp_blocks *ev = (void *) skb->data; in hci_num_comp_blocks_evt() local
3600 if (skb->len < sizeof(*ev) || skb->len < sizeof(*ev) + in hci_num_comp_blocks_evt()
3601 ev->num_hndl * sizeof(struct hci_comp_blocks_info)) { in hci_num_comp_blocks_evt()
3606 BT_DBG("%s num_blocks %d num_hndl %d", hdev->name, ev->num_blocks, in hci_num_comp_blocks_evt()
3607 ev->num_hndl); in hci_num_comp_blocks_evt()
3609 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_blocks_evt()
3610 struct hci_comp_blocks_info *info = &ev->handles[i]; in hci_num_comp_blocks_evt()
3643 struct hci_ev_mode_change *ev = (void *) skb->data; in hci_mode_change_evt() local
3646 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_mode_change_evt()
3650 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_mode_change_evt()
3652 conn->mode = ev->mode; in hci_mode_change_evt()
3663 hci_sco_setup(conn, ev->status); in hci_mode_change_evt()
3671 struct hci_ev_pin_code_req *ev = (void *) skb->data; in hci_pin_code_request_evt() local
3678 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_pin_code_request_evt()
3691 sizeof(ev->bdaddr), &ev->bdaddr); in hci_pin_code_request_evt()
3700 mgmt_pin_code_request(hdev, &ev->bdaddr, secure); in hci_pin_code_request_evt()
3741 struct hci_ev_link_key_req *ev = (void *) skb->data; in hci_link_key_request_evt() local
3753 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_link_key_request_evt()
3756 &ev->bdaddr); in hci_link_key_request_evt()
3761 &ev->bdaddr); in hci_link_key_request_evt()
3763 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_request_evt()
3785 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_link_key_request_evt()
3795 hci_send_cmd(hdev, HCI_OP_LINK_KEY_NEG_REPLY, 6, &ev->bdaddr); in hci_link_key_request_evt()
3801 struct hci_ev_link_key_notify *ev = (void *) skb->data; in hci_link_key_notify_evt() local
3811 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_notify_evt()
3820 conn_set_key(conn, ev->key_type, conn->pin_length); in hci_link_key_notify_evt()
3825 key = hci_add_link_key(hdev, conn, &ev->bdaddr, ev->link_key, in hci_link_key_notify_evt()
3826 ev->key_type, pin_len, &persistent); in hci_link_key_notify_evt()
3833 if (ev->key_type == HCI_LK_CHANGED_COMBINATION) in hci_link_key_notify_evt()
3861 struct hci_ev_clock_offset *ev = (void *) skb->data; in hci_clock_offset_evt() local
3864 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_clock_offset_evt()
3868 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_clock_offset_evt()
3869 if (conn && !ev->status) { in hci_clock_offset_evt()
3874 ie->data.clock_offset = ev->clock_offset; in hci_clock_offset_evt()
3884 struct hci_ev_pkt_type_change *ev = (void *) skb->data; in hci_pkt_type_change_evt() local
3887 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_pkt_type_change_evt()
3891 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_pkt_type_change_evt()
3892 if (conn && !ev->status) in hci_pkt_type_change_evt()
3893 conn->pkt_type = __le16_to_cpu(ev->pkt_type); in hci_pkt_type_change_evt()
3900 struct hci_ev_pscan_rep_mode *ev = (void *) skb->data; in hci_pscan_rep_mode_evt() local
3907 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_pscan_rep_mode_evt()
3909 ie->data.pscan_rep_mode = ev->pscan_rep_mode; in hci_pscan_rep_mode_evt()
3983 struct hci_ev_remote_ext_features *ev = (void *) skb->data; in hci_remote_ext_features_evt() local
3990 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_ext_features_evt()
3994 if (ev->page < HCI_MAX_PAGES) in hci_remote_ext_features_evt()
3995 memcpy(conn->features[ev->page], ev->features, 8); in hci_remote_ext_features_evt()
3997 if (!ev->status && ev->page == 0x01) { in hci_remote_ext_features_evt()
4002 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_ext_features_evt()
4004 if (ev->features[0] & LMP_HOST_SSP) { in hci_remote_ext_features_evt()
4018 if (ev->features[0] & LMP_HOST_SC) in hci_remote_ext_features_evt()
4025 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_ext_features_evt()
4036 hci_connect_cfm(conn, ev->status); in hci_remote_ext_features_evt()
4047 struct hci_ev_sync_conn_complete *ev = (void *) skb->data; in hci_sync_conn_complete_evt() local
4050 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_sync_conn_complete_evt()
4054 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_sync_conn_complete_evt()
4056 if (ev->link_type == ESCO_LINK) in hci_sync_conn_complete_evt()
4068 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_sync_conn_complete_evt()
4073 switch (ev->status) { in hci_sync_conn_complete_evt()
4075 conn->handle = __le16_to_cpu(ev->handle); in hci_sync_conn_complete_evt()
4077 conn->type = ev->link_type; in hci_sync_conn_complete_evt()
4103 hci_connect_cfm(conn, ev->status); in hci_sync_conn_complete_evt()
4104 if (ev->status) in hci_sync_conn_complete_evt()
4181 struct hci_ev_key_refresh_complete *ev = (void *) skb->data; in hci_key_refresh_complete_evt() local
4184 BT_DBG("%s status 0x%2.2x handle 0x%4.4x", hdev->name, ev->status, in hci_key_refresh_complete_evt()
4185 __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4189 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4199 if (!ev->status) in hci_key_refresh_complete_evt()
4204 if (ev->status && conn->state == BT_CONNECTED) { in hci_key_refresh_complete_evt()
4211 if (!ev->status) in hci_key_refresh_complete_evt()
4214 hci_connect_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4217 hci_auth_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4290 struct hci_ev_io_capa_request *ev = (void *) skb->data; in hci_io_capa_request_evt() local
4297 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_request_evt()
4314 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4346 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4359 struct hci_ev_io_capa_reply *ev = (void *) skb->data; in hci_io_capa_reply_evt() local
4366 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_reply_evt()
4370 conn->remote_cap = ev->capability; in hci_io_capa_reply_evt()
4371 conn->remote_auth = ev->authentication; in hci_io_capa_reply_evt()
4380 struct hci_ev_user_confirm_req *ev = (void *) skb->data; in hci_user_confirm_request_evt() local
4391 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_confirm_request_evt()
4407 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4440 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4445 mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, in hci_user_confirm_request_evt()
4446 le32_to_cpu(ev->passkey), confirm_hint); in hci_user_confirm_request_evt()
4455 struct hci_ev_user_passkey_req *ev = (void *) skb->data; in hci_user_passkey_request_evt() local
4460 mgmt_user_passkey_request(hdev, &ev->bdaddr, ACL_LINK, 0); in hci_user_passkey_request_evt()
4466 struct hci_ev_user_passkey_notify *ev = (void *) skb->data; in hci_user_passkey_notify_evt() local
4471 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_passkey_notify_evt()
4475 conn->passkey_notify = __le32_to_cpu(ev->passkey); in hci_user_passkey_notify_evt()
4486 struct hci_ev_keypress_notify *ev = (void *) skb->data; in hci_keypress_notify_evt() local
4491 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_keypress_notify_evt()
4495 switch (ev->type) { in hci_keypress_notify_evt()
4525 struct hci_ev_simple_pair_complete *ev = (void *) skb->data; in hci_simple_pair_complete_evt() local
4532 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_simple_pair_complete_evt()
4544 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status) in hci_simple_pair_complete_evt()
4545 mgmt_auth_failed(conn, ev->status); in hci_simple_pair_complete_evt()
4556 struct hci_ev_remote_host_features *ev = (void *) skb->data; in hci_remote_host_features_evt() local
4564 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_host_features_evt()
4566 memcpy(conn->features[1], ev->features, 8); in hci_remote_host_features_evt()
4568 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_remote_host_features_evt()
4570 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_host_features_evt()
4578 struct hci_ev_remote_oob_data_request *ev = (void *) skb->data; in hci_remote_oob_data_request_evt() local
4588 data = hci_find_remote_oob_data(hdev, &ev->bdaddr, BDADDR_BREDR); in hci_remote_oob_data_request_evt()
4592 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4601 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4617 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4632 struct hci_ev_channel_selected *ev = (void *)skb->data; in hci_chan_selected_evt() local
4635 BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle); in hci_chan_selected_evt()
4637 skb_pull(skb, sizeof(*ev)); in hci_chan_selected_evt()
4639 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_chan_selected_evt()
4649 struct hci_ev_phy_link_complete *ev = (void *) skb->data; in hci_phy_link_complete_evt() local
4652 BT_DBG("%s handle 0x%2.2x status 0x%2.2x", hdev->name, ev->phy_handle, in hci_phy_link_complete_evt()
4653 ev->status); in hci_phy_link_complete_evt()
4657 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_phy_link_complete_evt()
4663 if (ev->status) { in hci_phy_link_complete_evt()
4688 struct hci_ev_logical_link_complete *ev = (void *) skb->data; in hci_loglink_complete_evt() local
4694 hdev->name, le16_to_cpu(ev->handle), ev->phy_handle, in hci_loglink_complete_evt()
4695 ev->status); in hci_loglink_complete_evt()
4697 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_loglink_complete_evt()
4706 hchan->handle = le16_to_cpu(ev->handle); in hci_loglink_complete_evt()
4727 struct hci_ev_disconn_logical_link_complete *ev = (void *) skb->data; in hci_disconn_loglink_complete_evt() local
4731 le16_to_cpu(ev->handle), ev->status); in hci_disconn_loglink_complete_evt()
4733 if (ev->status) in hci_disconn_loglink_complete_evt()
4738 hchan = hci_chan_lookup_handle(hdev, le16_to_cpu(ev->handle)); in hci_disconn_loglink_complete_evt()
4742 amp_destroy_logical_link(hchan, ev->reason); in hci_disconn_loglink_complete_evt()
4751 struct hci_ev_disconn_phy_link_complete *ev = (void *) skb->data; in hci_disconn_phylink_complete_evt() local
4754 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_phylink_complete_evt()
4756 if (ev->status) in hci_disconn_phylink_complete_evt()
4761 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_disconn_phylink_complete_evt()
4939 struct hci_ev_le_conn_complete *ev = (void *) skb->data; in hci_le_conn_complete_evt() local
4941 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_complete_evt()
4943 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_conn_complete_evt()
4944 ev->role, le16_to_cpu(ev->handle), in hci_le_conn_complete_evt()
4945 le16_to_cpu(ev->interval), in hci_le_conn_complete_evt()
4946 le16_to_cpu(ev->latency), in hci_le_conn_complete_evt()
4947 le16_to_cpu(ev->supervision_timeout)); in hci_le_conn_complete_evt()
4953 struct hci_ev_le_enh_conn_complete *ev = (void *) skb->data; in hci_le_enh_conn_complete_evt() local
4955 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_enh_conn_complete_evt()
4957 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_enh_conn_complete_evt()
4958 ev->role, le16_to_cpu(ev->handle), in hci_le_enh_conn_complete_evt()
4959 le16_to_cpu(ev->interval), in hci_le_enh_conn_complete_evt()
4960 le16_to_cpu(ev->latency), in hci_le_enh_conn_complete_evt()
4961 le16_to_cpu(ev->supervision_timeout)); in hci_le_enh_conn_complete_evt()
4966 struct hci_evt_le_ext_adv_set_term *ev = (void *) skb->data; in hci_le_ext_adv_term_evt() local
4969 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_ext_adv_term_evt()
4971 if (ev->status) in hci_le_ext_adv_term_evt()
4974 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->conn_handle)); in hci_le_ext_adv_term_evt()
4995 struct hci_ev_le_conn_update_complete *ev = (void *) skb->data; in hci_le_conn_update_complete_evt() local
4998 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_update_complete_evt()
5000 if (ev->status) in hci_le_conn_update_complete_evt()
5005 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_conn_update_complete_evt()
5007 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_update_complete_evt()
5008 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_update_complete_evt()
5009 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_update_complete_evt()
5309 struct hci_ev_le_advertising_info *ev = ptr; in hci_le_adv_report_evt() local
5312 if (ev->length <= HCI_MAX_AD_LENGTH) { in hci_le_adv_report_evt()
5313 rssi = ev->data[ev->length]; in hci_le_adv_report_evt()
5314 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_adv_report_evt()
5315 ev->bdaddr_type, NULL, 0, rssi, in hci_le_adv_report_evt()
5316 ev->data, ev->length); in hci_le_adv_report_evt()
5321 ptr += sizeof(*ev) + ev->length + 1; in hci_le_adv_report_evt()
5381 struct hci_ev_le_ext_adv_report *ev = ptr; in hci_le_ext_adv_report_evt() local
5385 evt_type = __le16_to_cpu(ev->evt_type); in hci_le_ext_adv_report_evt()
5388 process_adv_report(hdev, legacy_evt_type, &ev->bdaddr, in hci_le_ext_adv_report_evt()
5389 ev->bdaddr_type, NULL, 0, ev->rssi, in hci_le_ext_adv_report_evt()
5390 ev->data, ev->length); in hci_le_ext_adv_report_evt()
5393 ptr += sizeof(*ev) + ev->length + 1; in hci_le_ext_adv_report_evt()
5402 struct hci_ev_le_remote_feat_complete *ev = (void *)skb->data; in hci_le_remote_feat_complete_evt() local
5405 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_remote_feat_complete_evt()
5409 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_remote_feat_complete_evt()
5411 if (!ev->status) in hci_le_remote_feat_complete_evt()
5412 memcpy(conn->features[0], ev->features, 8); in hci_le_remote_feat_complete_evt()
5427 !conn->out && ev->status == 0x1a) in hci_le_remote_feat_complete_evt()
5430 status = ev->status; in hci_le_remote_feat_complete_evt()
5443 struct hci_ev_le_ltk_req *ev = (void *) skb->data; in hci_le_ltk_request_evt() local
5449 BT_DBG("%s handle 0x%4.4x", hdev->name, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5453 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5463 if (ev->ediv || ev->rand) in hci_le_ltk_request_evt()
5467 if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) in hci_le_ltk_request_evt()
5500 neg.handle = ev->handle; in hci_le_ltk_request_evt()
5520 struct hci_ev_le_remote_conn_param_req *ev = (void *) skb->data; in hci_le_remote_conn_param_req_evt() local
5525 handle = le16_to_cpu(ev->handle); in hci_le_remote_conn_param_req_evt()
5526 min = le16_to_cpu(ev->interval_min); in hci_le_remote_conn_param_req_evt()
5527 max = le16_to_cpu(ev->interval_max); in hci_le_remote_conn_param_req_evt()
5528 latency = le16_to_cpu(ev->latency); in hci_le_remote_conn_param_req_evt()
5529 timeout = le16_to_cpu(ev->timeout); in hci_le_remote_conn_param_req_evt()
5564 cp.handle = ev->handle; in hci_le_remote_conn_param_req_evt()
5565 cp.interval_min = ev->interval_min; in hci_le_remote_conn_param_req_evt()
5566 cp.interval_max = ev->interval_max; in hci_le_remote_conn_param_req_evt()
5567 cp.latency = ev->latency; in hci_le_remote_conn_param_req_evt()
5568 cp.timeout = ev->timeout; in hci_le_remote_conn_param_req_evt()
5584 struct hci_ev_le_direct_adv_info *ev = ptr; in hci_le_direct_adv_report_evt() local
5586 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_direct_adv_report_evt()
5587 ev->bdaddr_type, &ev->direct_addr, in hci_le_direct_adv_report_evt()
5588 ev->direct_addr_type, ev->rssi, NULL, 0); in hci_le_direct_adv_report_evt()
5590 ptr += sizeof(*ev); in hci_le_direct_adv_report_evt()
5651 struct hci_ev_cmd_complete *ev; in hci_get_cmd_complete() local
5677 if (skb->len < sizeof(*ev)) { in hci_get_cmd_complete()
5682 ev = (void *) skb->data; in hci_get_cmd_complete()
5683 skb_pull(skb, sizeof(*ev)); in hci_get_cmd_complete()
5685 if (opcode != __le16_to_cpu(ev->opcode)) { in hci_get_cmd_complete()
5687 __le16_to_cpu(ev->opcode)); in hci_get_cmd_complete()