Lines Matching refs:ev

2571 	struct hci_ev_conn_complete *ev = (void *) skb->data;  in hci_conn_complete_evt()  local
2578 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_conn_complete_evt()
2589 if (ev->link_type == ACL_LINK && in hci_conn_complete_evt()
2591 &ev->bdaddr, in hci_conn_complete_evt()
2593 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_complete_evt()
2600 if (ev->link_type != SCO_LINK) in hci_conn_complete_evt()
2604 &ev->bdaddr); in hci_conn_complete_evt()
2612 if (!ev->status) { in hci_conn_complete_evt()
2613 conn->handle = __le16_to_cpu(ev->handle); in hci_conn_complete_evt()
2620 !hci_find_link_key(hdev, &ev->bdaddr)) in hci_conn_complete_evt()
2639 cp.handle = ev->handle; in hci_conn_complete_evt()
2649 cp.handle = ev->handle; in hci_conn_complete_evt()
2658 conn->dst_type, ev->status); in hci_conn_complete_evt()
2662 hci_sco_setup(conn, ev->status); in hci_conn_complete_evt()
2664 if (ev->status) { in hci_conn_complete_evt()
2665 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2667 } else if (ev->link_type == SCO_LINK) { in hci_conn_complete_evt()
2675 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2695 struct hci_ev_conn_request *ev = (void *) skb->data; in hci_conn_request_evt() local
2701 BT_DBG("%s bdaddr %pMR type 0x%x", hdev->name, &ev->bdaddr, in hci_conn_request_evt()
2702 ev->link_type); in hci_conn_request_evt()
2704 mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type, in hci_conn_request_evt()
2708 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2712 if (hci_bdaddr_list_lookup(&hdev->blacklist, &ev->bdaddr, in hci_conn_request_evt()
2714 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2724 !hci_bdaddr_list_lookup_with_flags(&hdev->whitelist, &ev->bdaddr, in hci_conn_request_evt()
2726 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2734 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_conn_request_evt()
2736 memcpy(ie->data.dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2738 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, in hci_conn_request_evt()
2739 &ev->bdaddr); in hci_conn_request_evt()
2741 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_request_evt()
2750 memcpy(conn->dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2754 if (ev->link_type == ACL_LINK || in hci_conn_request_evt()
2759 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2771 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2806 struct hci_ev_disconn_complete *ev = (void *) skb->data; in hci_disconn_complete_evt() local
2813 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_complete_evt()
2817 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_disconn_complete_evt()
2821 if (ev->status) { in hci_disconn_complete_evt()
2823 conn->dst_type, ev->status); in hci_disconn_complete_evt()
2834 reason = hci_to_mgmt_reason(ev->reason); in hci_disconn_complete_evt()
2850 if (ev->reason != HCI_ERROR_CONNECTION_TIMEOUT) in hci_disconn_complete_evt()
2868 hci_disconn_cfm(conn, ev->reason); in hci_disconn_complete_evt()
2898 struct hci_ev_auth_complete *ev = (void *) skb->data; in hci_auth_complete_evt() local
2901 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_auth_complete_evt()
2905 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_auth_complete_evt()
2909 if (!ev->status) { in hci_auth_complete_evt()
2920 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_auth_complete_evt()
2923 mgmt_auth_failed(conn, ev->status); in hci_auth_complete_evt()
2930 if (!ev->status && hci_conn_ssp_enabled(conn)) { in hci_auth_complete_evt()
2932 cp.handle = ev->handle; in hci_auth_complete_evt()
2938 hci_connect_cfm(conn, ev->status); in hci_auth_complete_evt()
2942 hci_auth_cfm(conn, ev->status); in hci_auth_complete_evt()
2950 if (!ev->status) { in hci_auth_complete_evt()
2952 cp.handle = ev->handle; in hci_auth_complete_evt()
2958 hci_encrypt_cfm(conn, ev->status); in hci_auth_complete_evt()
2968 struct hci_ev_remote_name *ev = (void *) skb->data; in hci_remote_name_evt() local
2977 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_name_evt()
2982 if (ev->status == 0) in hci_remote_name_evt()
2983 hci_check_pending_name(hdev, conn, &ev->bdaddr, ev->name, in hci_remote_name_evt()
2984 strnlen(ev->name, HCI_MAX_NAME_LENGTH)); in hci_remote_name_evt()
2986 hci_check_pending_name(hdev, conn, &ev->bdaddr, NULL, 0); in hci_remote_name_evt()
3051 struct hci_ev_encrypt_change *ev = (void *) skb->data; in hci_encrypt_change_evt() local
3054 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_encrypt_change_evt()
3058 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_encrypt_change_evt()
3062 if (!ev->status) { in hci_encrypt_change_evt()
3063 if (ev->encrypt) { in hci_encrypt_change_evt()
3073 if ((conn->type == ACL_LINK && ev->encrypt == 0x02) || in hci_encrypt_change_evt()
3085 if (ev->status && conn->type == LE_LINK) { in hci_encrypt_change_evt()
3094 ev->status = HCI_ERROR_AUTH_FAILURE; in hci_encrypt_change_evt()
3096 if (ev->status && conn->state == BT_CONNECTED) { in hci_encrypt_change_evt()
3097 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_encrypt_change_evt()
3103 hci_encrypt_cfm(conn, ev->status); in hci_encrypt_change_evt()
3110 if (!ev->status && ev->encrypt && conn->type == ACL_LINK) { in hci_encrypt_change_evt()
3157 hci_encrypt_cfm(conn, ev->status); in hci_encrypt_change_evt()
3166 struct hci_ev_change_link_key_complete *ev = (void *) skb->data; in hci_change_link_key_complete_evt() local
3169 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_change_link_key_complete_evt()
3173 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_change_link_key_complete_evt()
3175 if (!ev->status) in hci_change_link_key_complete_evt()
3180 hci_key_change_cfm(conn, ev->status); in hci_change_link_key_complete_evt()
3189 struct hci_ev_remote_features *ev = (void *) skb->data; in hci_remote_features_evt() local
3192 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_remote_features_evt()
3196 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_features_evt()
3200 if (!ev->status) in hci_remote_features_evt()
3201 memcpy(conn->features[0], ev->features, 8); in hci_remote_features_evt()
3206 if (!ev->status && lmp_ext_feat_capable(hdev) && in hci_remote_features_evt()
3209 cp.handle = ev->handle; in hci_remote_features_evt()
3216 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_features_evt()
3227 hci_connect_cfm(conn, ev->status); in hci_remote_features_evt()
3240 struct hci_ev_cmd_complete *ev = (void *) skb->data; in hci_cmd_complete_evt() local
3242 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_complete_evt()
3243 *status = skb->data[sizeof(*ev)]; in hci_cmd_complete_evt()
3245 skb_pull(skb, sizeof(*ev)); in hci_cmd_complete_evt()
3592 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_complete_evt()
3613 struct hci_ev_cmd_status *ev = (void *) skb->data; in hci_cmd_status_evt() local
3615 skb_pull(skb, sizeof(*ev)); in hci_cmd_status_evt()
3617 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_status_evt()
3618 *status = ev->status; in hci_cmd_status_evt()
3622 hci_cs_inquiry(hdev, ev->status); in hci_cmd_status_evt()
3626 hci_cs_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3630 hci_cs_disconnect(hdev, ev->status); in hci_cmd_status_evt()
3634 hci_cs_add_sco(hdev, ev->status); in hci_cmd_status_evt()
3638 hci_cs_auth_requested(hdev, ev->status); in hci_cmd_status_evt()
3642 hci_cs_set_conn_encrypt(hdev, ev->status); in hci_cmd_status_evt()
3646 hci_cs_remote_name_req(hdev, ev->status); in hci_cmd_status_evt()
3650 hci_cs_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3654 hci_cs_read_remote_ext_features(hdev, ev->status); in hci_cmd_status_evt()
3658 hci_cs_setup_sync_conn(hdev, ev->status); in hci_cmd_status_evt()
3662 hci_cs_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3666 hci_cs_exit_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3670 hci_cs_switch_role(hdev, ev->status); in hci_cmd_status_evt()
3674 hci_cs_le_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3678 hci_cs_le_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3682 hci_cs_le_start_enc(hdev, ev->status); in hci_cmd_status_evt()
3686 hci_cs_le_ext_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3697 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_status_evt()
3706 if (ev->status || in hci_cmd_status_evt()
3708 hci_req_cmd_complete(hdev, *opcode, ev->status, req_complete, in hci_cmd_status_evt()
3723 struct hci_ev_hardware_error *ev = (void *) skb->data; in hci_hardware_error_evt() local
3725 hdev->hw_error_code = ev->code; in hci_hardware_error_evt()
3732 struct hci_ev_role_change *ev = (void *) skb->data; in hci_role_change_evt() local
3735 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_role_change_evt()
3739 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_role_change_evt()
3741 if (!ev->status) in hci_role_change_evt()
3742 conn->role = ev->role; in hci_role_change_evt()
3746 hci_role_switch_cfm(conn, ev->status, ev->role); in hci_role_change_evt()
3754 struct hci_ev_num_comp_pkts *ev = (void *) skb->data; in hci_num_comp_pkts_evt() local
3762 if (skb->len < sizeof(*ev) || in hci_num_comp_pkts_evt()
3763 skb->len < struct_size(ev, handles, ev->num_hndl)) { in hci_num_comp_pkts_evt()
3768 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl); in hci_num_comp_pkts_evt()
3770 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_pkts_evt()
3771 struct hci_comp_pkts_info *info = &ev->handles[i]; in hci_num_comp_pkts_evt()
3842 struct hci_ev_num_comp_blocks *ev = (void *) skb->data; in hci_num_comp_blocks_evt() local
3850 if (skb->len < sizeof(*ev) || in hci_num_comp_blocks_evt()
3851 skb->len < struct_size(ev, handles, ev->num_hndl)) { in hci_num_comp_blocks_evt()
3856 BT_DBG("%s num_blocks %d num_hndl %d", hdev->name, ev->num_blocks, in hci_num_comp_blocks_evt()
3857 ev->num_hndl); in hci_num_comp_blocks_evt()
3859 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_blocks_evt()
3860 struct hci_comp_blocks_info *info = &ev->handles[i]; in hci_num_comp_blocks_evt()
3893 struct hci_ev_mode_change *ev = (void *) skb->data; in hci_mode_change_evt() local
3896 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_mode_change_evt()
3900 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_mode_change_evt()
3902 conn->mode = ev->mode; in hci_mode_change_evt()
3913 hci_sco_setup(conn, ev->status); in hci_mode_change_evt()
3921 struct hci_ev_pin_code_req *ev = (void *) skb->data; in hci_pin_code_request_evt() local
3928 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_pin_code_request_evt()
3941 sizeof(ev->bdaddr), &ev->bdaddr); in hci_pin_code_request_evt()
3950 mgmt_pin_code_request(hdev, &ev->bdaddr, secure); in hci_pin_code_request_evt()
3991 struct hci_ev_link_key_req *ev = (void *) skb->data; in hci_link_key_request_evt() local
4003 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_link_key_request_evt()
4006 &ev->bdaddr); in hci_link_key_request_evt()
4011 &ev->bdaddr); in hci_link_key_request_evt()
4013 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_request_evt()
4035 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_link_key_request_evt()
4045 hci_send_cmd(hdev, HCI_OP_LINK_KEY_NEG_REPLY, 6, &ev->bdaddr); in hci_link_key_request_evt()
4051 struct hci_ev_link_key_notify *ev = (void *) skb->data; in hci_link_key_notify_evt() local
4061 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_notify_evt()
4070 conn_set_key(conn, ev->key_type, conn->pin_length); in hci_link_key_notify_evt()
4075 key = hci_add_link_key(hdev, conn, &ev->bdaddr, ev->link_key, in hci_link_key_notify_evt()
4076 ev->key_type, pin_len, &persistent); in hci_link_key_notify_evt()
4083 if (ev->key_type == HCI_LK_CHANGED_COMBINATION) in hci_link_key_notify_evt()
4111 struct hci_ev_clock_offset *ev = (void *) skb->data; in hci_clock_offset_evt() local
4114 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_clock_offset_evt()
4118 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_clock_offset_evt()
4119 if (conn && !ev->status) { in hci_clock_offset_evt()
4124 ie->data.clock_offset = ev->clock_offset; in hci_clock_offset_evt()
4134 struct hci_ev_pkt_type_change *ev = (void *) skb->data; in hci_pkt_type_change_evt() local
4137 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_pkt_type_change_evt()
4141 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_pkt_type_change_evt()
4142 if (conn && !ev->status) in hci_pkt_type_change_evt()
4143 conn->pkt_type = __le16_to_cpu(ev->pkt_type); in hci_pkt_type_change_evt()
4150 struct hci_ev_pscan_rep_mode *ev = (void *) skb->data; in hci_pscan_rep_mode_evt() local
4157 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_pscan_rep_mode_evt()
4159 ie->data.pscan_rep_mode = ev->pscan_rep_mode; in hci_pscan_rep_mode_evt()
4240 struct hci_ev_remote_ext_features *ev = (void *) skb->data; in hci_remote_ext_features_evt() local
4247 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_ext_features_evt()
4251 if (ev->page < HCI_MAX_PAGES) in hci_remote_ext_features_evt()
4252 memcpy(conn->features[ev->page], ev->features, 8); in hci_remote_ext_features_evt()
4254 if (!ev->status && ev->page == 0x01) { in hci_remote_ext_features_evt()
4259 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_ext_features_evt()
4261 if (ev->features[0] & LMP_HOST_SSP) { in hci_remote_ext_features_evt()
4275 if (ev->features[0] & LMP_HOST_SC) in hci_remote_ext_features_evt()
4282 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_ext_features_evt()
4293 hci_connect_cfm(conn, ev->status); in hci_remote_ext_features_evt()
4304 struct hci_ev_sync_conn_complete *ev = (void *) skb->data; in hci_sync_conn_complete_evt() local
4307 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_sync_conn_complete_evt()
4311 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_sync_conn_complete_evt()
4313 if (ev->link_type == ESCO_LINK) in hci_sync_conn_complete_evt()
4325 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_sync_conn_complete_evt()
4330 switch (ev->status) { in hci_sync_conn_complete_evt()
4332 conn->handle = __le16_to_cpu(ev->handle); in hci_sync_conn_complete_evt()
4334 conn->type = ev->link_type; in hci_sync_conn_complete_evt()
4361 bt_dev_dbg(hdev, "SCO connected with air mode: %02x", ev->air_mode); in hci_sync_conn_complete_evt()
4374 hci_connect_cfm(conn, ev->status); in hci_sync_conn_complete_evt()
4375 if (ev->status) in hci_sync_conn_complete_evt()
4452 struct hci_ev_key_refresh_complete *ev = (void *) skb->data; in hci_key_refresh_complete_evt() local
4455 BT_DBG("%s status 0x%2.2x handle 0x%4.4x", hdev->name, ev->status, in hci_key_refresh_complete_evt()
4456 __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4460 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4470 if (!ev->status) in hci_key_refresh_complete_evt()
4475 if (ev->status && conn->state == BT_CONNECTED) { in hci_key_refresh_complete_evt()
4482 if (!ev->status) in hci_key_refresh_complete_evt()
4485 hci_connect_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4488 hci_auth_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4561 struct hci_ev_io_capa_request *ev = (void *) skb->data; in hci_io_capa_request_evt() local
4568 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_request_evt()
4585 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4617 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4630 struct hci_ev_io_capa_reply *ev = (void *) skb->data; in hci_io_capa_reply_evt() local
4637 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_reply_evt()
4641 conn->remote_cap = ev->capability; in hci_io_capa_reply_evt()
4642 conn->remote_auth = ev->authentication; in hci_io_capa_reply_evt()
4651 struct hci_ev_user_confirm_req *ev = (void *) skb->data; in hci_user_confirm_request_evt() local
4662 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_confirm_request_evt()
4678 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4704 if (hci_find_link_key(hdev, &ev->bdaddr)) { in hci_user_confirm_request_evt()
4721 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4726 mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, in hci_user_confirm_request_evt()
4727 le32_to_cpu(ev->passkey), confirm_hint); in hci_user_confirm_request_evt()
4736 struct hci_ev_user_passkey_req *ev = (void *) skb->data; in hci_user_passkey_request_evt() local
4741 mgmt_user_passkey_request(hdev, &ev->bdaddr, ACL_LINK, 0); in hci_user_passkey_request_evt()
4747 struct hci_ev_user_passkey_notify *ev = (void *) skb->data; in hci_user_passkey_notify_evt() local
4752 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_passkey_notify_evt()
4756 conn->passkey_notify = __le32_to_cpu(ev->passkey); in hci_user_passkey_notify_evt()
4767 struct hci_ev_keypress_notify *ev = (void *) skb->data; in hci_keypress_notify_evt() local
4772 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_keypress_notify_evt()
4776 switch (ev->type) { in hci_keypress_notify_evt()
4806 struct hci_ev_simple_pair_complete *ev = (void *) skb->data; in hci_simple_pair_complete_evt() local
4813 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_simple_pair_complete_evt()
4825 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status) in hci_simple_pair_complete_evt()
4826 mgmt_auth_failed(conn, ev->status); in hci_simple_pair_complete_evt()
4837 struct hci_ev_remote_host_features *ev = (void *) skb->data; in hci_remote_host_features_evt() local
4845 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_host_features_evt()
4847 memcpy(conn->features[1], ev->features, 8); in hci_remote_host_features_evt()
4849 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_remote_host_features_evt()
4851 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_host_features_evt()
4859 struct hci_ev_remote_oob_data_request *ev = (void *) skb->data; in hci_remote_oob_data_request_evt() local
4869 data = hci_find_remote_oob_data(hdev, &ev->bdaddr, BDADDR_BREDR); in hci_remote_oob_data_request_evt()
4873 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4882 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4898 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4913 struct hci_ev_channel_selected *ev = (void *)skb->data; in hci_chan_selected_evt() local
4916 BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle); in hci_chan_selected_evt()
4918 skb_pull(skb, sizeof(*ev)); in hci_chan_selected_evt()
4920 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_chan_selected_evt()
4930 struct hci_ev_phy_link_complete *ev = (void *) skb->data; in hci_phy_link_complete_evt() local
4933 BT_DBG("%s handle 0x%2.2x status 0x%2.2x", hdev->name, ev->phy_handle, in hci_phy_link_complete_evt()
4934 ev->status); in hci_phy_link_complete_evt()
4938 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_phy_link_complete_evt()
4944 if (ev->status) { in hci_phy_link_complete_evt()
4969 struct hci_ev_logical_link_complete *ev = (void *) skb->data; in hci_loglink_complete_evt() local
4975 hdev->name, le16_to_cpu(ev->handle), ev->phy_handle, in hci_loglink_complete_evt()
4976 ev->status); in hci_loglink_complete_evt()
4978 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_loglink_complete_evt()
4987 hchan->handle = le16_to_cpu(ev->handle); in hci_loglink_complete_evt()
5008 struct hci_ev_disconn_logical_link_complete *ev = (void *) skb->data; in hci_disconn_loglink_complete_evt() local
5012 le16_to_cpu(ev->handle), ev->status); in hci_disconn_loglink_complete_evt()
5014 if (ev->status) in hci_disconn_loglink_complete_evt()
5019 hchan = hci_chan_lookup_handle(hdev, le16_to_cpu(ev->handle)); in hci_disconn_loglink_complete_evt()
5023 amp_destroy_logical_link(hchan, ev->reason); in hci_disconn_loglink_complete_evt()
5032 struct hci_ev_disconn_phy_link_complete *ev = (void *) skb->data; in hci_disconn_phylink_complete_evt() local
5035 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_phylink_complete_evt()
5037 if (ev->status) in hci_disconn_phylink_complete_evt()
5042 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_disconn_phylink_complete_evt()
5216 struct hci_ev_le_conn_complete *ev = (void *) skb->data; in hci_le_conn_complete_evt() local
5218 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_complete_evt()
5220 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_conn_complete_evt()
5221 ev->role, le16_to_cpu(ev->handle), in hci_le_conn_complete_evt()
5222 le16_to_cpu(ev->interval), in hci_le_conn_complete_evt()
5223 le16_to_cpu(ev->latency), in hci_le_conn_complete_evt()
5224 le16_to_cpu(ev->supervision_timeout)); in hci_le_conn_complete_evt()
5230 struct hci_ev_le_enh_conn_complete *ev = (void *) skb->data; in hci_le_enh_conn_complete_evt() local
5232 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_enh_conn_complete_evt()
5234 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_enh_conn_complete_evt()
5235 ev->role, le16_to_cpu(ev->handle), in hci_le_enh_conn_complete_evt()
5236 le16_to_cpu(ev->interval), in hci_le_enh_conn_complete_evt()
5237 le16_to_cpu(ev->latency), in hci_le_enh_conn_complete_evt()
5238 le16_to_cpu(ev->supervision_timeout)); in hci_le_enh_conn_complete_evt()
5248 struct hci_evt_le_ext_adv_set_term *ev = (void *) skb->data; in hci_le_ext_adv_term_evt() local
5251 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_ext_adv_term_evt()
5253 if (ev->status) in hci_le_ext_adv_term_evt()
5256 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->conn_handle)); in hci_le_ext_adv_term_evt()
5277 struct hci_ev_le_conn_update_complete *ev = (void *) skb->data; in hci_le_conn_update_complete_evt() local
5280 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_update_complete_evt()
5282 if (ev->status) in hci_le_conn_update_complete_evt()
5287 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_conn_update_complete_evt()
5289 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_update_complete_evt()
5290 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_update_complete_evt()
5291 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_update_complete_evt()
5602 struct hci_ev_le_advertising_info *ev = ptr; in hci_le_adv_report_evt() local
5605 if (ev->length <= HCI_MAX_AD_LENGTH) { in hci_le_adv_report_evt()
5606 rssi = ev->data[ev->length]; in hci_le_adv_report_evt()
5607 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_adv_report_evt()
5608 ev->bdaddr_type, NULL, 0, rssi, in hci_le_adv_report_evt()
5609 ev->data, ev->length, false); in hci_le_adv_report_evt()
5614 ptr += sizeof(*ev) + ev->length + 1; in hci_le_adv_report_evt()
5672 struct hci_ev_le_ext_adv_report *ev = ptr; in hci_le_ext_adv_report_evt() local
5676 evt_type = __le16_to_cpu(ev->evt_type); in hci_le_ext_adv_report_evt()
5679 process_adv_report(hdev, legacy_evt_type, &ev->bdaddr, in hci_le_ext_adv_report_evt()
5680 ev->bdaddr_type, NULL, 0, ev->rssi, in hci_le_ext_adv_report_evt()
5681 ev->data, ev->length, in hci_le_ext_adv_report_evt()
5685 ptr += sizeof(*ev) + ev->length; in hci_le_ext_adv_report_evt()
5694 struct hci_ev_le_remote_feat_complete *ev = (void *)skb->data; in hci_le_remote_feat_complete_evt() local
5697 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_remote_feat_complete_evt()
5701 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_remote_feat_complete_evt()
5703 if (!ev->status) in hci_le_remote_feat_complete_evt()
5704 memcpy(conn->features[0], ev->features, 8); in hci_le_remote_feat_complete_evt()
5719 !conn->out && ev->status == 0x1a) in hci_le_remote_feat_complete_evt()
5722 status = ev->status; in hci_le_remote_feat_complete_evt()
5735 struct hci_ev_le_ltk_req *ev = (void *) skb->data; in hci_le_ltk_request_evt() local
5741 BT_DBG("%s handle 0x%4.4x", hdev->name, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5745 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5755 if (ev->ediv || ev->rand) in hci_le_ltk_request_evt()
5759 if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) in hci_le_ltk_request_evt()
5792 neg.handle = ev->handle; in hci_le_ltk_request_evt()
5812 struct hci_ev_le_remote_conn_param_req *ev = (void *) skb->data; in hci_le_remote_conn_param_req_evt() local
5817 handle = le16_to_cpu(ev->handle); in hci_le_remote_conn_param_req_evt()
5818 min = le16_to_cpu(ev->interval_min); in hci_le_remote_conn_param_req_evt()
5819 max = le16_to_cpu(ev->interval_max); in hci_le_remote_conn_param_req_evt()
5820 latency = le16_to_cpu(ev->latency); in hci_le_remote_conn_param_req_evt()
5821 timeout = le16_to_cpu(ev->timeout); in hci_le_remote_conn_param_req_evt()
5856 cp.handle = ev->handle; in hci_le_remote_conn_param_req_evt()
5857 cp.interval_min = ev->interval_min; in hci_le_remote_conn_param_req_evt()
5858 cp.interval_max = ev->interval_max; in hci_le_remote_conn_param_req_evt()
5859 cp.latency = ev->latency; in hci_le_remote_conn_param_req_evt()
5860 cp.timeout = ev->timeout; in hci_le_remote_conn_param_req_evt()
5876 struct hci_ev_le_direct_adv_info *ev = ptr; in hci_le_direct_adv_report_evt() local
5878 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_direct_adv_report_evt()
5879 ev->bdaddr_type, &ev->direct_addr, in hci_le_direct_adv_report_evt()
5880 ev->direct_addr_type, ev->rssi, NULL, 0, in hci_le_direct_adv_report_evt()
5883 ptr += sizeof(*ev); in hci_le_direct_adv_report_evt()
5891 struct hci_ev_le_phy_update_complete *ev = (void *) skb->data; in hci_le_phy_update_evt() local
5894 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_phy_update_evt()
5896 if (!ev->status) in hci_le_phy_update_evt()
5901 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_phy_update_evt()
5905 conn->le_tx_phy = ev->tx_phy; in hci_le_phy_update_evt()
5906 conn->le_rx_phy = ev->rx_phy; in hci_le_phy_update_evt()
5971 struct hci_ev_cmd_complete *ev; in hci_get_cmd_complete() local
6003 if (skb->len < sizeof(*ev)) { in hci_get_cmd_complete()
6008 ev = (void *) skb->data; in hci_get_cmd_complete()
6009 skb_pull(skb, sizeof(*ev)); in hci_get_cmd_complete()
6011 if (opcode != __le16_to_cpu(ev->opcode)) { in hci_get_cmd_complete()
6013 __le16_to_cpu(ev->opcode)); in hci_get_cmd_complete()