Lines Matching refs:ev

2650 	struct hci_ev_conn_complete *ev = (void *) skb->data;  in hci_conn_complete_evt()  local
2657 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_conn_complete_evt()
2668 if (ev->link_type == ACL_LINK && in hci_conn_complete_evt()
2670 &ev->bdaddr, in hci_conn_complete_evt()
2672 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_complete_evt()
2679 if (ev->link_type != SCO_LINK) in hci_conn_complete_evt()
2683 &ev->bdaddr); in hci_conn_complete_evt()
2691 if (!ev->status) { in hci_conn_complete_evt()
2692 conn->handle = __le16_to_cpu(ev->handle); in hci_conn_complete_evt()
2699 !hci_find_link_key(hdev, &ev->bdaddr)) in hci_conn_complete_evt()
2718 cp.handle = ev->handle; in hci_conn_complete_evt()
2728 cp.handle = ev->handle; in hci_conn_complete_evt()
2737 conn->dst_type, ev->status); in hci_conn_complete_evt()
2741 hci_sco_setup(conn, ev->status); in hci_conn_complete_evt()
2743 if (ev->status) { in hci_conn_complete_evt()
2744 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2746 } else if (ev->link_type == SCO_LINK) { in hci_conn_complete_evt()
2754 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2774 struct hci_ev_conn_request *ev = (void *) skb->data; in hci_conn_request_evt() local
2780 BT_DBG("%s bdaddr %pMR type 0x%x", hdev->name, &ev->bdaddr, in hci_conn_request_evt()
2781 ev->link_type); in hci_conn_request_evt()
2783 mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type, in hci_conn_request_evt()
2787 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2791 if (hci_bdaddr_list_lookup(&hdev->reject_list, &ev->bdaddr, in hci_conn_request_evt()
2793 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2803 !hci_bdaddr_list_lookup_with_flags(&hdev->accept_list, &ev->bdaddr, in hci_conn_request_evt()
2805 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2813 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_conn_request_evt()
2815 memcpy(ie->data.dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2817 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, in hci_conn_request_evt()
2818 &ev->bdaddr); in hci_conn_request_evt()
2820 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_request_evt()
2829 memcpy(conn->dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2833 if (ev->link_type == ACL_LINK || in hci_conn_request_evt()
2838 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2850 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2885 struct hci_ev_disconn_complete *ev = (void *) skb->data; in hci_disconn_complete_evt() local
2891 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_complete_evt()
2895 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_disconn_complete_evt()
2899 if (ev->status) { in hci_disconn_complete_evt()
2901 conn->dst_type, ev->status); in hci_disconn_complete_evt()
2912 reason = hci_to_mgmt_reason(ev->reason); in hci_disconn_complete_evt()
2928 if (ev->reason != HCI_ERROR_CONNECTION_TIMEOUT) in hci_disconn_complete_evt()
2944 hci_disconn_cfm(conn, ev->reason); in hci_disconn_complete_evt()
2977 struct hci_ev_auth_complete *ev = (void *) skb->data; in hci_auth_complete_evt() local
2980 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_auth_complete_evt()
2984 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_auth_complete_evt()
2988 if (!ev->status) { in hci_auth_complete_evt()
2999 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_auth_complete_evt()
3002 mgmt_auth_failed(conn, ev->status); in hci_auth_complete_evt()
3009 if (!ev->status && hci_conn_ssp_enabled(conn)) { in hci_auth_complete_evt()
3011 cp.handle = ev->handle; in hci_auth_complete_evt()
3017 hci_connect_cfm(conn, ev->status); in hci_auth_complete_evt()
3021 hci_auth_cfm(conn, ev->status); in hci_auth_complete_evt()
3029 if (!ev->status) { in hci_auth_complete_evt()
3031 cp.handle = ev->handle; in hci_auth_complete_evt()
3037 hci_encrypt_cfm(conn, ev->status); in hci_auth_complete_evt()
3047 struct hci_ev_remote_name *ev = (void *) skb->data; in hci_remote_name_evt() local
3056 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_name_evt()
3061 if (ev->status == 0) in hci_remote_name_evt()
3062 hci_check_pending_name(hdev, conn, &ev->bdaddr, ev->name, in hci_remote_name_evt()
3063 strnlen(ev->name, HCI_MAX_NAME_LENGTH)); in hci_remote_name_evt()
3065 hci_check_pending_name(hdev, conn, &ev->bdaddr, NULL, 0); in hci_remote_name_evt()
3130 struct hci_ev_encrypt_change *ev = (void *) skb->data; in hci_encrypt_change_evt() local
3133 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_encrypt_change_evt()
3137 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_encrypt_change_evt()
3141 if (!ev->status) { in hci_encrypt_change_evt()
3142 if (ev->encrypt) { in hci_encrypt_change_evt()
3152 if ((conn->type == ACL_LINK && ev->encrypt == 0x02) || in hci_encrypt_change_evt()
3164 if (ev->status && conn->type == LE_LINK) { in hci_encrypt_change_evt()
3173 ev->status = HCI_ERROR_AUTH_FAILURE; in hci_encrypt_change_evt()
3175 if (ev->status && conn->state == BT_CONNECTED) { in hci_encrypt_change_evt()
3176 if (ev->status == HCI_ERROR_PIN_OR_KEY_MISSING) in hci_encrypt_change_evt()
3182 hci_encrypt_cfm(conn, ev->status); in hci_encrypt_change_evt()
3189 if (!ev->status && ev->encrypt && conn->type == ACL_LINK) { in hci_encrypt_change_evt()
3236 hci_encrypt_cfm(conn, ev->status); in hci_encrypt_change_evt()
3245 struct hci_ev_change_link_key_complete *ev = (void *) skb->data; in hci_change_link_key_complete_evt() local
3248 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_change_link_key_complete_evt()
3252 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_change_link_key_complete_evt()
3254 if (!ev->status) in hci_change_link_key_complete_evt()
3259 hci_key_change_cfm(conn, ev->status); in hci_change_link_key_complete_evt()
3268 struct hci_ev_remote_features *ev = (void *) skb->data; in hci_remote_features_evt() local
3271 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_remote_features_evt()
3275 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_features_evt()
3279 if (!ev->status) in hci_remote_features_evt()
3280 memcpy(conn->features[0], ev->features, 8); in hci_remote_features_evt()
3285 if (!ev->status && lmp_ext_feat_capable(hdev) && in hci_remote_features_evt()
3288 cp.handle = ev->handle; in hci_remote_features_evt()
3295 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_features_evt()
3306 hci_connect_cfm(conn, ev->status); in hci_remote_features_evt()
3334 struct hci_ev_cmd_complete *ev = (void *) skb->data; in hci_cmd_complete_evt() local
3336 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_complete_evt()
3337 *status = skb->data[sizeof(*ev)]; in hci_cmd_complete_evt()
3339 skb_pull(skb, sizeof(*ev)); in hci_cmd_complete_evt()
3691 handle_cmd_cnt_and_timer(hdev, ev->ncmd); in hci_cmd_complete_evt()
3711 struct hci_ev_cmd_status *ev = (void *) skb->data; in hci_cmd_status_evt() local
3713 skb_pull(skb, sizeof(*ev)); in hci_cmd_status_evt()
3715 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_status_evt()
3716 *status = ev->status; in hci_cmd_status_evt()
3720 hci_cs_inquiry(hdev, ev->status); in hci_cmd_status_evt()
3724 hci_cs_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3728 hci_cs_disconnect(hdev, ev->status); in hci_cmd_status_evt()
3732 hci_cs_add_sco(hdev, ev->status); in hci_cmd_status_evt()
3736 hci_cs_auth_requested(hdev, ev->status); in hci_cmd_status_evt()
3740 hci_cs_set_conn_encrypt(hdev, ev->status); in hci_cmd_status_evt()
3744 hci_cs_remote_name_req(hdev, ev->status); in hci_cmd_status_evt()
3748 hci_cs_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3752 hci_cs_read_remote_ext_features(hdev, ev->status); in hci_cmd_status_evt()
3756 hci_cs_setup_sync_conn(hdev, ev->status); in hci_cmd_status_evt()
3760 hci_cs_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3764 hci_cs_exit_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3768 hci_cs_switch_role(hdev, ev->status); in hci_cmd_status_evt()
3772 hci_cs_le_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3776 hci_cs_le_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3780 hci_cs_le_start_enc(hdev, ev->status); in hci_cmd_status_evt()
3784 hci_cs_le_ext_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3792 handle_cmd_cnt_and_timer(hdev, ev->ncmd); in hci_cmd_status_evt()
3800 if (ev->status || in hci_cmd_status_evt()
3802 hci_req_cmd_complete(hdev, *opcode, ev->status, req_complete, in hci_cmd_status_evt()
3817 struct hci_ev_hardware_error *ev = (void *) skb->data; in hci_hardware_error_evt() local
3819 hdev->hw_error_code = ev->code; in hci_hardware_error_evt()
3826 struct hci_ev_role_change *ev = (void *) skb->data; in hci_role_change_evt() local
3829 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_role_change_evt()
3833 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_role_change_evt()
3835 if (!ev->status) in hci_role_change_evt()
3836 conn->role = ev->role; in hci_role_change_evt()
3840 hci_role_switch_cfm(conn, ev->status, ev->role); in hci_role_change_evt()
3848 struct hci_ev_num_comp_pkts *ev = (void *) skb->data; in hci_num_comp_pkts_evt() local
3856 if (skb->len < sizeof(*ev) || in hci_num_comp_pkts_evt()
3857 skb->len < struct_size(ev, handles, ev->num_hndl)) { in hci_num_comp_pkts_evt()
3862 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl); in hci_num_comp_pkts_evt()
3864 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_pkts_evt()
3865 struct hci_comp_pkts_info *info = &ev->handles[i]; in hci_num_comp_pkts_evt()
3936 struct hci_ev_num_comp_blocks *ev = (void *) skb->data; in hci_num_comp_blocks_evt() local
3944 if (skb->len < sizeof(*ev) || in hci_num_comp_blocks_evt()
3945 skb->len < struct_size(ev, handles, ev->num_hndl)) { in hci_num_comp_blocks_evt()
3950 BT_DBG("%s num_blocks %d num_hndl %d", hdev->name, ev->num_blocks, in hci_num_comp_blocks_evt()
3951 ev->num_hndl); in hci_num_comp_blocks_evt()
3953 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_blocks_evt()
3954 struct hci_comp_blocks_info *info = &ev->handles[i]; in hci_num_comp_blocks_evt()
3987 struct hci_ev_mode_change *ev = (void *) skb->data; in hci_mode_change_evt() local
3990 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_mode_change_evt()
3994 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_mode_change_evt()
3996 conn->mode = ev->mode; in hci_mode_change_evt()
4007 hci_sco_setup(conn, ev->status); in hci_mode_change_evt()
4015 struct hci_ev_pin_code_req *ev = (void *) skb->data; in hci_pin_code_request_evt() local
4022 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_pin_code_request_evt()
4035 sizeof(ev->bdaddr), &ev->bdaddr); in hci_pin_code_request_evt()
4044 mgmt_pin_code_request(hdev, &ev->bdaddr, secure); in hci_pin_code_request_evt()
4085 struct hci_ev_link_key_req *ev = (void *) skb->data; in hci_link_key_request_evt() local
4097 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_link_key_request_evt()
4100 &ev->bdaddr); in hci_link_key_request_evt()
4105 &ev->bdaddr); in hci_link_key_request_evt()
4107 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_request_evt()
4129 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_link_key_request_evt()
4139 hci_send_cmd(hdev, HCI_OP_LINK_KEY_NEG_REPLY, 6, &ev->bdaddr); in hci_link_key_request_evt()
4145 struct hci_ev_link_key_notify *ev = (void *) skb->data; in hci_link_key_notify_evt() local
4155 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_notify_evt()
4164 conn_set_key(conn, ev->key_type, conn->pin_length); in hci_link_key_notify_evt()
4169 key = hci_add_link_key(hdev, conn, &ev->bdaddr, ev->link_key, in hci_link_key_notify_evt()
4170 ev->key_type, pin_len, &persistent); in hci_link_key_notify_evt()
4177 if (ev->key_type == HCI_LK_CHANGED_COMBINATION) in hci_link_key_notify_evt()
4205 struct hci_ev_clock_offset *ev = (void *) skb->data; in hci_clock_offset_evt() local
4208 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_clock_offset_evt()
4212 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_clock_offset_evt()
4213 if (conn && !ev->status) { in hci_clock_offset_evt()
4218 ie->data.clock_offset = ev->clock_offset; in hci_clock_offset_evt()
4228 struct hci_ev_pkt_type_change *ev = (void *) skb->data; in hci_pkt_type_change_evt() local
4231 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_pkt_type_change_evt()
4235 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_pkt_type_change_evt()
4236 if (conn && !ev->status) in hci_pkt_type_change_evt()
4237 conn->pkt_type = __le16_to_cpu(ev->pkt_type); in hci_pkt_type_change_evt()
4244 struct hci_ev_pscan_rep_mode *ev = (void *) skb->data; in hci_pscan_rep_mode_evt() local
4251 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_pscan_rep_mode_evt()
4253 ie->data.pscan_rep_mode = ev->pscan_rep_mode; in hci_pscan_rep_mode_evt()
4334 struct hci_ev_remote_ext_features *ev = (void *) skb->data; in hci_remote_ext_features_evt() local
4341 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_ext_features_evt()
4345 if (ev->page < HCI_MAX_PAGES) in hci_remote_ext_features_evt()
4346 memcpy(conn->features[ev->page], ev->features, 8); in hci_remote_ext_features_evt()
4348 if (!ev->status && ev->page == 0x01) { in hci_remote_ext_features_evt()
4353 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_ext_features_evt()
4355 if (ev->features[0] & LMP_HOST_SSP) { in hci_remote_ext_features_evt()
4369 if (ev->features[0] & LMP_HOST_SC) in hci_remote_ext_features_evt()
4376 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_ext_features_evt()
4387 hci_connect_cfm(conn, ev->status); in hci_remote_ext_features_evt()
4398 struct hci_ev_sync_conn_complete *ev = (void *) skb->data; in hci_sync_conn_complete_evt() local
4401 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_sync_conn_complete_evt()
4405 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_sync_conn_complete_evt()
4407 if (ev->link_type == ESCO_LINK) in hci_sync_conn_complete_evt()
4419 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_sync_conn_complete_evt()
4424 switch (ev->status) { in hci_sync_conn_complete_evt()
4441 conn->handle = __le16_to_cpu(ev->handle); in hci_sync_conn_complete_evt()
4443 conn->type = ev->link_type; in hci_sync_conn_complete_evt()
4470 bt_dev_dbg(hdev, "SCO connected with air mode: %02x", ev->air_mode); in hci_sync_conn_complete_evt()
4472 switch (ev->air_mode) { in hci_sync_conn_complete_evt()
4483 hci_connect_cfm(conn, ev->status); in hci_sync_conn_complete_evt()
4484 if (ev->status) in hci_sync_conn_complete_evt()
4561 struct hci_ev_key_refresh_complete *ev = (void *) skb->data; in hci_key_refresh_complete_evt() local
4564 BT_DBG("%s status 0x%2.2x handle 0x%4.4x", hdev->name, ev->status, in hci_key_refresh_complete_evt()
4565 __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4569 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
4579 if (!ev->status) in hci_key_refresh_complete_evt()
4584 if (ev->status && conn->state == BT_CONNECTED) { in hci_key_refresh_complete_evt()
4591 if (!ev->status) in hci_key_refresh_complete_evt()
4594 hci_connect_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4597 hci_auth_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
4670 struct hci_ev_io_capa_request *ev = (void *) skb->data; in hci_io_capa_request_evt() local
4677 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_request_evt()
4694 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4726 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4739 struct hci_ev_io_capa_reply *ev = (void *) skb->data; in hci_io_capa_reply_evt() local
4746 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_reply_evt()
4750 conn->remote_cap = ev->capability; in hci_io_capa_reply_evt()
4751 conn->remote_auth = ev->authentication; in hci_io_capa_reply_evt()
4760 struct hci_ev_user_confirm_req *ev = (void *) skb->data; in hci_user_confirm_request_evt() local
4771 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_confirm_request_evt()
4787 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4813 if (hci_find_link_key(hdev, &ev->bdaddr)) { in hci_user_confirm_request_evt()
4830 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4835 mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, in hci_user_confirm_request_evt()
4836 le32_to_cpu(ev->passkey), confirm_hint); in hci_user_confirm_request_evt()
4845 struct hci_ev_user_passkey_req *ev = (void *) skb->data; in hci_user_passkey_request_evt() local
4850 mgmt_user_passkey_request(hdev, &ev->bdaddr, ACL_LINK, 0); in hci_user_passkey_request_evt()
4856 struct hci_ev_user_passkey_notify *ev = (void *) skb->data; in hci_user_passkey_notify_evt() local
4861 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_passkey_notify_evt()
4865 conn->passkey_notify = __le32_to_cpu(ev->passkey); in hci_user_passkey_notify_evt()
4876 struct hci_ev_keypress_notify *ev = (void *) skb->data; in hci_keypress_notify_evt() local
4881 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_keypress_notify_evt()
4885 switch (ev->type) { in hci_keypress_notify_evt()
4915 struct hci_ev_simple_pair_complete *ev = (void *) skb->data; in hci_simple_pair_complete_evt() local
4922 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_simple_pair_complete_evt()
4934 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status) in hci_simple_pair_complete_evt()
4935 mgmt_auth_failed(conn, ev->status); in hci_simple_pair_complete_evt()
4946 struct hci_ev_remote_host_features *ev = (void *) skb->data; in hci_remote_host_features_evt() local
4954 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_host_features_evt()
4956 memcpy(conn->features[1], ev->features, 8); in hci_remote_host_features_evt()
4958 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_remote_host_features_evt()
4960 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_host_features_evt()
4968 struct hci_ev_remote_oob_data_request *ev = (void *) skb->data; in hci_remote_oob_data_request_evt() local
4978 data = hci_find_remote_oob_data(hdev, &ev->bdaddr, BDADDR_BREDR); in hci_remote_oob_data_request_evt()
4982 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4991 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
5007 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
5022 struct hci_ev_channel_selected *ev = (void *)skb->data; in hci_chan_selected_evt() local
5025 BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle); in hci_chan_selected_evt()
5027 skb_pull(skb, sizeof(*ev)); in hci_chan_selected_evt()
5029 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_chan_selected_evt()
5039 struct hci_ev_phy_link_complete *ev = (void *) skb->data; in hci_phy_link_complete_evt() local
5042 BT_DBG("%s handle 0x%2.2x status 0x%2.2x", hdev->name, ev->phy_handle, in hci_phy_link_complete_evt()
5043 ev->status); in hci_phy_link_complete_evt()
5047 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_phy_link_complete_evt()
5054 if (ev->status) { in hci_phy_link_complete_evt()
5079 struct hci_ev_logical_link_complete *ev = (void *) skb->data; in hci_loglink_complete_evt() local
5085 hdev->name, le16_to_cpu(ev->handle), ev->phy_handle, in hci_loglink_complete_evt()
5086 ev->status); in hci_loglink_complete_evt()
5088 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_loglink_complete_evt()
5097 hchan->handle = le16_to_cpu(ev->handle); in hci_loglink_complete_evt()
5119 struct hci_ev_disconn_logical_link_complete *ev = (void *) skb->data; in hci_disconn_loglink_complete_evt() local
5123 le16_to_cpu(ev->handle), ev->status); in hci_disconn_loglink_complete_evt()
5125 if (ev->status) in hci_disconn_loglink_complete_evt()
5130 hchan = hci_chan_lookup_handle(hdev, le16_to_cpu(ev->handle)); in hci_disconn_loglink_complete_evt()
5134 amp_destroy_logical_link(hchan, ev->reason); in hci_disconn_loglink_complete_evt()
5143 struct hci_ev_disconn_phy_link_complete *ev = (void *) skb->data; in hci_disconn_phylink_complete_evt() local
5146 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_phylink_complete_evt()
5148 if (ev->status) in hci_disconn_phylink_complete_evt()
5153 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_disconn_phylink_complete_evt()
5381 struct hci_ev_le_conn_complete *ev = (void *) skb->data; in hci_le_conn_complete_evt() local
5383 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_complete_evt()
5385 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_conn_complete_evt()
5386 NULL, ev->role, le16_to_cpu(ev->handle), in hci_le_conn_complete_evt()
5387 le16_to_cpu(ev->interval), in hci_le_conn_complete_evt()
5388 le16_to_cpu(ev->latency), in hci_le_conn_complete_evt()
5389 le16_to_cpu(ev->supervision_timeout)); in hci_le_conn_complete_evt()
5395 struct hci_ev_le_enh_conn_complete *ev = (void *) skb->data; in hci_le_enh_conn_complete_evt() local
5397 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_enh_conn_complete_evt()
5399 le_conn_complete_evt(hdev, ev->status, &ev->bdaddr, ev->bdaddr_type, in hci_le_enh_conn_complete_evt()
5400 &ev->local_rpa, ev->role, le16_to_cpu(ev->handle), in hci_le_enh_conn_complete_evt()
5401 le16_to_cpu(ev->interval), in hci_le_enh_conn_complete_evt()
5402 le16_to_cpu(ev->latency), in hci_le_enh_conn_complete_evt()
5403 le16_to_cpu(ev->supervision_timeout)); in hci_le_enh_conn_complete_evt()
5413 struct hci_evt_le_ext_adv_set_term *ev = (void *) skb->data; in hci_le_ext_adv_term_evt() local
5417 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_ext_adv_term_evt()
5419 adv = hci_find_adv_instance(hdev, ev->handle); in hci_le_ext_adv_term_evt()
5421 if (ev->status) { in hci_le_ext_adv_term_evt()
5426 hci_remove_adv_instance(hdev, ev->handle); in hci_le_ext_adv_term_evt()
5427 mgmt_advertising_removed(NULL, hdev, ev->handle); in hci_le_ext_adv_term_evt()
5435 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->conn_handle)); in hci_le_ext_adv_term_evt()
5440 conn->adv_instance = ev->handle; in hci_le_ext_adv_term_evt()
5446 if (!ev->handle) { in hci_le_ext_adv_term_evt()
5459 struct hci_ev_le_conn_update_complete *ev = (void *) skb->data; in hci_le_conn_update_complete_evt() local
5462 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_update_complete_evt()
5464 if (ev->status) in hci_le_conn_update_complete_evt()
5469 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_conn_update_complete_evt()
5471 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_update_complete_evt()
5472 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_update_complete_evt()
5473 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_update_complete_evt()
5780 struct hci_ev_le_advertising_info *ev = ptr; in hci_le_adv_report_evt() local
5783 if (ev->length <= HCI_MAX_AD_LENGTH) { in hci_le_adv_report_evt()
5784 rssi = ev->data[ev->length]; in hci_le_adv_report_evt()
5785 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_adv_report_evt()
5786 ev->bdaddr_type, NULL, 0, rssi, in hci_le_adv_report_evt()
5787 ev->data, ev->length, false); in hci_le_adv_report_evt()
5792 ptr += sizeof(*ev) + ev->length + 1; in hci_le_adv_report_evt()
5850 struct hci_ev_le_ext_adv_report *ev = ptr; in hci_le_ext_adv_report_evt() local
5854 evt_type = __le16_to_cpu(ev->evt_type); in hci_le_ext_adv_report_evt()
5857 process_adv_report(hdev, legacy_evt_type, &ev->bdaddr, in hci_le_ext_adv_report_evt()
5858 ev->bdaddr_type, NULL, 0, ev->rssi, in hci_le_ext_adv_report_evt()
5859 ev->data, ev->length, in hci_le_ext_adv_report_evt()
5863 ptr += sizeof(*ev) + ev->length; in hci_le_ext_adv_report_evt()
5872 struct hci_ev_le_remote_feat_complete *ev = (void *)skb->data; in hci_le_remote_feat_complete_evt() local
5875 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_remote_feat_complete_evt()
5879 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_remote_feat_complete_evt()
5881 if (!ev->status) in hci_le_remote_feat_complete_evt()
5882 memcpy(conn->features[0], ev->features, 8); in hci_le_remote_feat_complete_evt()
5896 if (!conn->out && ev->status == 0x1a && in hci_le_remote_feat_complete_evt()
5900 status = ev->status; in hci_le_remote_feat_complete_evt()
5913 struct hci_ev_le_ltk_req *ev = (void *) skb->data; in hci_le_ltk_request_evt() local
5919 BT_DBG("%s handle 0x%4.4x", hdev->name, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5923 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5933 if (ev->ediv || ev->rand) in hci_le_ltk_request_evt()
5937 if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) in hci_le_ltk_request_evt()
5970 neg.handle = ev->handle; in hci_le_ltk_request_evt()
5990 struct hci_ev_le_remote_conn_param_req *ev = (void *) skb->data; in hci_le_remote_conn_param_req_evt() local
5995 handle = le16_to_cpu(ev->handle); in hci_le_remote_conn_param_req_evt()
5996 min = le16_to_cpu(ev->interval_min); in hci_le_remote_conn_param_req_evt()
5997 max = le16_to_cpu(ev->interval_max); in hci_le_remote_conn_param_req_evt()
5998 latency = le16_to_cpu(ev->latency); in hci_le_remote_conn_param_req_evt()
5999 timeout = le16_to_cpu(ev->timeout); in hci_le_remote_conn_param_req_evt()
6034 cp.handle = ev->handle; in hci_le_remote_conn_param_req_evt()
6035 cp.interval_min = ev->interval_min; in hci_le_remote_conn_param_req_evt()
6036 cp.interval_max = ev->interval_max; in hci_le_remote_conn_param_req_evt()
6037 cp.latency = ev->latency; in hci_le_remote_conn_param_req_evt()
6038 cp.timeout = ev->timeout; in hci_le_remote_conn_param_req_evt()
6049 struct hci_ev_le_direct_adv_info *ev = (void *)&skb->data[1]; in hci_le_direct_adv_report_evt() local
6051 if (!num_reports || skb->len < num_reports * sizeof(*ev) + 1) in hci_le_direct_adv_report_evt()
6056 for (; num_reports; num_reports--, ev++) in hci_le_direct_adv_report_evt()
6057 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_direct_adv_report_evt()
6058 ev->bdaddr_type, &ev->direct_addr, in hci_le_direct_adv_report_evt()
6059 ev->direct_addr_type, ev->rssi, NULL, 0, in hci_le_direct_adv_report_evt()
6067 struct hci_ev_le_phy_update_complete *ev = (void *) skb->data; in hci_le_phy_update_evt() local
6070 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_phy_update_evt()
6072 if (ev->status) in hci_le_phy_update_evt()
6077 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_phy_update_evt()
6081 conn->le_tx_phy = ev->tx_phy; in hci_le_phy_update_evt()
6082 conn->le_rx_phy = ev->rx_phy; in hci_le_phy_update_evt()
6147 struct hci_ev_cmd_complete *ev; in hci_get_cmd_complete() local
6179 if (skb->len < sizeof(*ev)) { in hci_get_cmd_complete()
6184 ev = (void *) skb->data; in hci_get_cmd_complete()
6185 skb_pull(skb, sizeof(*ev)); in hci_get_cmd_complete()
6187 if (opcode != __le16_to_cpu(ev->opcode)) { in hci_get_cmd_complete()
6189 __le16_to_cpu(ev->opcode)); in hci_get_cmd_complete()