• Home
  • Raw
  • Download

Lines Matching refs:ev

2147 	struct hci_ev_conn_complete *ev = (void *) skb->data;  in hci_conn_complete_evt()  local
2154 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_conn_complete_evt()
2156 if (ev->link_type != SCO_LINK) in hci_conn_complete_evt()
2159 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_conn_complete_evt()
2166 if (!ev->status) { in hci_conn_complete_evt()
2167 conn->handle = __le16_to_cpu(ev->handle); in hci_conn_complete_evt()
2174 !hci_find_link_key(hdev, &ev->bdaddr)) in hci_conn_complete_evt()
2193 cp.handle = ev->handle; in hci_conn_complete_evt()
2203 cp.handle = ev->handle; in hci_conn_complete_evt()
2212 conn->dst_type, ev->status); in hci_conn_complete_evt()
2216 hci_sco_setup(conn, ev->status); in hci_conn_complete_evt()
2218 if (ev->status) { in hci_conn_complete_evt()
2219 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2221 } else if (ev->link_type != ACL_LINK) in hci_conn_complete_evt()
2222 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2241 struct hci_ev_conn_request *ev = (void *) skb->data; in hci_conn_request_evt() local
2247 BT_DBG("%s bdaddr %pMR type 0x%x", hdev->name, &ev->bdaddr, in hci_conn_request_evt()
2248 ev->link_type); in hci_conn_request_evt()
2250 mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type, in hci_conn_request_evt()
2254 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2258 if (hci_bdaddr_list_lookup(&hdev->blacklist, &ev->bdaddr, in hci_conn_request_evt()
2260 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2270 !hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr, in hci_conn_request_evt()
2272 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2280 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_conn_request_evt()
2282 memcpy(ie->data.dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2284 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, in hci_conn_request_evt()
2285 &ev->bdaddr); in hci_conn_request_evt()
2287 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_request_evt()
2296 memcpy(conn->dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2300 if (ev->link_type == ACL_LINK || in hci_conn_request_evt()
2305 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2317 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2352 struct hci_ev_disconn_complete *ev = (void *) skb->data; in hci_disconn_complete_evt() local
2353 u8 reason = hci_to_mgmt_reason(ev->reason); in hci_disconn_complete_evt()
2359 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_complete_evt()
2363 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_disconn_complete_evt()
2367 if (ev->status) { in hci_disconn_complete_evt()
2369 conn->dst_type, ev->status); in hci_disconn_complete_evt()
2390 if (ev->reason != HCI_ERROR_CONNECTION_TIMEOUT) in hci_disconn_complete_evt()
2408 hci_disconn_cfm(conn, ev->reason); in hci_disconn_complete_evt()
2430 struct hci_ev_auth_complete *ev = (void *) skb->data; in hci_auth_complete_evt() local
2433 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_auth_complete_evt()
2437 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_auth_complete_evt()
2441 if (!ev->status) { in hci_auth_complete_evt()
2450 mgmt_auth_failed(conn, ev->status); in hci_auth_complete_evt()
2457 if (!ev->status && hci_conn_ssp_enabled(conn)) { in hci_auth_complete_evt()
2459 cp.handle = ev->handle; in hci_auth_complete_evt()
2465 hci_connect_cfm(conn, ev->status); in hci_auth_complete_evt()
2469 hci_auth_cfm(conn, ev->status); in hci_auth_complete_evt()
2477 if (!ev->status) { in hci_auth_complete_evt()
2479 cp.handle = ev->handle; in hci_auth_complete_evt()
2485 hci_encrypt_cfm(conn, ev->status); in hci_auth_complete_evt()
2495 struct hci_ev_remote_name *ev = (void *) skb->data; in hci_remote_name_evt() local
2504 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_name_evt()
2509 if (ev->status == 0) in hci_remote_name_evt()
2510 hci_check_pending_name(hdev, conn, &ev->bdaddr, ev->name, in hci_remote_name_evt()
2511 strnlen(ev->name, HCI_MAX_NAME_LENGTH)); in hci_remote_name_evt()
2513 hci_check_pending_name(hdev, conn, &ev->bdaddr, NULL, 0); in hci_remote_name_evt()
2579 struct hci_ev_encrypt_change *ev = (void *) skb->data; in hci_encrypt_change_evt() local
2582 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_encrypt_change_evt()
2586 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_encrypt_change_evt()
2590 if (!ev->status) { in hci_encrypt_change_evt()
2591 if (ev->encrypt) { in hci_encrypt_change_evt()
2601 if ((conn->type == ACL_LINK && ev->encrypt == 0x02) || in hci_encrypt_change_evt()
2613 if (ev->status && conn->type == LE_LINK) in hci_encrypt_change_evt()
2620 ev->status = HCI_ERROR_AUTH_FAILURE; in hci_encrypt_change_evt()
2622 if (ev->status && conn->state == BT_CONNECTED) { in hci_encrypt_change_evt()
2626 hci_encrypt_cfm(conn, ev->status); in hci_encrypt_change_evt()
2633 if (!ev->status && ev->encrypt && conn->type == ACL_LINK) { in hci_encrypt_change_evt()
2661 hci_encrypt_cfm(conn, ev->status); in hci_encrypt_change_evt()
2670 struct hci_ev_change_link_key_complete *ev = (void *) skb->data; in hci_change_link_key_complete_evt() local
2673 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_change_link_key_complete_evt()
2677 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_change_link_key_complete_evt()
2679 if (!ev->status) in hci_change_link_key_complete_evt()
2684 hci_key_change_cfm(conn, ev->status); in hci_change_link_key_complete_evt()
2693 struct hci_ev_remote_features *ev = (void *) skb->data; in hci_remote_features_evt() local
2696 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_remote_features_evt()
2700 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_features_evt()
2704 if (!ev->status) in hci_remote_features_evt()
2705 memcpy(conn->features[0], ev->features, 8); in hci_remote_features_evt()
2710 if (!ev->status && lmp_ext_feat_capable(hdev) && in hci_remote_features_evt()
2713 cp.handle = ev->handle; in hci_remote_features_evt()
2720 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_features_evt()
2731 hci_connect_cfm(conn, ev->status); in hci_remote_features_evt()
2744 struct hci_ev_cmd_complete *ev = (void *) skb->data; in hci_cmd_complete_evt() local
2746 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_complete_evt()
2747 *status = skb->data[sizeof(*ev)]; in hci_cmd_complete_evt()
2749 skb_pull(skb, sizeof(*ev)); in hci_cmd_complete_evt()
3028 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_complete_evt()
3043 struct hci_ev_cmd_status *ev = (void *) skb->data; in hci_cmd_status_evt() local
3045 skb_pull(skb, sizeof(*ev)); in hci_cmd_status_evt()
3047 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_status_evt()
3048 *status = ev->status; in hci_cmd_status_evt()
3052 hci_cs_inquiry(hdev, ev->status); in hci_cmd_status_evt()
3056 hci_cs_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3060 hci_cs_disconnect(hdev, ev->status); in hci_cmd_status_evt()
3064 hci_cs_add_sco(hdev, ev->status); in hci_cmd_status_evt()
3068 hci_cs_auth_requested(hdev, ev->status); in hci_cmd_status_evt()
3072 hci_cs_set_conn_encrypt(hdev, ev->status); in hci_cmd_status_evt()
3076 hci_cs_remote_name_req(hdev, ev->status); in hci_cmd_status_evt()
3080 hci_cs_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3084 hci_cs_read_remote_ext_features(hdev, ev->status); in hci_cmd_status_evt()
3088 hci_cs_setup_sync_conn(hdev, ev->status); in hci_cmd_status_evt()
3092 hci_cs_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3096 hci_cs_exit_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3100 hci_cs_switch_role(hdev, ev->status); in hci_cmd_status_evt()
3104 hci_cs_le_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3108 hci_cs_le_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3112 hci_cs_le_start_enc(hdev, ev->status); in hci_cmd_status_evt()
3123 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_status_evt()
3132 if (ev->status || in hci_cmd_status_evt()
3134 hci_req_cmd_complete(hdev, *opcode, ev->status, req_complete, in hci_cmd_status_evt()
3143 struct hci_ev_hardware_error *ev = (void *) skb->data; in hci_hardware_error_evt() local
3145 hdev->hw_error_code = ev->code; in hci_hardware_error_evt()
3152 struct hci_ev_role_change *ev = (void *) skb->data; in hci_role_change_evt() local
3155 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_role_change_evt()
3159 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_role_change_evt()
3161 if (!ev->status) in hci_role_change_evt()
3162 conn->role = ev->role; in hci_role_change_evt()
3166 hci_role_switch_cfm(conn, ev->status, ev->role); in hci_role_change_evt()
3174 struct hci_ev_num_comp_pkts *ev = (void *) skb->data; in hci_num_comp_pkts_evt() local
3182 if (skb->len < sizeof(*ev) || skb->len < sizeof(*ev) + in hci_num_comp_pkts_evt()
3183 ev->num_hndl * sizeof(struct hci_comp_pkts_info)) { in hci_num_comp_pkts_evt()
3188 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl); in hci_num_comp_pkts_evt()
3190 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_pkts_evt()
3191 struct hci_comp_pkts_info *info = &ev->handles[i]; in hci_num_comp_pkts_evt()
3261 struct hci_ev_num_comp_blocks *ev = (void *) skb->data; in hci_num_comp_blocks_evt() local
3269 if (skb->len < sizeof(*ev) || skb->len < sizeof(*ev) + in hci_num_comp_blocks_evt()
3270 ev->num_hndl * sizeof(struct hci_comp_blocks_info)) { in hci_num_comp_blocks_evt()
3275 BT_DBG("%s num_blocks %d num_hndl %d", hdev->name, ev->num_blocks, in hci_num_comp_blocks_evt()
3276 ev->num_hndl); in hci_num_comp_blocks_evt()
3278 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_blocks_evt()
3279 struct hci_comp_blocks_info *info = &ev->handles[i]; in hci_num_comp_blocks_evt()
3311 struct hci_ev_mode_change *ev = (void *) skb->data; in hci_mode_change_evt() local
3314 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_mode_change_evt()
3318 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_mode_change_evt()
3320 conn->mode = ev->mode; in hci_mode_change_evt()
3331 hci_sco_setup(conn, ev->status); in hci_mode_change_evt()
3339 struct hci_ev_pin_code_req *ev = (void *) skb->data; in hci_pin_code_request_evt() local
3346 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_pin_code_request_evt()
3359 sizeof(ev->bdaddr), &ev->bdaddr); in hci_pin_code_request_evt()
3368 mgmt_pin_code_request(hdev, &ev->bdaddr, secure); in hci_pin_code_request_evt()
3409 struct hci_ev_link_key_req *ev = (void *) skb->data; in hci_link_key_request_evt() local
3421 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_link_key_request_evt()
3424 &ev->bdaddr); in hci_link_key_request_evt()
3429 &ev->bdaddr); in hci_link_key_request_evt()
3431 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_request_evt()
3453 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_link_key_request_evt()
3463 hci_send_cmd(hdev, HCI_OP_LINK_KEY_NEG_REPLY, 6, &ev->bdaddr); in hci_link_key_request_evt()
3469 struct hci_ev_link_key_notify *ev = (void *) skb->data; in hci_link_key_notify_evt() local
3479 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_notify_evt()
3488 conn_set_key(conn, ev->key_type, conn->pin_length); in hci_link_key_notify_evt()
3493 key = hci_add_link_key(hdev, conn, &ev->bdaddr, ev->link_key, in hci_link_key_notify_evt()
3494 ev->key_type, pin_len, &persistent); in hci_link_key_notify_evt()
3501 if (ev->key_type == HCI_LK_CHANGED_COMBINATION) in hci_link_key_notify_evt()
3529 struct hci_ev_clock_offset *ev = (void *) skb->data; in hci_clock_offset_evt() local
3532 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_clock_offset_evt()
3536 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_clock_offset_evt()
3537 if (conn && !ev->status) { in hci_clock_offset_evt()
3542 ie->data.clock_offset = ev->clock_offset; in hci_clock_offset_evt()
3552 struct hci_ev_pkt_type_change *ev = (void *) skb->data; in hci_pkt_type_change_evt() local
3555 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_pkt_type_change_evt()
3559 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_pkt_type_change_evt()
3560 if (conn && !ev->status) in hci_pkt_type_change_evt()
3561 conn->pkt_type = __le16_to_cpu(ev->pkt_type); in hci_pkt_type_change_evt()
3568 struct hci_ev_pscan_rep_mode *ev = (void *) skb->data; in hci_pscan_rep_mode_evt() local
3575 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_pscan_rep_mode_evt()
3577 ie->data.pscan_rep_mode = ev->pscan_rep_mode; in hci_pscan_rep_mode_evt()
3658 struct hci_ev_remote_ext_features *ev = (void *) skb->data; in hci_remote_ext_features_evt() local
3665 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_ext_features_evt()
3669 if (ev->page < HCI_MAX_PAGES) in hci_remote_ext_features_evt()
3670 memcpy(conn->features[ev->page], ev->features, 8); in hci_remote_ext_features_evt()
3672 if (!ev->status && ev->page == 0x01) { in hci_remote_ext_features_evt()
3677 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_ext_features_evt()
3679 if (ev->features[0] & LMP_HOST_SSP) { in hci_remote_ext_features_evt()
3693 if (ev->features[0] & LMP_HOST_SC) in hci_remote_ext_features_evt()
3700 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_ext_features_evt()
3711 hci_connect_cfm(conn, ev->status); in hci_remote_ext_features_evt()
3722 struct hci_ev_sync_conn_complete *ev = (void *) skb->data; in hci_sync_conn_complete_evt() local
3725 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_sync_conn_complete_evt()
3729 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_sync_conn_complete_evt()
3731 if (ev->link_type == ESCO_LINK) in hci_sync_conn_complete_evt()
3743 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_sync_conn_complete_evt()
3748 switch (ev->status) { in hci_sync_conn_complete_evt()
3765 conn->handle = __le16_to_cpu(ev->handle); in hci_sync_conn_complete_evt()
3767 conn->type = ev->link_type; in hci_sync_conn_complete_evt()
3794 hci_connect_cfm(conn, ev->status); in hci_sync_conn_complete_evt()
3795 if (ev->status) in hci_sync_conn_complete_evt()
3872 struct hci_ev_key_refresh_complete *ev = (void *) skb->data; in hci_key_refresh_complete_evt() local
3875 BT_DBG("%s status 0x%2.2x handle 0x%4.4x", hdev->name, ev->status, in hci_key_refresh_complete_evt()
3876 __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
3880 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
3890 if (!ev->status) in hci_key_refresh_complete_evt()
3895 if (ev->status && conn->state == BT_CONNECTED) { in hci_key_refresh_complete_evt()
3902 if (!ev->status) in hci_key_refresh_complete_evt()
3905 hci_connect_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
3908 hci_auth_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
3981 struct hci_ev_io_capa_request *ev = (void *) skb->data; in hci_io_capa_request_evt() local
3988 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_request_evt()
4005 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4037 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4050 struct hci_ev_io_capa_reply *ev = (void *) skb->data; in hci_io_capa_reply_evt() local
4057 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_reply_evt()
4061 conn->remote_cap = ev->capability; in hci_io_capa_reply_evt()
4062 conn->remote_auth = ev->authentication; in hci_io_capa_reply_evt()
4071 struct hci_ev_user_confirm_req *ev = (void *) skb->data; in hci_user_confirm_request_evt() local
4082 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_confirm_request_evt()
4098 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4131 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4136 mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, in hci_user_confirm_request_evt()
4137 le32_to_cpu(ev->passkey), confirm_hint); in hci_user_confirm_request_evt()
4146 struct hci_ev_user_passkey_req *ev = (void *) skb->data; in hci_user_passkey_request_evt() local
4151 mgmt_user_passkey_request(hdev, &ev->bdaddr, ACL_LINK, 0); in hci_user_passkey_request_evt()
4157 struct hci_ev_user_passkey_notify *ev = (void *) skb->data; in hci_user_passkey_notify_evt() local
4162 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_passkey_notify_evt()
4166 conn->passkey_notify = __le32_to_cpu(ev->passkey); in hci_user_passkey_notify_evt()
4177 struct hci_ev_keypress_notify *ev = (void *) skb->data; in hci_keypress_notify_evt() local
4182 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_keypress_notify_evt()
4186 switch (ev->type) { in hci_keypress_notify_evt()
4216 struct hci_ev_simple_pair_complete *ev = (void *) skb->data; in hci_simple_pair_complete_evt() local
4223 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_simple_pair_complete_evt()
4235 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status) in hci_simple_pair_complete_evt()
4236 mgmt_auth_failed(conn, ev->status); in hci_simple_pair_complete_evt()
4247 struct hci_ev_remote_host_features *ev = (void *) skb->data; in hci_remote_host_features_evt() local
4255 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_host_features_evt()
4257 memcpy(conn->features[1], ev->features, 8); in hci_remote_host_features_evt()
4259 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_remote_host_features_evt()
4261 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_host_features_evt()
4269 struct hci_ev_remote_oob_data_request *ev = (void *) skb->data; in hci_remote_oob_data_request_evt() local
4279 data = hci_find_remote_oob_data(hdev, &ev->bdaddr, BDADDR_BREDR); in hci_remote_oob_data_request_evt()
4283 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4292 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4308 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4323 struct hci_ev_channel_selected *ev = (void *)skb->data; in hci_chan_selected_evt() local
4326 BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle); in hci_chan_selected_evt()
4328 skb_pull(skb, sizeof(*ev)); in hci_chan_selected_evt()
4330 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_chan_selected_evt()
4340 struct hci_ev_phy_link_complete *ev = (void *) skb->data; in hci_phy_link_complete_evt() local
4343 BT_DBG("%s handle 0x%2.2x status 0x%2.2x", hdev->name, ev->phy_handle, in hci_phy_link_complete_evt()
4344 ev->status); in hci_phy_link_complete_evt()
4348 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_phy_link_complete_evt()
4359 if (ev->status) { in hci_phy_link_complete_evt()
4384 struct hci_ev_logical_link_complete *ev = (void *) skb->data; in hci_loglink_complete_evt() local
4390 hdev->name, le16_to_cpu(ev->handle), ev->phy_handle, in hci_loglink_complete_evt()
4391 ev->status); in hci_loglink_complete_evt()
4393 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_loglink_complete_evt()
4402 hchan->handle = le16_to_cpu(ev->handle); in hci_loglink_complete_evt()
4424 struct hci_ev_disconn_logical_link_complete *ev = (void *) skb->data; in hci_disconn_loglink_complete_evt() local
4428 le16_to_cpu(ev->handle), ev->status); in hci_disconn_loglink_complete_evt()
4430 if (ev->status) in hci_disconn_loglink_complete_evt()
4435 hchan = hci_chan_lookup_handle(hdev, le16_to_cpu(ev->handle)); in hci_disconn_loglink_complete_evt()
4439 amp_destroy_logical_link(hchan, ev->reason); in hci_disconn_loglink_complete_evt()
4448 struct hci_ev_disconn_phy_link_complete *ev = (void *) skb->data; in hci_disconn_phylink_complete_evt() local
4451 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_phylink_complete_evt()
4453 if (ev->status) in hci_disconn_phylink_complete_evt()
4458 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_disconn_phylink_complete_evt()
4470 struct hci_ev_le_conn_complete *ev = (void *) skb->data; in hci_le_conn_complete_evt() local
4476 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_complete_evt()
4487 conn = hci_conn_add(hdev, LE_LINK, &ev->bdaddr, ev->role); in hci_le_conn_complete_evt()
4493 conn->dst_type = ev->bdaddr_type; in hci_le_conn_complete_evt()
4504 conn->resp_addr_type = ev->bdaddr_type; in hci_le_conn_complete_evt()
4505 bacpy(&conn->resp_addr, &ev->bdaddr); in hci_le_conn_complete_evt()
4529 conn->init_addr_type = ev->bdaddr_type; in hci_le_conn_complete_evt()
4530 bacpy(&conn->init_addr, &ev->bdaddr); in hci_le_conn_complete_evt()
4556 if (ev->status) { in hci_le_conn_complete_evt()
4557 hci_le_conn_failed(conn, ev->status); in hci_le_conn_complete_evt()
4576 conn->handle = __le16_to_cpu(ev->handle); in hci_le_conn_complete_evt()
4579 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_complete_evt()
4580 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_complete_evt()
4581 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_complete_evt()
4586 if (!ev->status) { in hci_le_conn_complete_evt()
4608 hci_connect_cfm(conn, ev->status); in hci_le_conn_complete_evt()
4611 hci_connect_cfm(conn, ev->status); in hci_le_conn_complete_evt()
4633 struct hci_ev_le_conn_update_complete *ev = (void *) skb->data; in hci_le_conn_update_complete_evt() local
4636 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_update_complete_evt()
4638 if (ev->status) in hci_le_conn_update_complete_evt()
4643 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_conn_update_complete_evt()
4645 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_update_complete_evt()
4646 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_update_complete_evt()
4647 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_update_complete_evt()
4940 struct hci_ev_le_advertising_info *ev = ptr; in hci_le_adv_report_evt() local
4943 if (ptr > (void *)skb_tail_pointer(skb) - sizeof(*ev)) { in hci_le_adv_report_evt()
4948 if (ev->length <= HCI_MAX_AD_LENGTH && in hci_le_adv_report_evt()
4949 ev->data + ev->length <= skb_tail_pointer(skb)) { in hci_le_adv_report_evt()
4950 rssi = ev->data[ev->length]; in hci_le_adv_report_evt()
4951 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_adv_report_evt()
4952 ev->bdaddr_type, NULL, 0, rssi, in hci_le_adv_report_evt()
4953 ev->data, ev->length); in hci_le_adv_report_evt()
4958 ptr += sizeof(*ev) + ev->length + 1; in hci_le_adv_report_evt()
4967 struct hci_ev_le_remote_feat_complete *ev = (void *)skb->data; in hci_le_remote_feat_complete_evt() local
4970 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_remote_feat_complete_evt()
4974 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_remote_feat_complete_evt()
4976 if (!ev->status) in hci_le_remote_feat_complete_evt()
4977 memcpy(conn->features[0], ev->features, 8); in hci_le_remote_feat_complete_evt()
4992 !conn->out && ev->status == 0x1a) in hci_le_remote_feat_complete_evt()
4995 status = ev->status; in hci_le_remote_feat_complete_evt()
5008 struct hci_ev_le_ltk_req *ev = (void *) skb->data; in hci_le_ltk_request_evt() local
5014 BT_DBG("%s handle 0x%4.4x", hdev->name, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5018 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
5028 if (ev->ediv || ev->rand) in hci_le_ltk_request_evt()
5032 if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) in hci_le_ltk_request_evt()
5065 neg.handle = ev->handle; in hci_le_ltk_request_evt()
5085 struct hci_ev_le_remote_conn_param_req *ev = (void *) skb->data; in hci_le_remote_conn_param_req_evt() local
5090 handle = le16_to_cpu(ev->handle); in hci_le_remote_conn_param_req_evt()
5091 min = le16_to_cpu(ev->interval_min); in hci_le_remote_conn_param_req_evt()
5092 max = le16_to_cpu(ev->interval_max); in hci_le_remote_conn_param_req_evt()
5093 latency = le16_to_cpu(ev->latency); in hci_le_remote_conn_param_req_evt()
5094 timeout = le16_to_cpu(ev->timeout); in hci_le_remote_conn_param_req_evt()
5129 cp.handle = ev->handle; in hci_le_remote_conn_param_req_evt()
5130 cp.interval_min = ev->interval_min; in hci_le_remote_conn_param_req_evt()
5131 cp.interval_max = ev->interval_max; in hci_le_remote_conn_param_req_evt()
5132 cp.latency = ev->latency; in hci_le_remote_conn_param_req_evt()
5133 cp.timeout = ev->timeout; in hci_le_remote_conn_param_req_evt()
5144 struct hci_ev_le_direct_adv_info *ev = (void *)&skb->data[1]; in hci_le_direct_adv_report_evt() local
5146 if (!num_reports || skb->len < num_reports * sizeof(*ev) + 1) in hci_le_direct_adv_report_evt()
5151 for (; num_reports; num_reports--, ev++) in hci_le_direct_adv_report_evt()
5152 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_direct_adv_report_evt()
5153 ev->bdaddr_type, &ev->direct_addr, in hci_le_direct_adv_report_evt()
5154 ev->direct_addr_type, ev->rssi, NULL, 0); in hci_le_direct_adv_report_evt()
5202 struct hci_ev_cmd_complete *ev; in hci_get_cmd_complete() local
5233 if (skb->len < sizeof(*ev)) { in hci_get_cmd_complete()
5238 ev = (void *) skb->data; in hci_get_cmd_complete()
5239 skb_pull(skb, sizeof(*ev)); in hci_get_cmd_complete()
5241 if (opcode != __le16_to_cpu(ev->opcode)) { in hci_get_cmd_complete()
5243 __le16_to_cpu(ev->opcode)); in hci_get_cmd_complete()