Lines Matching refs:ev

2218 	struct hci_ev_conn_complete *ev = (void *) skb->data;  in hci_conn_complete_evt()  local
2225 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_conn_complete_evt()
2227 if (ev->link_type != SCO_LINK) in hci_conn_complete_evt()
2230 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_conn_complete_evt()
2237 if (!ev->status) { in hci_conn_complete_evt()
2238 conn->handle = __le16_to_cpu(ev->handle); in hci_conn_complete_evt()
2245 !hci_find_link_key(hdev, &ev->bdaddr)) in hci_conn_complete_evt()
2264 cp.handle = ev->handle; in hci_conn_complete_evt()
2274 cp.handle = ev->handle; in hci_conn_complete_evt()
2283 conn->dst_type, ev->status); in hci_conn_complete_evt()
2287 hci_sco_setup(conn, ev->status); in hci_conn_complete_evt()
2289 if (ev->status) { in hci_conn_complete_evt()
2290 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2292 } else if (ev->link_type != ACL_LINK) in hci_conn_complete_evt()
2293 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2312 struct hci_ev_conn_request *ev = (void *) skb->data; in hci_conn_request_evt() local
2318 BT_DBG("%s bdaddr %pMR type 0x%x", hdev->name, &ev->bdaddr, in hci_conn_request_evt()
2319 ev->link_type); in hci_conn_request_evt()
2321 mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type, in hci_conn_request_evt()
2325 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2329 if (hci_bdaddr_list_lookup(&hdev->blacklist, &ev->bdaddr, in hci_conn_request_evt()
2331 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2341 !hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr, in hci_conn_request_evt()
2343 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2351 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_conn_request_evt()
2353 memcpy(ie->data.dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2355 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, in hci_conn_request_evt()
2356 &ev->bdaddr); in hci_conn_request_evt()
2358 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_request_evt()
2367 memcpy(conn->dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2371 if (ev->link_type == ACL_LINK || in hci_conn_request_evt()
2376 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2388 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2423 struct hci_ev_disconn_complete *ev = (void *) skb->data; in hci_disconn_complete_evt() local
2424 u8 reason = hci_to_mgmt_reason(ev->reason); in hci_disconn_complete_evt()
2430 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_complete_evt()
2434 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_disconn_complete_evt()
2438 if (ev->status) { in hci_disconn_complete_evt()
2440 conn->dst_type, ev->status); in hci_disconn_complete_evt()
2461 if (ev->reason != HCI_ERROR_CONNECTION_TIMEOUT) in hci_disconn_complete_evt()
2479 hci_disconn_cfm(conn, ev->reason); in hci_disconn_complete_evt()
2501 struct hci_ev_auth_complete *ev = (void *) skb->data; in hci_auth_complete_evt() local
2504 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_auth_complete_evt()
2508 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_auth_complete_evt()
2512 if (!ev->status) { in hci_auth_complete_evt()
2521 mgmt_auth_failed(conn, ev->status); in hci_auth_complete_evt()
2528 if (!ev->status && hci_conn_ssp_enabled(conn)) { in hci_auth_complete_evt()
2530 cp.handle = ev->handle; in hci_auth_complete_evt()
2536 hci_connect_cfm(conn, ev->status); in hci_auth_complete_evt()
2540 hci_auth_cfm(conn, ev->status); in hci_auth_complete_evt()
2548 if (!ev->status) { in hci_auth_complete_evt()
2550 cp.handle = ev->handle; in hci_auth_complete_evt()
2556 hci_encrypt_cfm(conn, ev->status, 0x00); in hci_auth_complete_evt()
2566 struct hci_ev_remote_name *ev = (void *) skb->data; in hci_remote_name_evt() local
2575 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_name_evt()
2580 if (ev->status == 0) in hci_remote_name_evt()
2581 hci_check_pending_name(hdev, conn, &ev->bdaddr, ev->name, in hci_remote_name_evt()
2582 strnlen(ev->name, HCI_MAX_NAME_LENGTH)); in hci_remote_name_evt()
2584 hci_check_pending_name(hdev, conn, &ev->bdaddr, NULL, 0); in hci_remote_name_evt()
2608 struct hci_ev_encrypt_change *ev = (void *) skb->data; in hci_encrypt_change_evt() local
2611 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_encrypt_change_evt()
2615 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_encrypt_change_evt()
2619 if (!ev->status) { in hci_encrypt_change_evt()
2620 if (ev->encrypt) { in hci_encrypt_change_evt()
2630 if ((conn->type == ACL_LINK && ev->encrypt == 0x02) || in hci_encrypt_change_evt()
2642 if (ev->status && conn->type == LE_LINK) in hci_encrypt_change_evt()
2647 if (ev->status && conn->state == BT_CONNECTED) { in hci_encrypt_change_evt()
2654 if (!ev->status) in hci_encrypt_change_evt()
2669 hci_connect_cfm(conn, ev->status); in hci_encrypt_change_evt()
2672 hci_encrypt_cfm(conn, ev->status, ev->encrypt); in hci_encrypt_change_evt()
2681 struct hci_ev_change_link_key_complete *ev = (void *) skb->data; in hci_change_link_key_complete_evt() local
2684 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_change_link_key_complete_evt()
2688 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_change_link_key_complete_evt()
2690 if (!ev->status) in hci_change_link_key_complete_evt()
2695 hci_key_change_cfm(conn, ev->status); in hci_change_link_key_complete_evt()
2704 struct hci_ev_remote_features *ev = (void *) skb->data; in hci_remote_features_evt() local
2707 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_remote_features_evt()
2711 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_features_evt()
2715 if (!ev->status) in hci_remote_features_evt()
2716 memcpy(conn->features[0], ev->features, 8); in hci_remote_features_evt()
2721 if (!ev->status && lmp_ext_feat_capable(hdev) && in hci_remote_features_evt()
2724 cp.handle = ev->handle; in hci_remote_features_evt()
2731 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_features_evt()
2742 hci_connect_cfm(conn, ev->status); in hci_remote_features_evt()
2755 struct hci_ev_cmd_complete *ev = (void *) skb->data; in hci_cmd_complete_evt() local
2757 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_complete_evt()
2758 *status = skb->data[sizeof(*ev)]; in hci_cmd_complete_evt()
2760 skb_pull(skb, sizeof(*ev)); in hci_cmd_complete_evt()
3047 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_complete_evt()
3062 struct hci_ev_cmd_status *ev = (void *) skb->data; in hci_cmd_status_evt() local
3064 skb_pull(skb, sizeof(*ev)); in hci_cmd_status_evt()
3066 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_status_evt()
3067 *status = ev->status; in hci_cmd_status_evt()
3071 hci_cs_inquiry(hdev, ev->status); in hci_cmd_status_evt()
3075 hci_cs_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3079 hci_cs_disconnect(hdev, ev->status); in hci_cmd_status_evt()
3083 hci_cs_add_sco(hdev, ev->status); in hci_cmd_status_evt()
3087 hci_cs_auth_requested(hdev, ev->status); in hci_cmd_status_evt()
3091 hci_cs_set_conn_encrypt(hdev, ev->status); in hci_cmd_status_evt()
3095 hci_cs_remote_name_req(hdev, ev->status); in hci_cmd_status_evt()
3099 hci_cs_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3103 hci_cs_read_remote_ext_features(hdev, ev->status); in hci_cmd_status_evt()
3107 hci_cs_setup_sync_conn(hdev, ev->status); in hci_cmd_status_evt()
3111 hci_cs_create_phylink(hdev, ev->status); in hci_cmd_status_evt()
3115 hci_cs_accept_phylink(hdev, ev->status); in hci_cmd_status_evt()
3119 hci_cs_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3123 hci_cs_exit_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3127 hci_cs_switch_role(hdev, ev->status); in hci_cmd_status_evt()
3131 hci_cs_le_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3135 hci_cs_le_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3139 hci_cs_le_start_enc(hdev, ev->status); in hci_cmd_status_evt()
3150 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_status_evt()
3159 if (ev->status || in hci_cmd_status_evt()
3161 hci_req_cmd_complete(hdev, *opcode, ev->status, req_complete, in hci_cmd_status_evt()
3170 struct hci_ev_hardware_error *ev = (void *) skb->data; in hci_hardware_error_evt() local
3172 hdev->hw_error_code = ev->code; in hci_hardware_error_evt()
3179 struct hci_ev_role_change *ev = (void *) skb->data; in hci_role_change_evt() local
3182 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_role_change_evt()
3186 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_role_change_evt()
3188 if (!ev->status) in hci_role_change_evt()
3189 conn->role = ev->role; in hci_role_change_evt()
3193 hci_role_switch_cfm(conn, ev->status, ev->role); in hci_role_change_evt()
3201 struct hci_ev_num_comp_pkts *ev = (void *) skb->data; in hci_num_comp_pkts_evt() local
3209 if (skb->len < sizeof(*ev) || skb->len < sizeof(*ev) + in hci_num_comp_pkts_evt()
3210 ev->num_hndl * sizeof(struct hci_comp_pkts_info)) { in hci_num_comp_pkts_evt()
3215 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl); in hci_num_comp_pkts_evt()
3217 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_pkts_evt()
3218 struct hci_comp_pkts_info *info = &ev->handles[i]; in hci_num_comp_pkts_evt()
3288 struct hci_ev_num_comp_blocks *ev = (void *) skb->data; in hci_num_comp_blocks_evt() local
3296 if (skb->len < sizeof(*ev) || skb->len < sizeof(*ev) + in hci_num_comp_blocks_evt()
3297 ev->num_hndl * sizeof(struct hci_comp_blocks_info)) { in hci_num_comp_blocks_evt()
3302 BT_DBG("%s num_blocks %d num_hndl %d", hdev->name, ev->num_blocks, in hci_num_comp_blocks_evt()
3303 ev->num_hndl); in hci_num_comp_blocks_evt()
3305 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_blocks_evt()
3306 struct hci_comp_blocks_info *info = &ev->handles[i]; in hci_num_comp_blocks_evt()
3338 struct hci_ev_mode_change *ev = (void *) skb->data; in hci_mode_change_evt() local
3341 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_mode_change_evt()
3345 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_mode_change_evt()
3347 conn->mode = ev->mode; in hci_mode_change_evt()
3358 hci_sco_setup(conn, ev->status); in hci_mode_change_evt()
3366 struct hci_ev_pin_code_req *ev = (void *) skb->data; in hci_pin_code_request_evt() local
3373 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_pin_code_request_evt()
3386 sizeof(ev->bdaddr), &ev->bdaddr); in hci_pin_code_request_evt()
3395 mgmt_pin_code_request(hdev, &ev->bdaddr, secure); in hci_pin_code_request_evt()
3436 struct hci_ev_link_key_req *ev = (void *) skb->data; in hci_link_key_request_evt() local
3448 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_link_key_request_evt()
3451 &ev->bdaddr); in hci_link_key_request_evt()
3456 &ev->bdaddr); in hci_link_key_request_evt()
3458 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_request_evt()
3480 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_link_key_request_evt()
3490 hci_send_cmd(hdev, HCI_OP_LINK_KEY_NEG_REPLY, 6, &ev->bdaddr); in hci_link_key_request_evt()
3496 struct hci_ev_link_key_notify *ev = (void *) skb->data; in hci_link_key_notify_evt() local
3506 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_notify_evt()
3515 conn_set_key(conn, ev->key_type, conn->pin_length); in hci_link_key_notify_evt()
3520 key = hci_add_link_key(hdev, conn, &ev->bdaddr, ev->link_key, in hci_link_key_notify_evt()
3521 ev->key_type, pin_len, &persistent); in hci_link_key_notify_evt()
3528 if (ev->key_type == HCI_LK_CHANGED_COMBINATION) in hci_link_key_notify_evt()
3556 struct hci_ev_clock_offset *ev = (void *) skb->data; in hci_clock_offset_evt() local
3559 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_clock_offset_evt()
3563 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_clock_offset_evt()
3564 if (conn && !ev->status) { in hci_clock_offset_evt()
3569 ie->data.clock_offset = ev->clock_offset; in hci_clock_offset_evt()
3579 struct hci_ev_pkt_type_change *ev = (void *) skb->data; in hci_pkt_type_change_evt() local
3582 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_pkt_type_change_evt()
3586 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_pkt_type_change_evt()
3587 if (conn && !ev->status) in hci_pkt_type_change_evt()
3588 conn->pkt_type = __le16_to_cpu(ev->pkt_type); in hci_pkt_type_change_evt()
3595 struct hci_ev_pscan_rep_mode *ev = (void *) skb->data; in hci_pscan_rep_mode_evt() local
3602 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_pscan_rep_mode_evt()
3604 ie->data.pscan_rep_mode = ev->pscan_rep_mode; in hci_pscan_rep_mode_evt()
3678 struct hci_ev_remote_ext_features *ev = (void *) skb->data; in hci_remote_ext_features_evt() local
3685 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_ext_features_evt()
3689 if (ev->page < HCI_MAX_PAGES) in hci_remote_ext_features_evt()
3690 memcpy(conn->features[ev->page], ev->features, 8); in hci_remote_ext_features_evt()
3692 if (!ev->status && ev->page == 0x01) { in hci_remote_ext_features_evt()
3697 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_ext_features_evt()
3699 if (ev->features[0] & LMP_HOST_SSP) { in hci_remote_ext_features_evt()
3713 if (ev->features[0] & LMP_HOST_SC) in hci_remote_ext_features_evt()
3720 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_ext_features_evt()
3731 hci_connect_cfm(conn, ev->status); in hci_remote_ext_features_evt()
3742 struct hci_ev_sync_conn_complete *ev = (void *) skb->data; in hci_sync_conn_complete_evt() local
3745 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_sync_conn_complete_evt()
3749 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_sync_conn_complete_evt()
3751 if (ev->link_type == ESCO_LINK) in hci_sync_conn_complete_evt()
3754 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_sync_conn_complete_evt()
3761 switch (ev->status) { in hci_sync_conn_complete_evt()
3763 conn->handle = __le16_to_cpu(ev->handle); in hci_sync_conn_complete_evt()
3790 hci_connect_cfm(conn, ev->status); in hci_sync_conn_complete_evt()
3791 if (ev->status) in hci_sync_conn_complete_evt()
3868 struct hci_ev_key_refresh_complete *ev = (void *) skb->data; in hci_key_refresh_complete_evt() local
3871 BT_DBG("%s status 0x%2.2x handle 0x%4.4x", hdev->name, ev->status, in hci_key_refresh_complete_evt()
3872 __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
3876 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
3886 if (!ev->status) in hci_key_refresh_complete_evt()
3891 if (ev->status && conn->state == BT_CONNECTED) { in hci_key_refresh_complete_evt()
3898 if (!ev->status) in hci_key_refresh_complete_evt()
3901 hci_connect_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
3904 hci_auth_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
3977 struct hci_ev_io_capa_request *ev = (void *) skb->data; in hci_io_capa_request_evt() local
3984 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_request_evt()
4001 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4033 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4046 struct hci_ev_io_capa_reply *ev = (void *) skb->data; in hci_io_capa_reply_evt() local
4053 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_reply_evt()
4057 conn->remote_cap = ev->capability; in hci_io_capa_reply_evt()
4058 conn->remote_auth = ev->authentication; in hci_io_capa_reply_evt()
4067 struct hci_ev_user_confirm_req *ev = (void *) skb->data; in hci_user_confirm_request_evt() local
4078 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_confirm_request_evt()
4094 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4127 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4132 mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, in hci_user_confirm_request_evt()
4133 le32_to_cpu(ev->passkey), confirm_hint); in hci_user_confirm_request_evt()
4142 struct hci_ev_user_passkey_req *ev = (void *) skb->data; in hci_user_passkey_request_evt() local
4147 mgmt_user_passkey_request(hdev, &ev->bdaddr, ACL_LINK, 0); in hci_user_passkey_request_evt()
4153 struct hci_ev_user_passkey_notify *ev = (void *) skb->data; in hci_user_passkey_notify_evt() local
4158 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_passkey_notify_evt()
4162 conn->passkey_notify = __le32_to_cpu(ev->passkey); in hci_user_passkey_notify_evt()
4173 struct hci_ev_keypress_notify *ev = (void *) skb->data; in hci_keypress_notify_evt() local
4178 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_keypress_notify_evt()
4182 switch (ev->type) { in hci_keypress_notify_evt()
4212 struct hci_ev_simple_pair_complete *ev = (void *) skb->data; in hci_simple_pair_complete_evt() local
4219 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_simple_pair_complete_evt()
4231 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status) in hci_simple_pair_complete_evt()
4232 mgmt_auth_failed(conn, ev->status); in hci_simple_pair_complete_evt()
4243 struct hci_ev_remote_host_features *ev = (void *) skb->data; in hci_remote_host_features_evt() local
4251 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_host_features_evt()
4253 memcpy(conn->features[1], ev->features, 8); in hci_remote_host_features_evt()
4255 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_remote_host_features_evt()
4257 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_host_features_evt()
4265 struct hci_ev_remote_oob_data_request *ev = (void *) skb->data; in hci_remote_oob_data_request_evt() local
4275 data = hci_find_remote_oob_data(hdev, &ev->bdaddr, BDADDR_BREDR); in hci_remote_oob_data_request_evt()
4279 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4288 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4304 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4319 struct hci_ev_phy_link_complete *ev = (void *) skb->data; in hci_phy_link_complete_evt() local
4322 BT_DBG("%s handle 0x%2.2x status 0x%2.2x", hdev->name, ev->phy_handle, in hci_phy_link_complete_evt()
4323 ev->status); in hci_phy_link_complete_evt()
4327 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_phy_link_complete_evt()
4333 if (ev->status) { in hci_phy_link_complete_evt()
4358 struct hci_ev_logical_link_complete *ev = (void *) skb->data; in hci_loglink_complete_evt() local
4364 hdev->name, le16_to_cpu(ev->handle), ev->phy_handle, in hci_loglink_complete_evt()
4365 ev->status); in hci_loglink_complete_evt()
4367 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_loglink_complete_evt()
4376 hchan->handle = le16_to_cpu(ev->handle); in hci_loglink_complete_evt()
4397 struct hci_ev_disconn_logical_link_complete *ev = (void *) skb->data; in hci_disconn_loglink_complete_evt() local
4401 le16_to_cpu(ev->handle), ev->status); in hci_disconn_loglink_complete_evt()
4403 if (ev->status) in hci_disconn_loglink_complete_evt()
4408 hchan = hci_chan_lookup_handle(hdev, le16_to_cpu(ev->handle)); in hci_disconn_loglink_complete_evt()
4412 amp_destroy_logical_link(hchan, ev->reason); in hci_disconn_loglink_complete_evt()
4421 struct hci_ev_disconn_phy_link_complete *ev = (void *) skb->data; in hci_disconn_phylink_complete_evt() local
4424 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_phylink_complete_evt()
4426 if (ev->status) in hci_disconn_phylink_complete_evt()
4431 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_disconn_phylink_complete_evt()
4442 struct hci_ev_le_conn_complete *ev = (void *) skb->data; in hci_le_conn_complete_evt() local
4448 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_complete_evt()
4459 conn = hci_conn_add(hdev, LE_LINK, &ev->bdaddr, ev->role); in hci_le_conn_complete_evt()
4465 conn->dst_type = ev->bdaddr_type; in hci_le_conn_complete_evt()
4476 conn->resp_addr_type = ev->bdaddr_type; in hci_le_conn_complete_evt()
4477 bacpy(&conn->resp_addr, &ev->bdaddr); in hci_le_conn_complete_evt()
4501 conn->init_addr_type = ev->bdaddr_type; in hci_le_conn_complete_evt()
4502 bacpy(&conn->init_addr, &ev->bdaddr); in hci_le_conn_complete_evt()
4528 if (ev->status) { in hci_le_conn_complete_evt()
4529 hci_le_conn_failed(conn, ev->status); in hci_le_conn_complete_evt()
4548 conn->handle = __le16_to_cpu(ev->handle); in hci_le_conn_complete_evt()
4551 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_complete_evt()
4552 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_complete_evt()
4553 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_complete_evt()
4558 if (!ev->status) { in hci_le_conn_complete_evt()
4580 hci_connect_cfm(conn, ev->status); in hci_le_conn_complete_evt()
4583 hci_connect_cfm(conn, ev->status); in hci_le_conn_complete_evt()
4605 struct hci_ev_le_conn_update_complete *ev = (void *) skb->data; in hci_le_conn_update_complete_evt() local
4608 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_update_complete_evt()
4610 if (ev->status) in hci_le_conn_update_complete_evt()
4615 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_conn_update_complete_evt()
4617 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_update_complete_evt()
4618 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_update_complete_evt()
4619 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_update_complete_evt()
4872 struct hci_ev_le_advertising_info *ev = ptr; in hci_le_adv_report_evt() local
4875 rssi = ev->data[ev->length]; in hci_le_adv_report_evt()
4876 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_adv_report_evt()
4877 ev->bdaddr_type, NULL, 0, rssi, in hci_le_adv_report_evt()
4878 ev->data, ev->length); in hci_le_adv_report_evt()
4880 ptr += sizeof(*ev) + ev->length + 1; in hci_le_adv_report_evt()
4889 struct hci_ev_le_remote_feat_complete *ev = (void *)skb->data; in hci_le_remote_feat_complete_evt() local
4892 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_remote_feat_complete_evt()
4896 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_remote_feat_complete_evt()
4898 if (!ev->status) in hci_le_remote_feat_complete_evt()
4899 memcpy(conn->features[0], ev->features, 8); in hci_le_remote_feat_complete_evt()
4914 !conn->out && ev->status == 0x1a) in hci_le_remote_feat_complete_evt()
4917 status = ev->status; in hci_le_remote_feat_complete_evt()
4930 struct hci_ev_le_ltk_req *ev = (void *) skb->data; in hci_le_ltk_request_evt() local
4936 BT_DBG("%s handle 0x%4.4x", hdev->name, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
4940 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
4950 if (ev->ediv || ev->rand) in hci_le_ltk_request_evt()
4954 if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) in hci_le_ltk_request_evt()
4986 neg.handle = ev->handle; in hci_le_ltk_request_evt()
5006 struct hci_ev_le_remote_conn_param_req *ev = (void *) skb->data; in hci_le_remote_conn_param_req_evt() local
5011 handle = le16_to_cpu(ev->handle); in hci_le_remote_conn_param_req_evt()
5012 min = le16_to_cpu(ev->interval_min); in hci_le_remote_conn_param_req_evt()
5013 max = le16_to_cpu(ev->interval_max); in hci_le_remote_conn_param_req_evt()
5014 latency = le16_to_cpu(ev->latency); in hci_le_remote_conn_param_req_evt()
5015 timeout = le16_to_cpu(ev->timeout); in hci_le_remote_conn_param_req_evt()
5050 cp.handle = ev->handle; in hci_le_remote_conn_param_req_evt()
5051 cp.interval_min = ev->interval_min; in hci_le_remote_conn_param_req_evt()
5052 cp.interval_max = ev->interval_max; in hci_le_remote_conn_param_req_evt()
5053 cp.latency = ev->latency; in hci_le_remote_conn_param_req_evt()
5054 cp.timeout = ev->timeout; in hci_le_remote_conn_param_req_evt()
5070 struct hci_ev_le_direct_adv_info *ev = ptr; in hci_le_direct_adv_report_evt() local
5072 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_direct_adv_report_evt()
5073 ev->bdaddr_type, &ev->direct_addr, in hci_le_direct_adv_report_evt()
5074 ev->direct_addr_type, ev->rssi, NULL, 0); in hci_le_direct_adv_report_evt()
5076 ptr += sizeof(*ev); in hci_le_direct_adv_report_evt()
5124 struct hci_ev_channel_selected *ev = (void *) skb->data; in hci_chan_selected_evt() local
5127 BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle); in hci_chan_selected_evt()
5129 skb_pull(skb, sizeof(*ev)); in hci_chan_selected_evt()
5131 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_chan_selected_evt()
5141 struct hci_ev_cmd_complete *ev; in hci_get_cmd_complete() local
5166 if (skb->len < sizeof(*ev)) { in hci_get_cmd_complete()
5171 ev = (void *) skb->data; in hci_get_cmd_complete()
5172 skb_pull(skb, sizeof(*ev)); in hci_get_cmd_complete()
5174 if (opcode != __le16_to_cpu(ev->opcode)) { in hci_get_cmd_complete()
5176 __le16_to_cpu(ev->opcode)); in hci_get_cmd_complete()