Lines Matching refs:ev

2694 	struct hci_ev_conn_complete *ev = (void *) skb->data;  in hci_conn_complete_evt()  local
2701 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_conn_complete_evt()
2712 if (ev->link_type == ACL_LINK && in hci_conn_complete_evt()
2714 &ev->bdaddr, in hci_conn_complete_evt()
2716 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_complete_evt()
2723 if (ev->link_type != SCO_LINK) in hci_conn_complete_evt()
2727 &ev->bdaddr); in hci_conn_complete_evt()
2735 if (!ev->status) { in hci_conn_complete_evt()
2736 conn->handle = __le16_to_cpu(ev->handle); in hci_conn_complete_evt()
2743 !hci_find_link_key(hdev, &ev->bdaddr)) in hci_conn_complete_evt()
2762 cp.handle = ev->handle; in hci_conn_complete_evt()
2772 cp.handle = ev->handle; in hci_conn_complete_evt()
2781 conn->dst_type, ev->status); in hci_conn_complete_evt()
2785 hci_sco_setup(conn, ev->status); in hci_conn_complete_evt()
2787 if (ev->status) { in hci_conn_complete_evt()
2788 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2790 } else if (ev->link_type == SCO_LINK) { in hci_conn_complete_evt()
2798 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2818 struct hci_ev_conn_request *ev = (void *) skb->data; in hci_conn_request_evt() local
2824 BT_DBG("%s bdaddr %pMR type 0x%x", hdev->name, &ev->bdaddr, in hci_conn_request_evt()
2825 ev->link_type); in hci_conn_request_evt()
2827 mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type, in hci_conn_request_evt()
2831 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2835 if (hci_bdaddr_list_lookup(&hdev->reject_list, &ev->bdaddr, in hci_conn_request_evt()
2837 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2847 !hci_bdaddr_list_lookup_with_flags(&hdev->accept_list, &ev->bdaddr, in hci_conn_request_evt()
2849 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2857 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_conn_request_evt()
2859 memcpy(ie->data.dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2861 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, in hci_conn_request_evt()
2862 &ev->bdaddr); in hci_conn_request_evt()
2864 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_request_evt()
2873 memcpy(conn->dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2877 if (ev->link_type == ACL_LINK || in hci_conn_request_evt()
2882 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2894 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2929 struct hci_ev_disconn_complete *ev = (void *) skb->data; in hci_disconn_complete_evt() local
2935 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_complete_evt()
2939 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_disconn_complete_evt()
2943 if (ev->status) { in hci_disconn_complete_evt()
2945 conn->dst_type, ev->status); in hci_disconn_complete_evt()
2956 reason = hci_to_mgmt_reason(ev->reason); in hci_disconn_complete_evt()
2972 if (ev->reason != HCI_ERROR_CONNECTION_TIMEOUT) in hci_disconn_complete_evt()
2988 hci_disconn_cfm(conn, ev->reason); in hci_disconn_complete_evt()
3021 struct hci_ev_auth_complete *ev = (void *) skb->data; in hci_auth_complete_evt() local
3024 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_auth_complete_evt()
3028 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_auth_complete_evt()
3032 if (!ev->status) { in hci_auth_complete_evt()
3043 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_auth_complete_evt()
3046 mgmt_auth_failed(conn, ev->status); in hci_auth_complete_evt()
3053 if (!ev->status && hci_conn_ssp_enabled(conn)) { in hci_auth_complete_evt()
3055 cp.handle = ev->handle; in hci_auth_complete_evt()
3061 hci_connect_cfm(conn, ev->status); in hci_auth_complete_evt()
3065 hci_auth_cfm(conn, ev->status); in hci_auth_complete_evt()
3073 if (!ev->status) { in hci_auth_complete_evt()
3075 cp.handle = ev->handle; in hci_auth_complete_evt()
3081 hci_encrypt_cfm(conn, ev->status); in hci_auth_complete_evt()
3091 struct hci_ev_remote_name *ev = (void *) skb->data; in hci_remote_name_evt() local
3100 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_name_evt()
3105 if (ev->status == 0) in hci_remote_name_evt()
3106 hci_check_pending_name(hdev, conn, &ev->bdaddr, ev->name, in hci_remote_name_evt()
3107 strnlen(ev->name, HCI_MAX_NAME_LENGTH)); in hci_remote_name_evt()
3109 hci_check_pending_name(hdev, conn, &ev->bdaddr, NULL, 0); in hci_remote_name_evt()
3174 struct hci_ev_encrypt_change *ev = (void *) skb->data; in hci_encrypt_change_evt() local
3177 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_encrypt_change_evt()
3181 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_encrypt_change_evt()
3185 if (!ev->status) { in hci_encrypt_change_evt()
3186 if (ev->encrypt) { in hci_encrypt_change_evt()
3196 if ((conn->type == ACL_LINK && ev->encrypt == 0x02) || in hci_encrypt_change_evt()
3208 if (ev->status && conn->type == LE_LINK) { in hci_encrypt_change_evt()
3217 ev->status = HCI_ERROR_AUTH_FAILURE; in hci_encrypt_change_evt()
3219 if (ev->status && conn->state == BT_CONNECTED) { in hci_encrypt_change_evt()
3220 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_encrypt_change_evt()
3226 hci_encrypt_cfm(conn, ev->status); in hci_encrypt_change_evt()
3233 if (!ev->status && ev->encrypt && conn->type == ACL_LINK) { in hci_encrypt_change_evt()
3280 hci_encrypt_cfm(conn, ev->status); in hci_encrypt_change_evt()
3289 struct hci_ev_change_link_key_complete *ev = (void *) skb->data; in hci_change_link_key_complete_evt() local
3292 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_change_link_key_complete_evt()
3296 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_change_link_key_complete_evt()
3298 if (!ev->status) in hci_change_link_key_complete_evt()
3303 hci_key_change_cfm(conn, ev->status); in hci_change_link_key_complete_evt()
3312 struct hci_ev_remote_features *ev = (void *) skb->data; in hci_remote_features_evt() local
3315 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_remote_features_evt()
3319 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_features_evt()
3323 if (!ev->status) in hci_remote_features_evt()
3324 memcpy(conn->features[0], ev->features, 8); in hci_remote_features_evt()
3329 if (!ev->status && lmp_ext_feat_capable(hdev) && in hci_remote_features_evt()
3332 cp.handle = ev->handle; in hci_remote_features_evt()
3339 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_features_evt()
3350 hci_connect_cfm(conn, ev->status); in hci_remote_features_evt()
3378 struct hci_ev_cmd_complete *ev = (void *) skb->data; in hci_cmd_complete_evt() local
3380 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_complete_evt()
3381 *status = skb->data[sizeof(*ev)]; in hci_cmd_complete_evt()
3383 skb_pull(skb, sizeof(*ev)); in hci_cmd_complete_evt()
3735 handle_cmd_cnt_and_timer(hdev, ev->ncmd); in hci_cmd_complete_evt()
3755 struct hci_ev_cmd_status *ev = (void *) skb->data; in hci_cmd_status_evt() local
3757 skb_pull(skb, sizeof(*ev)); in hci_cmd_status_evt()
3759 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_status_evt()
3760 *status = ev->status; in hci_cmd_status_evt()
3764 hci_cs_inquiry(hdev, ev->status); in hci_cmd_status_evt()
3768 hci_cs_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3772 hci_cs_disconnect(hdev, ev->status); in hci_cmd_status_evt()
3776 hci_cs_add_sco(hdev, ev->status); in hci_cmd_status_evt()
3780 hci_cs_auth_requested(hdev, ev->status); in hci_cmd_status_evt()
3784 hci_cs_set_conn_encrypt(hdev, ev->status); in hci_cmd_status_evt()
3788 hci_cs_remote_name_req(hdev, ev->status); in hci_cmd_status_evt()
3792 hci_cs_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3796 hci_cs_read_remote_ext_features(hdev, ev->status); in hci_cmd_status_evt()
3800 hci_cs_setup_sync_conn(hdev, ev->status); in hci_cmd_status_evt()
3804 hci_cs_enhanced_setup_sync_conn(hdev, ev->status); in hci_cmd_status_evt()
3808 hci_cs_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3812 hci_cs_exit_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3816 hci_cs_switch_role(hdev, ev->status); in hci_cmd_status_evt()
3820 hci_cs_le_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3824 hci_cs_le_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3828 hci_cs_le_start_enc(hdev, ev->status); in hci_cmd_status_evt()
3832 hci_cs_le_ext_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3840 handle_cmd_cnt_and_timer(hdev, ev->ncmd); in hci_cmd_status_evt()
3848 if (ev->status || in hci_cmd_status_evt()
3850 hci_req_cmd_complete(hdev, *opcode, ev->status, req_complete, in hci_cmd_status_evt()
3865 struct hci_ev_hardware_error *ev = (void *) skb->data; in hci_hardware_error_evt() local
3867 hdev->hw_error_code = ev->code; in hci_hardware_error_evt()
3874 struct hci_ev_role_change *ev = (void *) skb->data; in hci_role_change_evt() local
3877 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_role_change_evt()
3881 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_role_change_evt()
3883 if (!ev->status) in hci_role_change_evt()
3884 conn->role = ev->role; in hci_role_change_evt()
3888 hci_role_switch_cfm(conn, ev->status, ev->role); in hci_role_change_evt()
3896 struct hci_ev_num_comp_pkts *ev = (void *) skb->data; in hci_num_comp_pkts_evt() local
3904 if (skb->len < sizeof(*ev) || in hci_num_comp_pkts_evt()
3905 skb->len < struct_size(ev, handles, ev->num_hndl)) { in hci_num_comp_pkts_evt()
3910 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl); in hci_num_comp_pkts_evt()
3912 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_pkts_evt()
3913 struct hci_comp_pkts_info *info = &ev->handles[i]; in hci_num_comp_pkts_evt()
3984 struct hci_ev_num_comp_blocks *ev = (void *) skb->data; in hci_num_comp_blocks_evt() local
3992 if (skb->len < sizeof(*ev) || in hci_num_comp_blocks_evt()
3993 skb->len < struct_size(ev, handles, ev->num_hndl)) { in hci_num_comp_blocks_evt()
3998 BT_DBG("%s num_blocks %d num_hndl %d", hdev->name, ev->num_blocks, in hci_num_comp_blocks_evt()
3999 ev->num_hndl); in hci_num_comp_blocks_evt()
4001 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_blocks_evt()
4002 struct hci_comp_blocks_info *info = &ev->handles[i]; in hci_num_comp_blocks_evt()
4035 struct hci_ev_mode_change *ev = (void *) skb->data; in hci_mode_change_evt() local
4038 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_mode_change_evt()
4042 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_mode_change_evt()
4044 conn->mode = ev->mode; in hci_mode_change_evt()
4055 hci_sco_setup(conn, ev->status); in hci_mode_change_evt()
4063 struct hci_ev_pin_code_req *ev = (void *) skb->data; in hci_pin_code_request_evt() local
4070 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_pin_code_request_evt()
4083 sizeof(ev->bdaddr), &ev->bdaddr); in hci_pin_code_request_evt()
4092 mgmt_pin_code_request(hdev, &ev->bdaddr, secure); in hci_pin_code_request_evt()
4133 struct hci_ev_link_key_req *ev = (void *) skb->data; in hci_link_key_request_evt() local
4145 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_link_key_request_evt()
4148 &ev->bdaddr); in hci_link_key_request_evt()
4153 &ev->bdaddr); in hci_link_key_request_evt()
4155 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_request_evt()
4177 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_link_key_request_evt()
4187 hci_send_cmd(hdev, HCI_OP_LINK_KEY_NEG_REPLY, 6, &ev->bdaddr); in hci_link_key_request_evt()
4193 struct hci_ev_link_key_notify *ev = (void *) skb->data; in hci_link_key_notify_evt() local
4203 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_notify_evt()
4212 conn_set_key(conn, ev->key_type, conn->pin_length); in hci_link_key_notify_evt()
4217 key = hci_add_link_key(hdev, conn, &ev->bdaddr, ev->link_key, in hci_link_key_notify_evt()
4218 ev->key_type, pin_len, &persistent); in hci_link_key_notify_evt()
4225 if (ev->key_type == HCI_LK_CHANGED_COMBINATION) in hci_link_key_notify_evt()
4253 struct hci_ev_clock_offset *ev = (void *) skb->data; in hci_clock_offset_evt() local
4256 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_clock_offset_evt()
4260 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_clock_offset_evt()
4261 if (conn && !ev->status) { in hci_clock_offset_evt()
4266 ie->data.clock_offset = ev->clock_offset; in hci_clock_offset_evt()
4276 struct hci_ev_pkt_type_change *ev = (void *) skb->data; in hci_pkt_type_change_evt() local
4279 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_pkt_type_change_evt()
4283 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_pkt_type_change_evt()
4284 if (conn && !ev->status) in hci_pkt_type_change_evt()
4285 conn->pkt_type = __le16_to_cpu(ev->pkt_type); in hci_pkt_type_change_evt()
4292 struct hci_ev_pscan_rep_mode *ev = (void *) skb->data; in hci_pscan_rep_mode_evt() local
4299 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_pscan_rep_mode_evt()
4301 ie->data.pscan_rep_mode = ev->pscan_rep_mode; in hci_pscan_rep_mode_evt()
4382 struct hci_ev_remote_ext_features *ev = (void *) skb->data; in hci_remote_ext_features_evt() local
4389 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_ext_features_evt()
4393 if (ev->page < HCI_MAX_PAGES) in hci_remote_ext_features_evt()
4394 memcpy(conn->features[ev->page], ev->features, 8); in hci_remote_ext_features_evt()
4396 if (!ev->status && ev->page == 0x01) { in hci_remote_ext_features_evt()
4401 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_ext_features_evt()
4403 if (ev->features[0] & LMP_HOST_SSP) { in hci_remote_ext_features_evt()
4417 if (ev->features[0] & LMP_HOST_SC) in hci_remote_ext_features_evt()
4424 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_ext_features_evt()
4435 hci_connect_cfm(conn, ev->status); in hci_remote_ext_features_evt()
4446 struct hci_ev_sync_conn_complete *ev = (void *) skb->data; in hci_sync_conn_complete_evt() local
4450 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_sync_conn_complete_evt()
4454 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_sync_conn_complete_evt()
4456 if (ev->link_type == ESCO_LINK) in hci_sync_conn_complete_evt()
4468 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_sync_conn_complete_evt()
4473 switch (ev->status) { in hci_sync_conn_complete_evt()
4490 conn->handle = __le16_to_cpu(ev->handle); in hci_sync_conn_complete_evt()
4492 conn->type = ev->link_type; in hci_sync_conn_complete_evt()
4519 bt_dev_dbg(hdev, "SCO connected with air mode: %02x", ev->air_mode); in hci_sync_conn_complete_evt()
4521 switch (ev->air_mode) { in hci_sync_conn_complete_evt()
4538 hci_connect_cfm(conn, ev->status); in hci_sync_conn_complete_evt()
4539 if (ev->status) in hci_sync_conn_complete_evt()
4616 struct hci_ev_key_refresh_complete *ev = (void *) skb->data; in hci_key_refresh_complete_evt() local
4619 BT_DBG("%s status 0x%2.2x handle 0x%4.4x", hdev->name, ev->status, in hci_key_refresh_complete_evt()
4620 __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4624 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4634 if (!ev->status) in hci_key_refresh_complete_evt()
4639 if (ev->status && conn->state == BT_CONNECTED) { in hci_key_refresh_complete_evt()
4646 if (!ev->status) in hci_key_refresh_complete_evt()
4649 hci_connect_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4652 hci_auth_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4725 struct hci_ev_io_capa_request *ev = (void *) skb->data; in hci_io_capa_request_evt() local
4732 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_request_evt()
4749 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4781 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4794 struct hci_ev_io_capa_reply *ev = (void *) skb->data; in hci_io_capa_reply_evt() local
4801 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_reply_evt()
4805 conn->remote_cap = ev->capability; in hci_io_capa_reply_evt()
4806 conn->remote_auth = ev->authentication; in hci_io_capa_reply_evt()
4815 struct hci_ev_user_confirm_req *ev = (void *) skb->data; in hci_user_confirm_request_evt() local
4826 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_confirm_request_evt()
4842 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4868 if (hci_find_link_key(hdev, &ev->bdaddr)) { in hci_user_confirm_request_evt()
4885 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4890 mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, in hci_user_confirm_request_evt()
4891 le32_to_cpu(ev->passkey), confirm_hint); in hci_user_confirm_request_evt()
4900 struct hci_ev_user_passkey_req *ev = (void *) skb->data; in hci_user_passkey_request_evt() local
4905 mgmt_user_passkey_request(hdev, &ev->bdaddr, ACL_LINK, 0); in hci_user_passkey_request_evt()
4911 struct hci_ev_user_passkey_notify *ev = (void *) skb->data; in hci_user_passkey_notify_evt() local
4916 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_passkey_notify_evt()
4920 conn->passkey_notify = __le32_to_cpu(ev->passkey); in hci_user_passkey_notify_evt()
4931 struct hci_ev_keypress_notify *ev = (void *) skb->data; in hci_keypress_notify_evt() local
4936 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_keypress_notify_evt()
4940 switch (ev->type) { in hci_keypress_notify_evt()
4970 struct hci_ev_simple_pair_complete *ev = (void *) skb->data; in hci_simple_pair_complete_evt() local
4977 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_simple_pair_complete_evt()
4989 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status) in hci_simple_pair_complete_evt()
4990 mgmt_auth_failed(conn, ev->status); in hci_simple_pair_complete_evt()
5001 struct hci_ev_remote_host_features *ev = (void *) skb->data; in hci_remote_host_features_evt() local
5009 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_host_features_evt()
5011 memcpy(conn->features[1], ev->features, 8); in hci_remote_host_features_evt()
5013 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_remote_host_features_evt()
5015 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_host_features_evt()
5023 struct hci_ev_remote_oob_data_request *ev = (void *) skb->data; in hci_remote_oob_data_request_evt() local
5033 data = hci_find_remote_oob_data(hdev, &ev->bdaddr, BDADDR_BREDR); in hci_remote_oob_data_request_evt()
5037 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
5046 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
5062 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
5077 struct hci_ev_channel_selected *ev = (void *)skb->data; in hci_chan_selected_evt() local
5080 BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle); in hci_chan_selected_evt()
5082 skb_pull(skb, sizeof(*ev)); in hci_chan_selected_evt()
5084 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_chan_selected_evt()
5094 struct hci_ev_phy_link_complete *ev = (void *) skb->data; in hci_phy_link_complete_evt() local
5097 BT_DBG("%s handle 0x%2.2x status 0x%2.2x", hdev->name, ev->phy_handle, in hci_phy_link_complete_evt()
5098 ev->status); in hci_phy_link_complete_evt()
5102 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_phy_link_complete_evt()
5109 if (ev->status) { in hci_phy_link_complete_evt()
5134 struct hci_ev_logical_link_complete *ev = (void *) skb->data; in hci_loglink_complete_evt() local
5140 hdev->name, le16_to_cpu(ev->handle), ev->phy_handle, in hci_loglink_complete_evt()
5141 ev->status); in hci_loglink_complete_evt()
5143 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_loglink_complete_evt()
5152 hchan->handle = le16_to_cpu(ev->handle); in hci_loglink_complete_evt()
5174 struct hci_ev_disconn_logical_link_complete *ev = (void *) skb->data; in hci_disconn_loglink_complete_evt() local
5178 le16_to_cpu(ev->handle), ev->status); in hci_disconn_loglink_complete_evt()
5180 if (ev->status) in hci_disconn_loglink_complete_evt()
5185 hchan = hci_chan_lookup_handle(hdev, le16_to_cpu(ev->handle)); in hci_disconn_loglink_complete_evt()
5189 amp_destroy_logical_link(hchan, ev->reason); in hci_disconn_loglink_complete_evt()
5198 struct hci_ev_disconn_phy_link_complete *ev = (void *) skb->data; in hci_disconn_phylink_complete_evt() local
5201 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_phylink_complete_evt()
5203 if (ev->status) in hci_disconn_phylink_complete_evt()
5208 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_disconn_phylink_complete_evt()
5421 struct hci_ev_le_conn_complete *ev = (void *) skb->data; in hci_le_conn_complete_evt() local
5423 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_complete_evt()
5425 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_conn_complete_evt()
5426 NULL, ev->role, le16_to_cpu(ev->handle), in hci_le_conn_complete_evt()
5427 le16_to_cpu(ev->interval), in hci_le_conn_complete_evt()
5428 le16_to_cpu(ev->latency), in hci_le_conn_complete_evt()
5429 le16_to_cpu(ev->supervision_timeout)); in hci_le_conn_complete_evt()
5435 struct hci_ev_le_enh_conn_complete *ev = (void *) skb->data; in hci_le_enh_conn_complete_evt() local
5437 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_enh_conn_complete_evt()
5439 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_enh_conn_complete_evt()
5440 &ev->local_rpa, ev->role, le16_to_cpu(ev->handle), in hci_le_enh_conn_complete_evt()
5441 le16_to_cpu(ev->interval), in hci_le_enh_conn_complete_evt()
5442 le16_to_cpu(ev->latency), in hci_le_enh_conn_complete_evt()
5443 le16_to_cpu(ev->supervision_timeout)); in hci_le_enh_conn_complete_evt()
5453 struct hci_evt_le_ext_adv_set_term *ev = (void *) skb->data; in hci_le_ext_adv_term_evt() local
5457 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_ext_adv_term_evt()
5459 adv = hci_find_adv_instance(hdev, ev->handle); in hci_le_ext_adv_term_evt()
5461 if (ev->status) { in hci_le_ext_adv_term_evt()
5466 hci_remove_adv_instance(hdev, ev->handle); in hci_le_ext_adv_term_evt()
5467 mgmt_advertising_removed(NULL, hdev, ev->handle); in hci_le_ext_adv_term_evt()
5475 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->conn_handle)); in hci_le_ext_adv_term_evt()
5480 conn->adv_instance = ev->handle; in hci_le_ext_adv_term_evt()
5486 if (!ev->handle) { in hci_le_ext_adv_term_evt()
5499 struct hci_ev_le_conn_update_complete *ev = (void *) skb->data; in hci_le_conn_update_complete_evt() local
5502 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_update_complete_evt()
5504 if (ev->status) in hci_le_conn_update_complete_evt()
5509 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_conn_update_complete_evt()
5511 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_update_complete_evt()
5512 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_update_complete_evt()
5513 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_update_complete_evt()
5825 struct hci_ev_le_advertising_info *ev = ptr; in hci_le_adv_report_evt() local
5828 if (ev->length <= HCI_MAX_AD_LENGTH) { in hci_le_adv_report_evt()
5829 rssi = ev->data[ev->length]; in hci_le_adv_report_evt()
5830 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_adv_report_evt()
5831 ev->bdaddr_type, NULL, 0, rssi, in hci_le_adv_report_evt()
5832 ev->data, ev->length, false); in hci_le_adv_report_evt()
5837 ptr += sizeof(*ev) + ev->length + 1; in hci_le_adv_report_evt()
5895 struct hci_ev_le_ext_adv_report *ev = ptr; in hci_le_ext_adv_report_evt() local
5899 evt_type = __le16_to_cpu(ev->evt_type); in hci_le_ext_adv_report_evt()
5902 process_adv_report(hdev, legacy_evt_type, &ev->bdaddr, in hci_le_ext_adv_report_evt()
5903 ev->bdaddr_type, NULL, 0, ev->rssi, in hci_le_ext_adv_report_evt()
5904 ev->data, ev->length, in hci_le_ext_adv_report_evt()
5908 ptr += sizeof(*ev) + ev->length; in hci_le_ext_adv_report_evt()
5917 struct hci_ev_le_remote_feat_complete *ev = (void *)skb->data; in hci_le_remote_feat_complete_evt() local
5920 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_remote_feat_complete_evt()
5924 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_remote_feat_complete_evt()
5926 if (!ev->status) in hci_le_remote_feat_complete_evt()
5927 memcpy(conn->features[0], ev->features, 8); in hci_le_remote_feat_complete_evt()
5941 if (!conn->out && ev->status == 0x1a && in hci_le_remote_feat_complete_evt()
5945 status = ev->status; in hci_le_remote_feat_complete_evt()
5958 struct hci_ev_le_ltk_req *ev = (void *) skb->data; in hci_le_ltk_request_evt() local
5964 BT_DBG("%s handle 0x%4.4x", hdev->name, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5968 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5978 if (ev->ediv || ev->rand) in hci_le_ltk_request_evt()
5982 if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) in hci_le_ltk_request_evt()
6015 neg.handle = ev->handle; in hci_le_ltk_request_evt()
6035 struct hci_ev_le_remote_conn_param_req *ev = (void *) skb->data; in hci_le_remote_conn_param_req_evt() local
6040 handle = le16_to_cpu(ev->handle); in hci_le_remote_conn_param_req_evt()
6041 min = le16_to_cpu(ev->interval_min); in hci_le_remote_conn_param_req_evt()
6042 max = le16_to_cpu(ev->interval_max); in hci_le_remote_conn_param_req_evt()
6043 latency = le16_to_cpu(ev->latency); in hci_le_remote_conn_param_req_evt()
6044 timeout = le16_to_cpu(ev->timeout); in hci_le_remote_conn_param_req_evt()
6079 cp.handle = ev->handle; in hci_le_remote_conn_param_req_evt()
6080 cp.interval_min = ev->interval_min; in hci_le_remote_conn_param_req_evt()
6081 cp.interval_max = ev->interval_max; in hci_le_remote_conn_param_req_evt()
6082 cp.latency = ev->latency; in hci_le_remote_conn_param_req_evt()
6083 cp.timeout = ev->timeout; in hci_le_remote_conn_param_req_evt()
6094 struct hci_ev_le_direct_adv_info *ev = (void *)&skb->data[1]; in hci_le_direct_adv_report_evt() local
6096 if (!num_reports || skb->len < num_reports * sizeof(*ev) + 1) in hci_le_direct_adv_report_evt()
6101 for (; num_reports; num_reports--, ev++) in hci_le_direct_adv_report_evt()
6102 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_direct_adv_report_evt()
6103 ev->bdaddr_type, &ev->direct_addr, in hci_le_direct_adv_report_evt()
6104 ev->direct_addr_type, ev->rssi, NULL, 0, in hci_le_direct_adv_report_evt()
6112 struct hci_ev_le_phy_update_complete *ev = (void *) skb->data; in hci_le_phy_update_evt() local
6115 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_phy_update_evt()
6117 if (ev->status) in hci_le_phy_update_evt()
6122 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_phy_update_evt()
6126 conn->le_tx_phy = ev->tx_phy; in hci_le_phy_update_evt()
6127 conn->le_rx_phy = ev->rx_phy; in hci_le_phy_update_evt()
6192 struct hci_ev_cmd_complete *ev; in hci_get_cmd_complete() local
6224 if (skb->len < sizeof(*ev)) { in hci_get_cmd_complete()
6229 ev = (void *) skb->data; in hci_get_cmd_complete()
6230 skb_pull(skb, sizeof(*ev)); in hci_get_cmd_complete()
6232 if (opcode != __le16_to_cpu(ev->opcode)) { in hci_get_cmd_complete()
6234 __le16_to_cpu(ev->opcode)); in hci_get_cmd_complete()