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()
2714 if (hci_bdaddr_list_lookup(&hdev->reject_list, &ev->bdaddr, in hci_conn_request_evt()
2716 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2726 !hci_bdaddr_list_lookup_with_flags(&hdev->accept_list, &ev->bdaddr, in hci_conn_request_evt()
2728 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()
2749 memcpy(conn->dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2753 if (ev->link_type == ACL_LINK || in hci_conn_request_evt()
2758 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2770 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2809 struct hci_ev_disconn_complete *ev = (void *) skb->data; in hci_disconn_complete_evt() local
2816 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_complete_evt()
2820 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_disconn_complete_evt()
2824 if (ev->status) { in hci_disconn_complete_evt()
2826 conn->dst_type, ev->status); in hci_disconn_complete_evt()
2837 reason = hci_to_mgmt_reason(ev->reason); in hci_disconn_complete_evt()
2853 if (ev->reason != HCI_ERROR_CONNECTION_TIMEOUT) in hci_disconn_complete_evt()
2871 hci_disconn_cfm(conn, ev->reason); in hci_disconn_complete_evt()
2901 struct hci_ev_auth_complete *ev = (void *) skb->data; in hci_auth_complete_evt() local
2904 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_auth_complete_evt()
2908 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_auth_complete_evt()
2912 if (!ev->status) { in hci_auth_complete_evt()
2923 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_auth_complete_evt()
2926 mgmt_auth_failed(conn, ev->status); in hci_auth_complete_evt()
2933 if (!ev->status && hci_conn_ssp_enabled(conn)) { in hci_auth_complete_evt()
2935 cp.handle = ev->handle; in hci_auth_complete_evt()
2941 hci_connect_cfm(conn, ev->status); in hci_auth_complete_evt()
2945 hci_auth_cfm(conn, ev->status); in hci_auth_complete_evt()
2953 if (!ev->status) { in hci_auth_complete_evt()
2955 cp.handle = ev->handle; in hci_auth_complete_evt()
2961 hci_encrypt_cfm(conn, ev->status); in hci_auth_complete_evt()
2971 struct hci_ev_remote_name *ev = (void *) skb->data; in hci_remote_name_evt() local
2980 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_name_evt()
2985 if (ev->status == 0) in hci_remote_name_evt()
2986 hci_check_pending_name(hdev, conn, &ev->bdaddr, ev->name, in hci_remote_name_evt()
2987 strnlen(ev->name, HCI_MAX_NAME_LENGTH)); in hci_remote_name_evt()
2989 hci_check_pending_name(hdev, conn, &ev->bdaddr, NULL, 0); in hci_remote_name_evt()
3054 struct hci_ev_encrypt_change *ev = (void *) skb->data; in hci_encrypt_change_evt() local
3057 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_encrypt_change_evt()
3061 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_encrypt_change_evt()
3065 if (!ev->status) { in hci_encrypt_change_evt()
3066 if (ev->encrypt) { in hci_encrypt_change_evt()
3076 if ((conn->type == ACL_LINK && ev->encrypt == 0x02) || in hci_encrypt_change_evt()
3088 if (ev->status && conn->type == LE_LINK) { in hci_encrypt_change_evt()
3097 ev->status = HCI_ERROR_AUTH_FAILURE; in hci_encrypt_change_evt()
3099 if (ev->status && conn->state == BT_CONNECTED) { in hci_encrypt_change_evt()
3100 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_encrypt_change_evt()
3106 hci_encrypt_cfm(conn, ev->status); in hci_encrypt_change_evt()
3113 if (!ev->status && ev->encrypt && conn->type == ACL_LINK) { in hci_encrypt_change_evt()
3160 hci_encrypt_cfm(conn, ev->status); in hci_encrypt_change_evt()
3169 struct hci_ev_change_link_key_complete *ev = (void *) skb->data; in hci_change_link_key_complete_evt() local
3172 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_change_link_key_complete_evt()
3176 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_change_link_key_complete_evt()
3178 if (!ev->status) in hci_change_link_key_complete_evt()
3183 hci_key_change_cfm(conn, ev->status); in hci_change_link_key_complete_evt()
3192 struct hci_ev_remote_features *ev = (void *) skb->data; in hci_remote_features_evt() local
3195 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_remote_features_evt()
3199 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_features_evt()
3203 if (!ev->status) in hci_remote_features_evt()
3204 memcpy(conn->features[0], ev->features, 8); in hci_remote_features_evt()
3209 if (!ev->status && lmp_ext_feat_capable(hdev) && in hci_remote_features_evt()
3212 cp.handle = ev->handle; in hci_remote_features_evt()
3219 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_features_evt()
3230 hci_connect_cfm(conn, ev->status); in hci_remote_features_evt()
3243 struct hci_ev_cmd_complete *ev = (void *) skb->data; in hci_cmd_complete_evt() local
3245 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_complete_evt()
3246 *status = skb->data[sizeof(*ev)]; in hci_cmd_complete_evt()
3248 skb_pull(skb, sizeof(*ev)); in hci_cmd_complete_evt()
3595 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_complete_evt()
3616 struct hci_ev_cmd_status *ev = (void *) skb->data; in hci_cmd_status_evt() local
3618 skb_pull(skb, sizeof(*ev)); in hci_cmd_status_evt()
3620 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_status_evt()
3621 *status = ev->status; in hci_cmd_status_evt()
3625 hci_cs_inquiry(hdev, ev->status); in hci_cmd_status_evt()
3629 hci_cs_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3633 hci_cs_disconnect(hdev, ev->status); in hci_cmd_status_evt()
3637 hci_cs_add_sco(hdev, ev->status); in hci_cmd_status_evt()
3641 hci_cs_auth_requested(hdev, ev->status); in hci_cmd_status_evt()
3645 hci_cs_set_conn_encrypt(hdev, ev->status); in hci_cmd_status_evt()
3649 hci_cs_remote_name_req(hdev, ev->status); in hci_cmd_status_evt()
3653 hci_cs_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3657 hci_cs_read_remote_ext_features(hdev, ev->status); in hci_cmd_status_evt()
3661 hci_cs_setup_sync_conn(hdev, ev->status); in hci_cmd_status_evt()
3665 hci_cs_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3669 hci_cs_exit_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3673 hci_cs_switch_role(hdev, ev->status); in hci_cmd_status_evt()
3677 hci_cs_le_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3681 hci_cs_le_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3685 hci_cs_le_start_enc(hdev, ev->status); in hci_cmd_status_evt()
3689 hci_cs_le_ext_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3700 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_status_evt()
3709 if (ev->status || in hci_cmd_status_evt()
3711 hci_req_cmd_complete(hdev, *opcode, ev->status, req_complete, in hci_cmd_status_evt()
3726 struct hci_ev_hardware_error *ev = (void *) skb->data; in hci_hardware_error_evt() local
3728 hdev->hw_error_code = ev->code; in hci_hardware_error_evt()
3735 struct hci_ev_role_change *ev = (void *) skb->data; in hci_role_change_evt() local
3738 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_role_change_evt()
3742 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_role_change_evt()
3744 if (!ev->status) in hci_role_change_evt()
3745 conn->role = ev->role; in hci_role_change_evt()
3749 hci_role_switch_cfm(conn, ev->status, ev->role); in hci_role_change_evt()
3757 struct hci_ev_num_comp_pkts *ev = (void *) skb->data; in hci_num_comp_pkts_evt() local
3765 if (skb->len < sizeof(*ev) || in hci_num_comp_pkts_evt()
3766 skb->len < struct_size(ev, handles, ev->num_hndl)) { in hci_num_comp_pkts_evt()
3771 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl); in hci_num_comp_pkts_evt()
3773 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_pkts_evt()
3774 struct hci_comp_pkts_info *info = &ev->handles[i]; in hci_num_comp_pkts_evt()
3845 struct hci_ev_num_comp_blocks *ev = (void *) skb->data; in hci_num_comp_blocks_evt() local
3853 if (skb->len < sizeof(*ev) || in hci_num_comp_blocks_evt()
3854 skb->len < struct_size(ev, handles, ev->num_hndl)) { in hci_num_comp_blocks_evt()
3859 BT_DBG("%s num_blocks %d num_hndl %d", hdev->name, ev->num_blocks, in hci_num_comp_blocks_evt()
3860 ev->num_hndl); in hci_num_comp_blocks_evt()
3862 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_blocks_evt()
3863 struct hci_comp_blocks_info *info = &ev->handles[i]; in hci_num_comp_blocks_evt()
3896 struct hci_ev_mode_change *ev = (void *) skb->data; in hci_mode_change_evt() local
3899 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_mode_change_evt()
3903 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_mode_change_evt()
3905 conn->mode = ev->mode; in hci_mode_change_evt()
3916 hci_sco_setup(conn, ev->status); in hci_mode_change_evt()
3924 struct hci_ev_pin_code_req *ev = (void *) skb->data; in hci_pin_code_request_evt() local
3931 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_pin_code_request_evt()
3944 sizeof(ev->bdaddr), &ev->bdaddr); in hci_pin_code_request_evt()
3953 mgmt_pin_code_request(hdev, &ev->bdaddr, secure); in hci_pin_code_request_evt()
3994 struct hci_ev_link_key_req *ev = (void *) skb->data; in hci_link_key_request_evt() local
4006 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_link_key_request_evt()
4009 &ev->bdaddr); in hci_link_key_request_evt()
4014 &ev->bdaddr); in hci_link_key_request_evt()
4016 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_request_evt()
4038 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_link_key_request_evt()
4048 hci_send_cmd(hdev, HCI_OP_LINK_KEY_NEG_REPLY, 6, &ev->bdaddr); in hci_link_key_request_evt()
4054 struct hci_ev_link_key_notify *ev = (void *) skb->data; in hci_link_key_notify_evt() local
4064 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_notify_evt()
4073 conn_set_key(conn, ev->key_type, conn->pin_length); in hci_link_key_notify_evt()
4078 key = hci_add_link_key(hdev, conn, &ev->bdaddr, ev->link_key, in hci_link_key_notify_evt()
4079 ev->key_type, pin_len, &persistent); in hci_link_key_notify_evt()
4086 if (ev->key_type == HCI_LK_CHANGED_COMBINATION) in hci_link_key_notify_evt()
4114 struct hci_ev_clock_offset *ev = (void *) skb->data; in hci_clock_offset_evt() local
4117 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_clock_offset_evt()
4121 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_clock_offset_evt()
4122 if (conn && !ev->status) { in hci_clock_offset_evt()
4127 ie->data.clock_offset = ev->clock_offset; in hci_clock_offset_evt()
4137 struct hci_ev_pkt_type_change *ev = (void *) skb->data; in hci_pkt_type_change_evt() local
4140 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_pkt_type_change_evt()
4144 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_pkt_type_change_evt()
4145 if (conn && !ev->status) in hci_pkt_type_change_evt()
4146 conn->pkt_type = __le16_to_cpu(ev->pkt_type); in hci_pkt_type_change_evt()
4153 struct hci_ev_pscan_rep_mode *ev = (void *) skb->data; in hci_pscan_rep_mode_evt() local
4160 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_pscan_rep_mode_evt()
4162 ie->data.pscan_rep_mode = ev->pscan_rep_mode; in hci_pscan_rep_mode_evt()
4243 struct hci_ev_remote_ext_features *ev = (void *) skb->data; in hci_remote_ext_features_evt() local
4250 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_ext_features_evt()
4254 if (ev->page < HCI_MAX_PAGES) in hci_remote_ext_features_evt()
4255 memcpy(conn->features[ev->page], ev->features, 8); in hci_remote_ext_features_evt()
4257 if (!ev->status && ev->page == 0x01) { in hci_remote_ext_features_evt()
4262 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_ext_features_evt()
4264 if (ev->features[0] & LMP_HOST_SSP) { in hci_remote_ext_features_evt()
4278 if (ev->features[0] & LMP_HOST_SC) in hci_remote_ext_features_evt()
4285 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_ext_features_evt()
4296 hci_connect_cfm(conn, ev->status); in hci_remote_ext_features_evt()
4307 struct hci_ev_sync_conn_complete *ev = (void *) skb->data; in hci_sync_conn_complete_evt() local
4310 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_sync_conn_complete_evt()
4314 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_sync_conn_complete_evt()
4316 if (ev->link_type == ESCO_LINK) in hci_sync_conn_complete_evt()
4328 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_sync_conn_complete_evt()
4333 switch (ev->status) { in hci_sync_conn_complete_evt()
4350 conn->handle = __le16_to_cpu(ev->handle); in hci_sync_conn_complete_evt()
4352 conn->type = ev->link_type; in hci_sync_conn_complete_evt()
4379 bt_dev_dbg(hdev, "SCO connected with air mode: %02x", ev->air_mode); in hci_sync_conn_complete_evt()
4381 switch (ev->air_mode) { in hci_sync_conn_complete_evt()
4392 hci_connect_cfm(conn, ev->status); in hci_sync_conn_complete_evt()
4393 if (ev->status) in hci_sync_conn_complete_evt()
4470 struct hci_ev_key_refresh_complete *ev = (void *) skb->data; in hci_key_refresh_complete_evt() local
4473 BT_DBG("%s status 0x%2.2x handle 0x%4.4x", hdev->name, ev->status, in hci_key_refresh_complete_evt()
4474 __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4478 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4488 if (!ev->status) in hci_key_refresh_complete_evt()
4493 if (ev->status && conn->state == BT_CONNECTED) { in hci_key_refresh_complete_evt()
4500 if (!ev->status) in hci_key_refresh_complete_evt()
4503 hci_connect_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4506 hci_auth_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4579 struct hci_ev_io_capa_request *ev = (void *) skb->data; in hci_io_capa_request_evt() local
4586 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_request_evt()
4603 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4635 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4648 struct hci_ev_io_capa_reply *ev = (void *) skb->data; in hci_io_capa_reply_evt() local
4655 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_reply_evt()
4659 conn->remote_cap = ev->capability; in hci_io_capa_reply_evt()
4660 conn->remote_auth = ev->authentication; in hci_io_capa_reply_evt()
4669 struct hci_ev_user_confirm_req *ev = (void *) skb->data; in hci_user_confirm_request_evt() local
4680 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_confirm_request_evt()
4696 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4722 if (hci_find_link_key(hdev, &ev->bdaddr)) { in hci_user_confirm_request_evt()
4739 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4744 mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, in hci_user_confirm_request_evt()
4745 le32_to_cpu(ev->passkey), confirm_hint); in hci_user_confirm_request_evt()
4754 struct hci_ev_user_passkey_req *ev = (void *) skb->data; in hci_user_passkey_request_evt() local
4759 mgmt_user_passkey_request(hdev, &ev->bdaddr, ACL_LINK, 0); in hci_user_passkey_request_evt()
4765 struct hci_ev_user_passkey_notify *ev = (void *) skb->data; in hci_user_passkey_notify_evt() local
4770 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_passkey_notify_evt()
4774 conn->passkey_notify = __le32_to_cpu(ev->passkey); in hci_user_passkey_notify_evt()
4785 struct hci_ev_keypress_notify *ev = (void *) skb->data; in hci_keypress_notify_evt() local
4790 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_keypress_notify_evt()
4794 switch (ev->type) { in hci_keypress_notify_evt()
4824 struct hci_ev_simple_pair_complete *ev = (void *) skb->data; in hci_simple_pair_complete_evt() local
4831 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_simple_pair_complete_evt()
4843 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status) in hci_simple_pair_complete_evt()
4844 mgmt_auth_failed(conn, ev->status); in hci_simple_pair_complete_evt()
4855 struct hci_ev_remote_host_features *ev = (void *) skb->data; in hci_remote_host_features_evt() local
4863 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_host_features_evt()
4865 memcpy(conn->features[1], ev->features, 8); in hci_remote_host_features_evt()
4867 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_remote_host_features_evt()
4869 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_host_features_evt()
4877 struct hci_ev_remote_oob_data_request *ev = (void *) skb->data; in hci_remote_oob_data_request_evt() local
4887 data = hci_find_remote_oob_data(hdev, &ev->bdaddr, BDADDR_BREDR); in hci_remote_oob_data_request_evt()
4891 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4900 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4916 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4931 struct hci_ev_channel_selected *ev = (void *)skb->data; in hci_chan_selected_evt() local
4934 BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle); in hci_chan_selected_evt()
4936 skb_pull(skb, sizeof(*ev)); in hci_chan_selected_evt()
4938 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_chan_selected_evt()
4948 struct hci_ev_phy_link_complete *ev = (void *) skb->data; in hci_phy_link_complete_evt() local
4951 BT_DBG("%s handle 0x%2.2x status 0x%2.2x", hdev->name, ev->phy_handle, in hci_phy_link_complete_evt()
4952 ev->status); in hci_phy_link_complete_evt()
4956 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_phy_link_complete_evt()
4967 if (ev->status) { in hci_phy_link_complete_evt()
4992 struct hci_ev_logical_link_complete *ev = (void *) skb->data; in hci_loglink_complete_evt() local
4998 hdev->name, le16_to_cpu(ev->handle), ev->phy_handle, in hci_loglink_complete_evt()
4999 ev->status); in hci_loglink_complete_evt()
5001 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_loglink_complete_evt()
5010 hchan->handle = le16_to_cpu(ev->handle); in hci_loglink_complete_evt()
5032 struct hci_ev_disconn_logical_link_complete *ev = (void *) skb->data; in hci_disconn_loglink_complete_evt() local
5036 le16_to_cpu(ev->handle), ev->status); in hci_disconn_loglink_complete_evt()
5038 if (ev->status) in hci_disconn_loglink_complete_evt()
5043 hchan = hci_chan_lookup_handle(hdev, le16_to_cpu(ev->handle)); in hci_disconn_loglink_complete_evt()
5047 amp_destroy_logical_link(hchan, ev->reason); in hci_disconn_loglink_complete_evt()
5056 struct hci_ev_disconn_phy_link_complete *ev = (void *) skb->data; in hci_disconn_phylink_complete_evt() local
5059 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_phylink_complete_evt()
5061 if (ev->status) in hci_disconn_phylink_complete_evt()
5066 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_disconn_phylink_complete_evt()
5069 hci_disconn_cfm(hcon, ev->reason); in hci_disconn_phylink_complete_evt()
5271 struct hci_ev_le_conn_complete *ev = (void *) skb->data; in hci_le_conn_complete_evt() local
5273 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_complete_evt()
5275 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_conn_complete_evt()
5276 NULL, ev->role, le16_to_cpu(ev->handle), in hci_le_conn_complete_evt()
5277 le16_to_cpu(ev->interval), in hci_le_conn_complete_evt()
5278 le16_to_cpu(ev->latency), in hci_le_conn_complete_evt()
5279 le16_to_cpu(ev->supervision_timeout)); in hci_le_conn_complete_evt()
5285 struct hci_ev_le_enh_conn_complete *ev = (void *) skb->data; in hci_le_enh_conn_complete_evt() local
5287 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_enh_conn_complete_evt()
5289 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_enh_conn_complete_evt()
5290 &ev->local_rpa, ev->role, le16_to_cpu(ev->handle), in hci_le_enh_conn_complete_evt()
5291 le16_to_cpu(ev->interval), in hci_le_enh_conn_complete_evt()
5292 le16_to_cpu(ev->latency), in hci_le_enh_conn_complete_evt()
5293 le16_to_cpu(ev->supervision_timeout)); in hci_le_enh_conn_complete_evt()
5303 struct hci_evt_le_ext_adv_set_term *ev = (void *) skb->data; in hci_le_ext_adv_term_evt() local
5306 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_ext_adv_term_evt()
5308 if (ev->status) { in hci_le_ext_adv_term_evt()
5311 adv = hci_find_adv_instance(hdev, ev->handle); in hci_le_ext_adv_term_evt()
5316 hci_remove_adv_instance(hdev, ev->handle); in hci_le_ext_adv_term_evt()
5317 mgmt_advertising_removed(NULL, hdev, ev->handle); in hci_le_ext_adv_term_evt()
5322 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->conn_handle)); in hci_le_ext_adv_term_evt()
5344 struct hci_ev_le_conn_update_complete *ev = (void *) skb->data; in hci_le_conn_update_complete_evt() local
5347 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_update_complete_evt()
5349 if (ev->status) in hci_le_conn_update_complete_evt()
5354 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_conn_update_complete_evt()
5356 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_update_complete_evt()
5357 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_update_complete_evt()
5358 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_update_complete_evt()
5665 struct hci_ev_le_advertising_info *ev = ptr; in hci_le_adv_report_evt() local
5668 if (ptr > (void *)skb_tail_pointer(skb) - sizeof(*ev)) { in hci_le_adv_report_evt()
5673 if (ev->length <= HCI_MAX_AD_LENGTH && in hci_le_adv_report_evt()
5674 ev->data + ev->length <= skb_tail_pointer(skb)) { in hci_le_adv_report_evt()
5675 rssi = ev->data[ev->length]; in hci_le_adv_report_evt()
5676 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_adv_report_evt()
5677 ev->bdaddr_type, NULL, 0, rssi, in hci_le_adv_report_evt()
5678 ev->data, ev->length, false); in hci_le_adv_report_evt()
5683 ptr += sizeof(*ev) + ev->length + 1; in hci_le_adv_report_evt()
5741 struct hci_ev_le_ext_adv_report *ev = ptr; in hci_le_ext_adv_report_evt() local
5745 evt_type = __le16_to_cpu(ev->evt_type); in hci_le_ext_adv_report_evt()
5748 process_adv_report(hdev, legacy_evt_type, &ev->bdaddr, in hci_le_ext_adv_report_evt()
5749 ev->bdaddr_type, NULL, 0, ev->rssi, in hci_le_ext_adv_report_evt()
5750 ev->data, ev->length, in hci_le_ext_adv_report_evt()
5754 ptr += sizeof(*ev) + ev->length; in hci_le_ext_adv_report_evt()
5763 struct hci_ev_le_remote_feat_complete *ev = (void *)skb->data; in hci_le_remote_feat_complete_evt() local
5766 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_remote_feat_complete_evt()
5770 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_remote_feat_complete_evt()
5772 if (!ev->status) in hci_le_remote_feat_complete_evt()
5773 memcpy(conn->features[0], ev->features, 8); in hci_le_remote_feat_complete_evt()
5788 !conn->out && ev->status == 0x1a) in hci_le_remote_feat_complete_evt()
5791 status = ev->status; in hci_le_remote_feat_complete_evt()
5804 struct hci_ev_le_ltk_req *ev = (void *) skb->data; in hci_le_ltk_request_evt() local
5810 BT_DBG("%s handle 0x%4.4x", hdev->name, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5814 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5824 if (ev->ediv || ev->rand) in hci_le_ltk_request_evt()
5828 if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) in hci_le_ltk_request_evt()
5861 neg.handle = ev->handle; in hci_le_ltk_request_evt()
5881 struct hci_ev_le_remote_conn_param_req *ev = (void *) skb->data; in hci_le_remote_conn_param_req_evt() local
5886 handle = le16_to_cpu(ev->handle); in hci_le_remote_conn_param_req_evt()
5887 min = le16_to_cpu(ev->interval_min); in hci_le_remote_conn_param_req_evt()
5888 max = le16_to_cpu(ev->interval_max); in hci_le_remote_conn_param_req_evt()
5889 latency = le16_to_cpu(ev->latency); in hci_le_remote_conn_param_req_evt()
5890 timeout = le16_to_cpu(ev->timeout); in hci_le_remote_conn_param_req_evt()
5925 cp.handle = ev->handle; in hci_le_remote_conn_param_req_evt()
5926 cp.interval_min = ev->interval_min; in hci_le_remote_conn_param_req_evt()
5927 cp.interval_max = ev->interval_max; in hci_le_remote_conn_param_req_evt()
5928 cp.latency = ev->latency; in hci_le_remote_conn_param_req_evt()
5929 cp.timeout = ev->timeout; in hci_le_remote_conn_param_req_evt()
5940 struct hci_ev_le_direct_adv_info *ev = (void *)&skb->data[1]; in hci_le_direct_adv_report_evt() local
5942 if (!num_reports || skb->len < num_reports * sizeof(*ev) + 1) in hci_le_direct_adv_report_evt()
5947 for (; num_reports; num_reports--, ev++) in hci_le_direct_adv_report_evt()
5948 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_direct_adv_report_evt()
5949 ev->bdaddr_type, &ev->direct_addr, in hci_le_direct_adv_report_evt()
5950 ev->direct_addr_type, ev->rssi, NULL, 0, in hci_le_direct_adv_report_evt()
5958 struct hci_ev_le_phy_update_complete *ev = (void *) skb->data; in hci_le_phy_update_evt() local
5961 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_phy_update_evt()
5963 if (ev->status) in hci_le_phy_update_evt()
5968 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_phy_update_evt()
5972 conn->le_tx_phy = ev->tx_phy; in hci_le_phy_update_evt()
5973 conn->le_rx_phy = ev->rx_phy; in hci_le_phy_update_evt()
6038 struct hci_ev_cmd_complete *ev; in hci_get_cmd_complete() local
6070 if (skb->len < sizeof(*ev)) { in hci_get_cmd_complete()
6075 ev = (void *) skb->data; in hci_get_cmd_complete()
6076 skb_pull(skb, sizeof(*ev)); in hci_get_cmd_complete()
6078 if (opcode != __le16_to_cpu(ev->opcode)) { in hci_get_cmd_complete()
6080 __le16_to_cpu(ev->opcode)); in hci_get_cmd_complete()