Lines Matching refs:ev

2476 	struct hci_ev_conn_complete *ev = (void *) skb->data;  in hci_conn_complete_evt()  local
2483 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_conn_complete_evt()
2485 if (ev->link_type != SCO_LINK) in hci_conn_complete_evt()
2488 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_conn_complete_evt()
2495 if (!ev->status) { in hci_conn_complete_evt()
2496 conn->handle = __le16_to_cpu(ev->handle); in hci_conn_complete_evt()
2503 !hci_find_link_key(hdev, &ev->bdaddr)) in hci_conn_complete_evt()
2522 cp.handle = ev->handle; in hci_conn_complete_evt()
2532 cp.handle = ev->handle; in hci_conn_complete_evt()
2541 conn->dst_type, ev->status); in hci_conn_complete_evt()
2545 hci_sco_setup(conn, ev->status); in hci_conn_complete_evt()
2547 if (ev->status) { in hci_conn_complete_evt()
2548 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2550 } else if (ev->link_type != ACL_LINK) in hci_conn_complete_evt()
2551 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2570 struct hci_ev_conn_request *ev = (void *) skb->data; in hci_conn_request_evt() local
2576 BT_DBG("%s bdaddr %pMR type 0x%x", hdev->name, &ev->bdaddr, in hci_conn_request_evt()
2577 ev->link_type); in hci_conn_request_evt()
2579 mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type, in hci_conn_request_evt()
2583 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2587 if (hci_bdaddr_list_lookup(&hdev->blacklist, &ev->bdaddr, in hci_conn_request_evt()
2589 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2599 !hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr, in hci_conn_request_evt()
2601 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2609 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_conn_request_evt()
2611 memcpy(ie->data.dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2613 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, in hci_conn_request_evt()
2614 &ev->bdaddr); in hci_conn_request_evt()
2616 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_request_evt()
2625 memcpy(conn->dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2629 if (ev->link_type == ACL_LINK || in hci_conn_request_evt()
2634 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2646 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2681 struct hci_ev_disconn_complete *ev = (void *) skb->data; in hci_disconn_complete_evt() local
2688 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_complete_evt()
2692 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_disconn_complete_evt()
2696 if (ev->status) { in hci_disconn_complete_evt()
2698 conn->dst_type, ev->status); in hci_disconn_complete_evt()
2709 reason = hci_to_mgmt_reason(ev->reason); in hci_disconn_complete_evt()
2725 if (ev->reason != HCI_ERROR_CONNECTION_TIMEOUT) in hci_disconn_complete_evt()
2743 hci_disconn_cfm(conn, ev->reason); in hci_disconn_complete_evt()
2765 struct hci_ev_auth_complete *ev = (void *) skb->data; in hci_auth_complete_evt() local
2768 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_auth_complete_evt()
2772 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_auth_complete_evt()
2776 if (!ev->status) { in hci_auth_complete_evt()
2787 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_auth_complete_evt()
2790 mgmt_auth_failed(conn, ev->status); in hci_auth_complete_evt()
2797 if (!ev->status && hci_conn_ssp_enabled(conn)) { in hci_auth_complete_evt()
2799 cp.handle = ev->handle; in hci_auth_complete_evt()
2805 hci_connect_cfm(conn, ev->status); in hci_auth_complete_evt()
2809 hci_auth_cfm(conn, ev->status); in hci_auth_complete_evt()
2817 if (!ev->status) { in hci_auth_complete_evt()
2819 cp.handle = ev->handle; in hci_auth_complete_evt()
2825 hci_encrypt_cfm(conn, ev->status, 0x00); in hci_auth_complete_evt()
2835 struct hci_ev_remote_name *ev = (void *) skb->data; in hci_remote_name_evt() local
2844 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_name_evt()
2849 if (ev->status == 0) in hci_remote_name_evt()
2850 hci_check_pending_name(hdev, conn, &ev->bdaddr, ev->name, in hci_remote_name_evt()
2851 strnlen(ev->name, HCI_MAX_NAME_LENGTH)); in hci_remote_name_evt()
2853 hci_check_pending_name(hdev, conn, &ev->bdaddr, NULL, 0); in hci_remote_name_evt()
2933 struct hci_ev_encrypt_change *ev = (void *) skb->data; in hci_encrypt_change_evt() local
2936 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_encrypt_change_evt()
2940 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_encrypt_change_evt()
2944 if (!ev->status) { in hci_encrypt_change_evt()
2945 if (ev->encrypt) { in hci_encrypt_change_evt()
2955 if ((conn->type == ACL_LINK && ev->encrypt == 0x02) || in hci_encrypt_change_evt()
2967 if (ev->status && conn->type == LE_LINK) { in hci_encrypt_change_evt()
2974 if (ev->status && conn->state == BT_CONNECTED) { in hci_encrypt_change_evt()
2975 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_encrypt_change_evt()
2996 if (!ev->status && ev->encrypt && conn->type == ACL_LINK) { in hci_encrypt_change_evt()
3044 if (!ev->status) in hci_encrypt_change_evt()
3047 hci_connect_cfm(conn, ev->status); in hci_encrypt_change_evt()
3050 hci_encrypt_cfm(conn, ev->status, ev->encrypt); in hci_encrypt_change_evt()
3059 struct hci_ev_change_link_key_complete *ev = (void *) skb->data; in hci_change_link_key_complete_evt() local
3062 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_change_link_key_complete_evt()
3066 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_change_link_key_complete_evt()
3068 if (!ev->status) in hci_change_link_key_complete_evt()
3073 hci_key_change_cfm(conn, ev->status); in hci_change_link_key_complete_evt()
3082 struct hci_ev_remote_features *ev = (void *) skb->data; in hci_remote_features_evt() local
3085 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_remote_features_evt()
3089 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_features_evt()
3093 if (!ev->status) in hci_remote_features_evt()
3094 memcpy(conn->features[0], ev->features, 8); in hci_remote_features_evt()
3099 if (!ev->status && lmp_ext_feat_capable(hdev) && in hci_remote_features_evt()
3102 cp.handle = ev->handle; in hci_remote_features_evt()
3109 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_features_evt()
3120 hci_connect_cfm(conn, ev->status); in hci_remote_features_evt()
3133 struct hci_ev_cmd_complete *ev = (void *) skb->data; in hci_cmd_complete_evt() local
3135 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_complete_evt()
3136 *status = skb->data[sizeof(*ev)]; in hci_cmd_complete_evt()
3138 skb_pull(skb, sizeof(*ev)); in hci_cmd_complete_evt()
3473 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_complete_evt()
3494 struct hci_ev_cmd_status *ev = (void *) skb->data; in hci_cmd_status_evt() local
3496 skb_pull(skb, sizeof(*ev)); in hci_cmd_status_evt()
3498 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_status_evt()
3499 *status = ev->status; in hci_cmd_status_evt()
3503 hci_cs_inquiry(hdev, ev->status); in hci_cmd_status_evt()
3507 hci_cs_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3511 hci_cs_disconnect(hdev, ev->status); in hci_cmd_status_evt()
3515 hci_cs_add_sco(hdev, ev->status); in hci_cmd_status_evt()
3519 hci_cs_auth_requested(hdev, ev->status); in hci_cmd_status_evt()
3523 hci_cs_set_conn_encrypt(hdev, ev->status); in hci_cmd_status_evt()
3527 hci_cs_remote_name_req(hdev, ev->status); in hci_cmd_status_evt()
3531 hci_cs_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3535 hci_cs_read_remote_ext_features(hdev, ev->status); in hci_cmd_status_evt()
3539 hci_cs_setup_sync_conn(hdev, ev->status); in hci_cmd_status_evt()
3543 hci_cs_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3547 hci_cs_exit_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3551 hci_cs_switch_role(hdev, ev->status); in hci_cmd_status_evt()
3555 hci_cs_le_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3559 hci_cs_le_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3563 hci_cs_le_start_enc(hdev, ev->status); in hci_cmd_status_evt()
3567 hci_cs_le_ext_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3578 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_status_evt()
3587 if (ev->status || in hci_cmd_status_evt()
3589 hci_req_cmd_complete(hdev, *opcode, ev->status, req_complete, in hci_cmd_status_evt()
3604 struct hci_ev_hardware_error *ev = (void *) skb->data; in hci_hardware_error_evt() local
3606 hdev->hw_error_code = ev->code; in hci_hardware_error_evt()
3613 struct hci_ev_role_change *ev = (void *) skb->data; in hci_role_change_evt() local
3616 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_role_change_evt()
3620 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_role_change_evt()
3622 if (!ev->status) in hci_role_change_evt()
3623 conn->role = ev->role; in hci_role_change_evt()
3627 hci_role_switch_cfm(conn, ev->status, ev->role); in hci_role_change_evt()
3635 struct hci_ev_num_comp_pkts *ev = (void *) skb->data; in hci_num_comp_pkts_evt() local
3643 if (skb->len < sizeof(*ev) || in hci_num_comp_pkts_evt()
3644 skb->len < struct_size(ev, handles, ev->num_hndl)) { in hci_num_comp_pkts_evt()
3649 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl); in hci_num_comp_pkts_evt()
3651 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_pkts_evt()
3652 struct hci_comp_pkts_info *info = &ev->handles[i]; in hci_num_comp_pkts_evt()
3723 struct hci_ev_num_comp_blocks *ev = (void *) skb->data; in hci_num_comp_blocks_evt() local
3731 if (skb->len < sizeof(*ev) || in hci_num_comp_blocks_evt()
3732 skb->len < struct_size(ev, handles, ev->num_hndl)) { in hci_num_comp_blocks_evt()
3737 BT_DBG("%s num_blocks %d num_hndl %d", hdev->name, ev->num_blocks, in hci_num_comp_blocks_evt()
3738 ev->num_hndl); in hci_num_comp_blocks_evt()
3740 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_blocks_evt()
3741 struct hci_comp_blocks_info *info = &ev->handles[i]; in hci_num_comp_blocks_evt()
3774 struct hci_ev_mode_change *ev = (void *) skb->data; in hci_mode_change_evt() local
3777 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_mode_change_evt()
3781 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_mode_change_evt()
3783 conn->mode = ev->mode; in hci_mode_change_evt()
3794 hci_sco_setup(conn, ev->status); in hci_mode_change_evt()
3802 struct hci_ev_pin_code_req *ev = (void *) skb->data; in hci_pin_code_request_evt() local
3809 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_pin_code_request_evt()
3822 sizeof(ev->bdaddr), &ev->bdaddr); in hci_pin_code_request_evt()
3831 mgmt_pin_code_request(hdev, &ev->bdaddr, secure); in hci_pin_code_request_evt()
3872 struct hci_ev_link_key_req *ev = (void *) skb->data; in hci_link_key_request_evt() local
3884 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_link_key_request_evt()
3887 &ev->bdaddr); in hci_link_key_request_evt()
3892 &ev->bdaddr); in hci_link_key_request_evt()
3894 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_request_evt()
3916 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_link_key_request_evt()
3926 hci_send_cmd(hdev, HCI_OP_LINK_KEY_NEG_REPLY, 6, &ev->bdaddr); in hci_link_key_request_evt()
3932 struct hci_ev_link_key_notify *ev = (void *) skb->data; in hci_link_key_notify_evt() local
3942 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_notify_evt()
3951 conn_set_key(conn, ev->key_type, conn->pin_length); in hci_link_key_notify_evt()
3956 key = hci_add_link_key(hdev, conn, &ev->bdaddr, ev->link_key, in hci_link_key_notify_evt()
3957 ev->key_type, pin_len, &persistent); in hci_link_key_notify_evt()
3964 if (ev->key_type == HCI_LK_CHANGED_COMBINATION) in hci_link_key_notify_evt()
3992 struct hci_ev_clock_offset *ev = (void *) skb->data; in hci_clock_offset_evt() local
3995 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_clock_offset_evt()
3999 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_clock_offset_evt()
4000 if (conn && !ev->status) { in hci_clock_offset_evt()
4005 ie->data.clock_offset = ev->clock_offset; in hci_clock_offset_evt()
4015 struct hci_ev_pkt_type_change *ev = (void *) skb->data; in hci_pkt_type_change_evt() local
4018 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_pkt_type_change_evt()
4022 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_pkt_type_change_evt()
4023 if (conn && !ev->status) in hci_pkt_type_change_evt()
4024 conn->pkt_type = __le16_to_cpu(ev->pkt_type); in hci_pkt_type_change_evt()
4031 struct hci_ev_pscan_rep_mode *ev = (void *) skb->data; in hci_pscan_rep_mode_evt() local
4038 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_pscan_rep_mode_evt()
4040 ie->data.pscan_rep_mode = ev->pscan_rep_mode; in hci_pscan_rep_mode_evt()
4114 struct hci_ev_remote_ext_features *ev = (void *) skb->data; in hci_remote_ext_features_evt() local
4121 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_ext_features_evt()
4125 if (ev->page < HCI_MAX_PAGES) in hci_remote_ext_features_evt()
4126 memcpy(conn->features[ev->page], ev->features, 8); in hci_remote_ext_features_evt()
4128 if (!ev->status && ev->page == 0x01) { in hci_remote_ext_features_evt()
4133 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_ext_features_evt()
4135 if (ev->features[0] & LMP_HOST_SSP) { in hci_remote_ext_features_evt()
4149 if (ev->features[0] & LMP_HOST_SC) in hci_remote_ext_features_evt()
4156 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_ext_features_evt()
4167 hci_connect_cfm(conn, ev->status); in hci_remote_ext_features_evt()
4178 struct hci_ev_sync_conn_complete *ev = (void *) skb->data; in hci_sync_conn_complete_evt() local
4181 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_sync_conn_complete_evt()
4185 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_sync_conn_complete_evt()
4187 if (ev->link_type == ESCO_LINK) in hci_sync_conn_complete_evt()
4199 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_sync_conn_complete_evt()
4204 switch (ev->status) { in hci_sync_conn_complete_evt()
4206 conn->handle = __le16_to_cpu(ev->handle); in hci_sync_conn_complete_evt()
4208 conn->type = ev->link_type; in hci_sync_conn_complete_evt()
4234 hci_connect_cfm(conn, ev->status); in hci_sync_conn_complete_evt()
4235 if (ev->status) in hci_sync_conn_complete_evt()
4312 struct hci_ev_key_refresh_complete *ev = (void *) skb->data; in hci_key_refresh_complete_evt() local
4315 BT_DBG("%s status 0x%2.2x handle 0x%4.4x", hdev->name, ev->status, in hci_key_refresh_complete_evt()
4316 __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4320 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4330 if (!ev->status) in hci_key_refresh_complete_evt()
4335 if (ev->status && conn->state == BT_CONNECTED) { in hci_key_refresh_complete_evt()
4342 if (!ev->status) in hci_key_refresh_complete_evt()
4345 hci_connect_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4348 hci_auth_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4421 struct hci_ev_io_capa_request *ev = (void *) skb->data; in hci_io_capa_request_evt() local
4428 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_request_evt()
4445 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4477 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4490 struct hci_ev_io_capa_reply *ev = (void *) skb->data; in hci_io_capa_reply_evt() local
4497 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_reply_evt()
4501 conn->remote_cap = ev->capability; in hci_io_capa_reply_evt()
4502 conn->remote_auth = ev->authentication; in hci_io_capa_reply_evt()
4511 struct hci_ev_user_confirm_req *ev = (void *) skb->data; in hci_user_confirm_request_evt() local
4522 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_confirm_request_evt()
4538 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4571 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4576 mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, in hci_user_confirm_request_evt()
4577 le32_to_cpu(ev->passkey), confirm_hint); in hci_user_confirm_request_evt()
4586 struct hci_ev_user_passkey_req *ev = (void *) skb->data; in hci_user_passkey_request_evt() local
4591 mgmt_user_passkey_request(hdev, &ev->bdaddr, ACL_LINK, 0); in hci_user_passkey_request_evt()
4597 struct hci_ev_user_passkey_notify *ev = (void *) skb->data; in hci_user_passkey_notify_evt() local
4602 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_passkey_notify_evt()
4606 conn->passkey_notify = __le32_to_cpu(ev->passkey); in hci_user_passkey_notify_evt()
4617 struct hci_ev_keypress_notify *ev = (void *) skb->data; in hci_keypress_notify_evt() local
4622 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_keypress_notify_evt()
4626 switch (ev->type) { in hci_keypress_notify_evt()
4656 struct hci_ev_simple_pair_complete *ev = (void *) skb->data; in hci_simple_pair_complete_evt() local
4663 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_simple_pair_complete_evt()
4675 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status) in hci_simple_pair_complete_evt()
4676 mgmt_auth_failed(conn, ev->status); in hci_simple_pair_complete_evt()
4687 struct hci_ev_remote_host_features *ev = (void *) skb->data; in hci_remote_host_features_evt() local
4695 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_host_features_evt()
4697 memcpy(conn->features[1], ev->features, 8); in hci_remote_host_features_evt()
4699 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_remote_host_features_evt()
4701 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_host_features_evt()
4709 struct hci_ev_remote_oob_data_request *ev = (void *) skb->data; in hci_remote_oob_data_request_evt() local
4719 data = hci_find_remote_oob_data(hdev, &ev->bdaddr, BDADDR_BREDR); in hci_remote_oob_data_request_evt()
4723 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4732 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4748 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4763 struct hci_ev_channel_selected *ev = (void *)skb->data; in hci_chan_selected_evt() local
4766 BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle); in hci_chan_selected_evt()
4768 skb_pull(skb, sizeof(*ev)); in hci_chan_selected_evt()
4770 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_chan_selected_evt()
4780 struct hci_ev_phy_link_complete *ev = (void *) skb->data; in hci_phy_link_complete_evt() local
4783 BT_DBG("%s handle 0x%2.2x status 0x%2.2x", hdev->name, ev->phy_handle, in hci_phy_link_complete_evt()
4784 ev->status); in hci_phy_link_complete_evt()
4788 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_phy_link_complete_evt()
4794 if (ev->status) { in hci_phy_link_complete_evt()
4819 struct hci_ev_logical_link_complete *ev = (void *) skb->data; in hci_loglink_complete_evt() local
4825 hdev->name, le16_to_cpu(ev->handle), ev->phy_handle, in hci_loglink_complete_evt()
4826 ev->status); in hci_loglink_complete_evt()
4828 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_loglink_complete_evt()
4837 hchan->handle = le16_to_cpu(ev->handle); in hci_loglink_complete_evt()
4858 struct hci_ev_disconn_logical_link_complete *ev = (void *) skb->data; in hci_disconn_loglink_complete_evt() local
4862 le16_to_cpu(ev->handle), ev->status); in hci_disconn_loglink_complete_evt()
4864 if (ev->status) in hci_disconn_loglink_complete_evt()
4869 hchan = hci_chan_lookup_handle(hdev, le16_to_cpu(ev->handle)); in hci_disconn_loglink_complete_evt()
4873 amp_destroy_logical_link(hchan, ev->reason); in hci_disconn_loglink_complete_evt()
4882 struct hci_ev_disconn_phy_link_complete *ev = (void *) skb->data; in hci_disconn_phylink_complete_evt() local
4885 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_phylink_complete_evt()
4887 if (ev->status) in hci_disconn_phylink_complete_evt()
4892 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_disconn_phylink_complete_evt()
5066 struct hci_ev_le_conn_complete *ev = (void *) skb->data; in hci_le_conn_complete_evt() local
5068 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_complete_evt()
5070 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_conn_complete_evt()
5071 ev->role, le16_to_cpu(ev->handle), in hci_le_conn_complete_evt()
5072 le16_to_cpu(ev->interval), in hci_le_conn_complete_evt()
5073 le16_to_cpu(ev->latency), in hci_le_conn_complete_evt()
5074 le16_to_cpu(ev->supervision_timeout)); in hci_le_conn_complete_evt()
5080 struct hci_ev_le_enh_conn_complete *ev = (void *) skb->data; in hci_le_enh_conn_complete_evt() local
5082 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_enh_conn_complete_evt()
5084 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_enh_conn_complete_evt()
5085 ev->role, le16_to_cpu(ev->handle), in hci_le_enh_conn_complete_evt()
5086 le16_to_cpu(ev->interval), in hci_le_enh_conn_complete_evt()
5087 le16_to_cpu(ev->latency), in hci_le_enh_conn_complete_evt()
5088 le16_to_cpu(ev->supervision_timeout)); in hci_le_enh_conn_complete_evt()
5093 struct hci_evt_le_ext_adv_set_term *ev = (void *) skb->data; in hci_le_ext_adv_term_evt() local
5096 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_ext_adv_term_evt()
5098 if (ev->status) in hci_le_ext_adv_term_evt()
5101 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->conn_handle)); in hci_le_ext_adv_term_evt()
5122 struct hci_ev_le_conn_update_complete *ev = (void *) skb->data; in hci_le_conn_update_complete_evt() local
5125 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_update_complete_evt()
5127 if (ev->status) in hci_le_conn_update_complete_evt()
5132 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_conn_update_complete_evt()
5134 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_update_complete_evt()
5135 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_update_complete_evt()
5136 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_update_complete_evt()
5436 struct hci_ev_le_advertising_info *ev = ptr; in hci_le_adv_report_evt() local
5439 if (ev->length <= HCI_MAX_AD_LENGTH) { in hci_le_adv_report_evt()
5440 rssi = ev->data[ev->length]; in hci_le_adv_report_evt()
5441 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_adv_report_evt()
5442 ev->bdaddr_type, NULL, 0, rssi, in hci_le_adv_report_evt()
5443 ev->data, ev->length); in hci_le_adv_report_evt()
5448 ptr += sizeof(*ev) + ev->length + 1; in hci_le_adv_report_evt()
5508 struct hci_ev_le_ext_adv_report *ev = ptr; in hci_le_ext_adv_report_evt() local
5512 evt_type = __le16_to_cpu(ev->evt_type); in hci_le_ext_adv_report_evt()
5515 process_adv_report(hdev, legacy_evt_type, &ev->bdaddr, in hci_le_ext_adv_report_evt()
5516 ev->bdaddr_type, NULL, 0, ev->rssi, in hci_le_ext_adv_report_evt()
5517 ev->data, ev->length); in hci_le_ext_adv_report_evt()
5520 ptr += sizeof(*ev) + ev->length; in hci_le_ext_adv_report_evt()
5529 struct hci_ev_le_remote_feat_complete *ev = (void *)skb->data; in hci_le_remote_feat_complete_evt() local
5532 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_remote_feat_complete_evt()
5536 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_remote_feat_complete_evt()
5538 if (!ev->status) in hci_le_remote_feat_complete_evt()
5539 memcpy(conn->features[0], ev->features, 8); in hci_le_remote_feat_complete_evt()
5554 !conn->out && ev->status == 0x1a) in hci_le_remote_feat_complete_evt()
5557 status = ev->status; in hci_le_remote_feat_complete_evt()
5570 struct hci_ev_le_ltk_req *ev = (void *) skb->data; in hci_le_ltk_request_evt() local
5576 BT_DBG("%s handle 0x%4.4x", hdev->name, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5580 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5590 if (ev->ediv || ev->rand) in hci_le_ltk_request_evt()
5594 if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) in hci_le_ltk_request_evt()
5627 neg.handle = ev->handle; in hci_le_ltk_request_evt()
5647 struct hci_ev_le_remote_conn_param_req *ev = (void *) skb->data; in hci_le_remote_conn_param_req_evt() local
5652 handle = le16_to_cpu(ev->handle); in hci_le_remote_conn_param_req_evt()
5653 min = le16_to_cpu(ev->interval_min); in hci_le_remote_conn_param_req_evt()
5654 max = le16_to_cpu(ev->interval_max); in hci_le_remote_conn_param_req_evt()
5655 latency = le16_to_cpu(ev->latency); in hci_le_remote_conn_param_req_evt()
5656 timeout = le16_to_cpu(ev->timeout); in hci_le_remote_conn_param_req_evt()
5691 cp.handle = ev->handle; in hci_le_remote_conn_param_req_evt()
5692 cp.interval_min = ev->interval_min; in hci_le_remote_conn_param_req_evt()
5693 cp.interval_max = ev->interval_max; in hci_le_remote_conn_param_req_evt()
5694 cp.latency = ev->latency; in hci_le_remote_conn_param_req_evt()
5695 cp.timeout = ev->timeout; in hci_le_remote_conn_param_req_evt()
5711 struct hci_ev_le_direct_adv_info *ev = ptr; in hci_le_direct_adv_report_evt() local
5713 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_direct_adv_report_evt()
5714 ev->bdaddr_type, &ev->direct_addr, in hci_le_direct_adv_report_evt()
5715 ev->direct_addr_type, ev->rssi, NULL, 0); in hci_le_direct_adv_report_evt()
5717 ptr += sizeof(*ev); in hci_le_direct_adv_report_evt()
5778 struct hci_ev_cmd_complete *ev; in hci_get_cmd_complete() local
5810 if (skb->len < sizeof(*ev)) { in hci_get_cmd_complete()
5815 ev = (void *) skb->data; in hci_get_cmd_complete()
5816 skb_pull(skb, sizeof(*ev)); in hci_get_cmd_complete()
5818 if (opcode != __le16_to_cpu(ev->opcode)) { in hci_get_cmd_complete()
5820 __le16_to_cpu(ev->opcode)); in hci_get_cmd_complete()