Lines Matching refs:ev
2129 struct hci_ev_conn_complete *ev = (void *) skb->data; in hci_conn_complete_evt() local
2136 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_conn_complete_evt()
2138 if (ev->link_type != SCO_LINK) in hci_conn_complete_evt()
2141 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_conn_complete_evt()
2148 if (!ev->status) { in hci_conn_complete_evt()
2149 conn->handle = __le16_to_cpu(ev->handle); in hci_conn_complete_evt()
2156 !hci_find_link_key(hdev, &ev->bdaddr)) in hci_conn_complete_evt()
2175 cp.handle = ev->handle; in hci_conn_complete_evt()
2185 cp.handle = ev->handle; in hci_conn_complete_evt()
2194 conn->dst_type, ev->status); in hci_conn_complete_evt()
2198 hci_sco_setup(conn, ev->status); in hci_conn_complete_evt()
2200 if (ev->status) { in hci_conn_complete_evt()
2201 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2203 } else if (ev->link_type != ACL_LINK) in hci_conn_complete_evt()
2204 hci_connect_cfm(conn, ev->status); in hci_conn_complete_evt()
2223 struct hci_ev_conn_request *ev = (void *) skb->data; in hci_conn_request_evt() local
2229 BT_DBG("%s bdaddr %pMR type 0x%x", hdev->name, &ev->bdaddr, in hci_conn_request_evt()
2230 ev->link_type); in hci_conn_request_evt()
2232 mask |= hci_proto_connect_ind(hdev, &ev->bdaddr, ev->link_type, in hci_conn_request_evt()
2236 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2240 if (hci_bdaddr_list_lookup(&hdev->blacklist, &ev->bdaddr, in hci_conn_request_evt()
2242 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2252 !hci_bdaddr_list_lookup(&hdev->whitelist, &ev->bdaddr, in hci_conn_request_evt()
2254 hci_reject_conn(hdev, &ev->bdaddr); in hci_conn_request_evt()
2262 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_conn_request_evt()
2264 memcpy(ie->data.dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2266 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, in hci_conn_request_evt()
2267 &ev->bdaddr); in hci_conn_request_evt()
2269 conn = hci_conn_add(hdev, ev->link_type, &ev->bdaddr, in hci_conn_request_evt()
2278 memcpy(conn->dev_class, ev->dev_class, 3); in hci_conn_request_evt()
2282 if (ev->link_type == ACL_LINK || in hci_conn_request_evt()
2287 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2299 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2334 struct hci_ev_disconn_complete *ev = (void *) skb->data; in hci_disconn_complete_evt() local
2335 u8 reason = hci_to_mgmt_reason(ev->reason); in hci_disconn_complete_evt()
2341 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_complete_evt()
2345 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_disconn_complete_evt()
2349 if (ev->status) { in hci_disconn_complete_evt()
2351 conn->dst_type, ev->status); in hci_disconn_complete_evt()
2372 if (ev->reason != HCI_ERROR_CONNECTION_TIMEOUT) in hci_disconn_complete_evt()
2390 hci_disconn_cfm(conn, ev->reason); in hci_disconn_complete_evt()
2412 struct hci_ev_auth_complete *ev = (void *) skb->data; in hci_auth_complete_evt() local
2415 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_auth_complete_evt()
2419 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_auth_complete_evt()
2423 if (!ev->status) { in hci_auth_complete_evt()
2432 mgmt_auth_failed(conn, ev->status); in hci_auth_complete_evt()
2439 if (!ev->status && hci_conn_ssp_enabled(conn)) { in hci_auth_complete_evt()
2441 cp.handle = ev->handle; in hci_auth_complete_evt()
2447 hci_connect_cfm(conn, ev->status); in hci_auth_complete_evt()
2451 hci_auth_cfm(conn, ev->status); in hci_auth_complete_evt()
2459 if (!ev->status) { in hci_auth_complete_evt()
2461 cp.handle = ev->handle; in hci_auth_complete_evt()
2467 hci_encrypt_cfm(conn, ev->status, 0x00); in hci_auth_complete_evt()
2477 struct hci_ev_remote_name *ev = (void *) skb->data; in hci_remote_name_evt() local
2486 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_name_evt()
2491 if (ev->status == 0) in hci_remote_name_evt()
2492 hci_check_pending_name(hdev, conn, &ev->bdaddr, ev->name, in hci_remote_name_evt()
2493 strnlen(ev->name, HCI_MAX_NAME_LENGTH)); in hci_remote_name_evt()
2495 hci_check_pending_name(hdev, conn, &ev->bdaddr, NULL, 0); in hci_remote_name_evt()
2576 struct hci_ev_encrypt_change *ev = (void *) skb->data; in hci_encrypt_change_evt() local
2579 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_encrypt_change_evt()
2583 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_encrypt_change_evt()
2587 if (!ev->status) { in hci_encrypt_change_evt()
2588 if (ev->encrypt) { in hci_encrypt_change_evt()
2598 if ((conn->type == ACL_LINK && ev->encrypt == 0x02) || in hci_encrypt_change_evt()
2610 if (ev->status && conn->type == LE_LINK) in hci_encrypt_change_evt()
2615 if (ev->status && conn->state == BT_CONNECTED) { in hci_encrypt_change_evt()
2634 if (!ev->status && ev->encrypt && conn->type == ACL_LINK) { in hci_encrypt_change_evt()
2663 if (!ev->status) in hci_encrypt_change_evt()
2666 hci_connect_cfm(conn, ev->status); in hci_encrypt_change_evt()
2669 hci_encrypt_cfm(conn, ev->status, ev->encrypt); in hci_encrypt_change_evt()
2678 struct hci_ev_change_link_key_complete *ev = (void *) skb->data; in hci_change_link_key_complete_evt() local
2681 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_change_link_key_complete_evt()
2685 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_change_link_key_complete_evt()
2687 if (!ev->status) in hci_change_link_key_complete_evt()
2692 hci_key_change_cfm(conn, ev->status); in hci_change_link_key_complete_evt()
2701 struct hci_ev_remote_features *ev = (void *) skb->data; in hci_remote_features_evt() local
2704 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_remote_features_evt()
2708 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_features_evt()
2712 if (!ev->status) in hci_remote_features_evt()
2713 memcpy(conn->features[0], ev->features, 8); in hci_remote_features_evt()
2718 if (!ev->status && lmp_ext_feat_capable(hdev) && in hci_remote_features_evt()
2721 cp.handle = ev->handle; in hci_remote_features_evt()
2728 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_features_evt()
2739 hci_connect_cfm(conn, ev->status); in hci_remote_features_evt()
2752 struct hci_ev_cmd_complete *ev = (void *) skb->data; in hci_cmd_complete_evt() local
2754 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_complete_evt()
2755 *status = skb->data[sizeof(*ev)]; in hci_cmd_complete_evt()
2757 skb_pull(skb, sizeof(*ev)); in hci_cmd_complete_evt()
3036 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_complete_evt()
3051 struct hci_ev_cmd_status *ev = (void *) skb->data; in hci_cmd_status_evt() local
3053 skb_pull(skb, sizeof(*ev)); in hci_cmd_status_evt()
3055 *opcode = __le16_to_cpu(ev->opcode); in hci_cmd_status_evt()
3056 *status = ev->status; in hci_cmd_status_evt()
3060 hci_cs_inquiry(hdev, ev->status); in hci_cmd_status_evt()
3064 hci_cs_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3068 hci_cs_disconnect(hdev, ev->status); in hci_cmd_status_evt()
3072 hci_cs_add_sco(hdev, ev->status); in hci_cmd_status_evt()
3076 hci_cs_auth_requested(hdev, ev->status); in hci_cmd_status_evt()
3080 hci_cs_set_conn_encrypt(hdev, ev->status); in hci_cmd_status_evt()
3084 hci_cs_remote_name_req(hdev, ev->status); in hci_cmd_status_evt()
3088 hci_cs_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3092 hci_cs_read_remote_ext_features(hdev, ev->status); in hci_cmd_status_evt()
3096 hci_cs_setup_sync_conn(hdev, ev->status); in hci_cmd_status_evt()
3100 hci_cs_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3104 hci_cs_exit_sniff_mode(hdev, ev->status); in hci_cmd_status_evt()
3108 hci_cs_switch_role(hdev, ev->status); in hci_cmd_status_evt()
3112 hci_cs_le_create_conn(hdev, ev->status); in hci_cmd_status_evt()
3116 hci_cs_le_read_remote_features(hdev, ev->status); in hci_cmd_status_evt()
3120 hci_cs_le_start_enc(hdev, ev->status); in hci_cmd_status_evt()
3131 if (ev->ncmd && !test_bit(HCI_RESET, &hdev->flags)) in hci_cmd_status_evt()
3140 if (ev->status || in hci_cmd_status_evt()
3142 hci_req_cmd_complete(hdev, *opcode, ev->status, req_complete, in hci_cmd_status_evt()
3151 struct hci_ev_hardware_error *ev = (void *) skb->data; in hci_hardware_error_evt() local
3153 hdev->hw_error_code = ev->code; in hci_hardware_error_evt()
3160 struct hci_ev_role_change *ev = (void *) skb->data; in hci_role_change_evt() local
3163 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_role_change_evt()
3167 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_role_change_evt()
3169 if (!ev->status) in hci_role_change_evt()
3170 conn->role = ev->role; in hci_role_change_evt()
3174 hci_role_switch_cfm(conn, ev->status, ev->role); in hci_role_change_evt()
3182 struct hci_ev_num_comp_pkts *ev = (void *) skb->data; in hci_num_comp_pkts_evt() local
3190 if (skb->len < sizeof(*ev) || skb->len < sizeof(*ev) + in hci_num_comp_pkts_evt()
3191 ev->num_hndl * sizeof(struct hci_comp_pkts_info)) { in hci_num_comp_pkts_evt()
3196 BT_DBG("%s num_hndl %d", hdev->name, ev->num_hndl); in hci_num_comp_pkts_evt()
3198 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_pkts_evt()
3199 struct hci_comp_pkts_info *info = &ev->handles[i]; in hci_num_comp_pkts_evt()
3269 struct hci_ev_num_comp_blocks *ev = (void *) skb->data; in hci_num_comp_blocks_evt() local
3277 if (skb->len < sizeof(*ev) || skb->len < sizeof(*ev) + in hci_num_comp_blocks_evt()
3278 ev->num_hndl * sizeof(struct hci_comp_blocks_info)) { in hci_num_comp_blocks_evt()
3283 BT_DBG("%s num_blocks %d num_hndl %d", hdev->name, ev->num_blocks, in hci_num_comp_blocks_evt()
3284 ev->num_hndl); in hci_num_comp_blocks_evt()
3286 for (i = 0; i < ev->num_hndl; i++) { in hci_num_comp_blocks_evt()
3287 struct hci_comp_blocks_info *info = &ev->handles[i]; in hci_num_comp_blocks_evt()
3319 struct hci_ev_mode_change *ev = (void *) skb->data; in hci_mode_change_evt() local
3322 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_mode_change_evt()
3326 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_mode_change_evt()
3328 conn->mode = ev->mode; in hci_mode_change_evt()
3339 hci_sco_setup(conn, ev->status); in hci_mode_change_evt()
3347 struct hci_ev_pin_code_req *ev = (void *) skb->data; in hci_pin_code_request_evt() local
3354 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_pin_code_request_evt()
3367 sizeof(ev->bdaddr), &ev->bdaddr); in hci_pin_code_request_evt()
3376 mgmt_pin_code_request(hdev, &ev->bdaddr, secure); in hci_pin_code_request_evt()
3417 struct hci_ev_link_key_req *ev = (void *) skb->data; in hci_link_key_request_evt() local
3429 key = hci_find_link_key(hdev, &ev->bdaddr); in hci_link_key_request_evt()
3432 &ev->bdaddr); in hci_link_key_request_evt()
3437 &ev->bdaddr); in hci_link_key_request_evt()
3439 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_request_evt()
3461 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_link_key_request_evt()
3471 hci_send_cmd(hdev, HCI_OP_LINK_KEY_NEG_REPLY, 6, &ev->bdaddr); in hci_link_key_request_evt()
3477 struct hci_ev_link_key_notify *ev = (void *) skb->data; in hci_link_key_notify_evt() local
3487 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_link_key_notify_evt()
3496 conn_set_key(conn, ev->key_type, conn->pin_length); in hci_link_key_notify_evt()
3501 key = hci_add_link_key(hdev, conn, &ev->bdaddr, ev->link_key, in hci_link_key_notify_evt()
3502 ev->key_type, pin_len, &persistent); in hci_link_key_notify_evt()
3509 if (ev->key_type == HCI_LK_CHANGED_COMBINATION) in hci_link_key_notify_evt()
3537 struct hci_ev_clock_offset *ev = (void *) skb->data; in hci_clock_offset_evt() local
3540 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_clock_offset_evt()
3544 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_clock_offset_evt()
3545 if (conn && !ev->status) { in hci_clock_offset_evt()
3550 ie->data.clock_offset = ev->clock_offset; in hci_clock_offset_evt()
3560 struct hci_ev_pkt_type_change *ev = (void *) skb->data; in hci_pkt_type_change_evt() local
3563 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_pkt_type_change_evt()
3567 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_pkt_type_change_evt()
3568 if (conn && !ev->status) in hci_pkt_type_change_evt()
3569 conn->pkt_type = __le16_to_cpu(ev->pkt_type); in hci_pkt_type_change_evt()
3576 struct hci_ev_pscan_rep_mode *ev = (void *) skb->data; in hci_pscan_rep_mode_evt() local
3583 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_pscan_rep_mode_evt()
3585 ie->data.pscan_rep_mode = ev->pscan_rep_mode; in hci_pscan_rep_mode_evt()
3659 struct hci_ev_remote_ext_features *ev = (void *) skb->data; in hci_remote_ext_features_evt() local
3666 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_remote_ext_features_evt()
3670 if (ev->page < HCI_MAX_PAGES) in hci_remote_ext_features_evt()
3671 memcpy(conn->features[ev->page], ev->features, 8); in hci_remote_ext_features_evt()
3673 if (!ev->status && ev->page == 0x01) { in hci_remote_ext_features_evt()
3678 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_ext_features_evt()
3680 if (ev->features[0] & LMP_HOST_SSP) { in hci_remote_ext_features_evt()
3694 if (ev->features[0] & LMP_HOST_SC) in hci_remote_ext_features_evt()
3701 if (!ev->status && !test_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags)) { in hci_remote_ext_features_evt()
3712 hci_connect_cfm(conn, ev->status); in hci_remote_ext_features_evt()
3723 struct hci_ev_sync_conn_complete *ev = (void *) skb->data; in hci_sync_conn_complete_evt() local
3726 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_sync_conn_complete_evt()
3730 conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdaddr); in hci_sync_conn_complete_evt()
3732 if (ev->link_type == ESCO_LINK) in hci_sync_conn_complete_evt()
3744 conn = hci_conn_hash_lookup_ba(hdev, ESCO_LINK, &ev->bdaddr); in hci_sync_conn_complete_evt()
3749 switch (ev->status) { in hci_sync_conn_complete_evt()
3751 conn->handle = __le16_to_cpu(ev->handle); in hci_sync_conn_complete_evt()
3753 conn->type = ev->link_type; in hci_sync_conn_complete_evt()
3779 hci_connect_cfm(conn, ev->status); in hci_sync_conn_complete_evt()
3780 if (ev->status) in hci_sync_conn_complete_evt()
3857 struct hci_ev_key_refresh_complete *ev = (void *) skb->data; in hci_key_refresh_complete_evt() local
3860 BT_DBG("%s status 0x%2.2x handle 0x%4.4x", hdev->name, ev->status, in hci_key_refresh_complete_evt()
3861 __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
3865 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_key_refresh_complete_evt()
3875 if (!ev->status) in hci_key_refresh_complete_evt()
3880 if (ev->status && conn->state == BT_CONNECTED) { in hci_key_refresh_complete_evt()
3887 if (!ev->status) in hci_key_refresh_complete_evt()
3890 hci_connect_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
3893 hci_auth_cfm(conn, ev->status); in hci_key_refresh_complete_evt()
3966 struct hci_ev_io_capa_request *ev = (void *) skb->data; in hci_io_capa_request_evt() local
3973 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_request_evt()
3990 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4022 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4035 struct hci_ev_io_capa_reply *ev = (void *) skb->data; in hci_io_capa_reply_evt() local
4042 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_io_capa_reply_evt()
4046 conn->remote_cap = ev->capability; in hci_io_capa_reply_evt()
4047 conn->remote_auth = ev->authentication; in hci_io_capa_reply_evt()
4056 struct hci_ev_user_confirm_req *ev = (void *) skb->data; in hci_user_confirm_request_evt() local
4067 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_confirm_request_evt()
4083 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4116 sizeof(ev->bdaddr), &ev->bdaddr); in hci_user_confirm_request_evt()
4121 mgmt_user_confirm_request(hdev, &ev->bdaddr, ACL_LINK, 0, in hci_user_confirm_request_evt()
4122 le32_to_cpu(ev->passkey), confirm_hint); in hci_user_confirm_request_evt()
4131 struct hci_ev_user_passkey_req *ev = (void *) skb->data; in hci_user_passkey_request_evt() local
4136 mgmt_user_passkey_request(hdev, &ev->bdaddr, ACL_LINK, 0); in hci_user_passkey_request_evt()
4142 struct hci_ev_user_passkey_notify *ev = (void *) skb->data; in hci_user_passkey_notify_evt() local
4147 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_user_passkey_notify_evt()
4151 conn->passkey_notify = __le32_to_cpu(ev->passkey); in hci_user_passkey_notify_evt()
4162 struct hci_ev_keypress_notify *ev = (void *) skb->data; in hci_keypress_notify_evt() local
4167 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_keypress_notify_evt()
4171 switch (ev->type) { in hci_keypress_notify_evt()
4201 struct hci_ev_simple_pair_complete *ev = (void *) skb->data; in hci_simple_pair_complete_evt() local
4208 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_simple_pair_complete_evt()
4220 if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ev->status) in hci_simple_pair_complete_evt()
4221 mgmt_auth_failed(conn, ev->status); in hci_simple_pair_complete_evt()
4232 struct hci_ev_remote_host_features *ev = (void *) skb->data; in hci_remote_host_features_evt() local
4240 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); in hci_remote_host_features_evt()
4242 memcpy(conn->features[1], ev->features, 8); in hci_remote_host_features_evt()
4244 ie = hci_inquiry_cache_lookup(hdev, &ev->bdaddr); in hci_remote_host_features_evt()
4246 ie->data.ssp_mode = (ev->features[0] & LMP_HOST_SSP); in hci_remote_host_features_evt()
4254 struct hci_ev_remote_oob_data_request *ev = (void *) skb->data; in hci_remote_oob_data_request_evt() local
4264 data = hci_find_remote_oob_data(hdev, &ev->bdaddr, BDADDR_BREDR); in hci_remote_oob_data_request_evt()
4268 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4277 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4293 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4308 struct hci_ev_channel_selected *ev = (void *)skb->data; in hci_chan_selected_evt() local
4311 BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle); in hci_chan_selected_evt()
4313 skb_pull(skb, sizeof(*ev)); in hci_chan_selected_evt()
4315 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_chan_selected_evt()
4325 struct hci_ev_phy_link_complete *ev = (void *) skb->data; in hci_phy_link_complete_evt() local
4328 BT_DBG("%s handle 0x%2.2x status 0x%2.2x", hdev->name, ev->phy_handle, in hci_phy_link_complete_evt()
4329 ev->status); in hci_phy_link_complete_evt()
4333 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_phy_link_complete_evt()
4339 if (ev->status) { in hci_phy_link_complete_evt()
4364 struct hci_ev_logical_link_complete *ev = (void *) skb->data; in hci_loglink_complete_evt() local
4370 hdev->name, le16_to_cpu(ev->handle), ev->phy_handle, in hci_loglink_complete_evt()
4371 ev->status); in hci_loglink_complete_evt()
4373 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_loglink_complete_evt()
4382 hchan->handle = le16_to_cpu(ev->handle); in hci_loglink_complete_evt()
4403 struct hci_ev_disconn_logical_link_complete *ev = (void *) skb->data; in hci_disconn_loglink_complete_evt() local
4407 le16_to_cpu(ev->handle), ev->status); in hci_disconn_loglink_complete_evt()
4409 if (ev->status) in hci_disconn_loglink_complete_evt()
4414 hchan = hci_chan_lookup_handle(hdev, le16_to_cpu(ev->handle)); in hci_disconn_loglink_complete_evt()
4418 amp_destroy_logical_link(hchan, ev->reason); in hci_disconn_loglink_complete_evt()
4427 struct hci_ev_disconn_phy_link_complete *ev = (void *) skb->data; in hci_disconn_phylink_complete_evt() local
4430 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_disconn_phylink_complete_evt()
4432 if (ev->status) in hci_disconn_phylink_complete_evt()
4437 hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); in hci_disconn_phylink_complete_evt()
4449 struct hci_ev_le_conn_complete *ev = (void *) skb->data; in hci_le_conn_complete_evt() local
4455 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_complete_evt()
4466 conn = hci_conn_add(hdev, LE_LINK, &ev->bdaddr, ev->role); in hci_le_conn_complete_evt()
4472 conn->dst_type = ev->bdaddr_type; in hci_le_conn_complete_evt()
4483 conn->resp_addr_type = ev->bdaddr_type; in hci_le_conn_complete_evt()
4484 bacpy(&conn->resp_addr, &ev->bdaddr); in hci_le_conn_complete_evt()
4508 conn->init_addr_type = ev->bdaddr_type; in hci_le_conn_complete_evt()
4509 bacpy(&conn->init_addr, &ev->bdaddr); in hci_le_conn_complete_evt()
4535 if (ev->status) { in hci_le_conn_complete_evt()
4536 hci_le_conn_failed(conn, ev->status); in hci_le_conn_complete_evt()
4555 conn->handle = __le16_to_cpu(ev->handle); in hci_le_conn_complete_evt()
4558 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_complete_evt()
4559 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_complete_evt()
4560 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_complete_evt()
4565 if (!ev->status) { in hci_le_conn_complete_evt()
4587 hci_connect_cfm(conn, ev->status); in hci_le_conn_complete_evt()
4590 hci_connect_cfm(conn, ev->status); in hci_le_conn_complete_evt()
4612 struct hci_ev_le_conn_update_complete *ev = (void *) skb->data; in hci_le_conn_update_complete_evt() local
4615 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_conn_update_complete_evt()
4617 if (ev->status) in hci_le_conn_update_complete_evt()
4622 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_conn_update_complete_evt()
4624 conn->le_conn_interval = le16_to_cpu(ev->interval); in hci_le_conn_update_complete_evt()
4625 conn->le_conn_latency = le16_to_cpu(ev->latency); in hci_le_conn_update_complete_evt()
4626 conn->le_supv_timeout = le16_to_cpu(ev->supervision_timeout); in hci_le_conn_update_complete_evt()
4907 struct hci_ev_le_advertising_info *ev = ptr; in hci_le_adv_report_evt() local
4910 rssi = ev->data[ev->length]; in hci_le_adv_report_evt()
4911 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_adv_report_evt()
4912 ev->bdaddr_type, NULL, 0, rssi, in hci_le_adv_report_evt()
4913 ev->data, ev->length); in hci_le_adv_report_evt()
4915 ptr += sizeof(*ev) + ev->length + 1; in hci_le_adv_report_evt()
4924 struct hci_ev_le_remote_feat_complete *ev = (void *)skb->data; in hci_le_remote_feat_complete_evt() local
4927 BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); in hci_le_remote_feat_complete_evt()
4931 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_remote_feat_complete_evt()
4933 if (!ev->status) in hci_le_remote_feat_complete_evt()
4934 memcpy(conn->features[0], ev->features, 8); in hci_le_remote_feat_complete_evt()
4949 !conn->out && ev->status == 0x1a) in hci_le_remote_feat_complete_evt()
4952 status = ev->status; in hci_le_remote_feat_complete_evt()
4965 struct hci_ev_le_ltk_req *ev = (void *) skb->data; in hci_le_ltk_request_evt() local
4971 BT_DBG("%s handle 0x%4.4x", hdev->name, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
4975 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(ev->handle)); in hci_le_ltk_request_evt()
4985 if (ev->ediv || ev->rand) in hci_le_ltk_request_evt()
4989 if (ev->ediv != ltk->ediv || ev->rand != ltk->rand) in hci_le_ltk_request_evt()
5022 neg.handle = ev->handle; in hci_le_ltk_request_evt()
5042 struct hci_ev_le_remote_conn_param_req *ev = (void *) skb->data; in hci_le_remote_conn_param_req_evt() local
5047 handle = le16_to_cpu(ev->handle); in hci_le_remote_conn_param_req_evt()
5048 min = le16_to_cpu(ev->interval_min); in hci_le_remote_conn_param_req_evt()
5049 max = le16_to_cpu(ev->interval_max); in hci_le_remote_conn_param_req_evt()
5050 latency = le16_to_cpu(ev->latency); in hci_le_remote_conn_param_req_evt()
5051 timeout = le16_to_cpu(ev->timeout); in hci_le_remote_conn_param_req_evt()
5086 cp.handle = ev->handle; in hci_le_remote_conn_param_req_evt()
5087 cp.interval_min = ev->interval_min; in hci_le_remote_conn_param_req_evt()
5088 cp.interval_max = ev->interval_max; in hci_le_remote_conn_param_req_evt()
5089 cp.latency = ev->latency; in hci_le_remote_conn_param_req_evt()
5090 cp.timeout = ev->timeout; in hci_le_remote_conn_param_req_evt()
5106 struct hci_ev_le_direct_adv_info *ev = ptr; in hci_le_direct_adv_report_evt() local
5108 process_adv_report(hdev, ev->evt_type, &ev->bdaddr, in hci_le_direct_adv_report_evt()
5109 ev->bdaddr_type, &ev->direct_addr, in hci_le_direct_adv_report_evt()
5110 ev->direct_addr_type, ev->rssi, NULL, 0); in hci_le_direct_adv_report_evt()
5112 ptr += sizeof(*ev); in hci_le_direct_adv_report_evt()
5161 struct hci_ev_cmd_complete *ev; in hci_get_cmd_complete() local
5186 if (skb->len < sizeof(*ev)) { in hci_get_cmd_complete()
5191 ev = (void *) skb->data; in hci_get_cmd_complete()
5192 skb_pull(skb, sizeof(*ev)); in hci_get_cmd_complete()
5194 if (opcode != __le16_to_cpu(ev->opcode)) { in hci_get_cmd_complete()
5196 __le16_to_cpu(ev->opcode)); in hci_get_cmd_complete()