Lines Matching refs:cp
786 struct hci_cp_read_clock *cp; in hci_cc_read_clock() local
799 cp = hci_sent_cmd_data(hdev, HCI_OP_READ_CLOCK); in hci_cc_read_clock()
800 if (!cp) in hci_cc_read_clock()
803 if (cp->which == 0x00) { in hci_cc_read_clock()
896 struct hci_cp_pin_code_reply *cp; in hci_cc_pin_code_reply() local
909 cp = hci_sent_cmd_data(hdev, HCI_OP_PIN_CODE_REPLY); in hci_cc_pin_code_reply()
910 if (!cp) in hci_cc_pin_code_reply()
913 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); in hci_cc_pin_code_reply()
915 conn->pin_length = cp->pin_len; in hci_cc_pin_code_reply()
1116 struct hci_cp_le_set_scan_param *cp; in hci_cc_le_set_scan_param() local
1124 cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_SCAN_PARAM); in hci_cc_le_set_scan_param()
1125 if (!cp) in hci_cc_le_set_scan_param()
1130 hdev->le_scan_type = cp->type; in hci_cc_le_set_scan_param()
1167 struct hci_cp_le_set_scan_enable *cp; in hci_cc_le_set_scan_enable() local
1175 cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_SCAN_ENABLE); in hci_cc_le_set_scan_enable()
1176 if (!cp) in hci_cc_le_set_scan_enable()
1181 switch (cp->enable) { in hci_cc_le_set_scan_enable()
1226 BT_ERR("Used reserved LE_Scan_Enable param %d", cp->enable); in hci_cc_le_set_scan_enable()
1395 struct hci_cp_le_set_adv_param *cp; in hci_cc_set_adv_param() local
1403 cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_ADV_PARAM); in hci_cc_set_adv_param()
1404 if (!cp) in hci_cc_set_adv_param()
1408 hdev->adv_addr_type = cp->own_address_type; in hci_cc_set_adv_param()
1508 struct hci_cp_create_conn *cp; in hci_cs_create_conn() local
1513 cp = hci_sent_cmd_data(hdev, HCI_OP_CREATE_CONN); in hci_cs_create_conn()
1514 if (!cp) in hci_cs_create_conn()
1519 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); in hci_cs_create_conn()
1521 BT_DBG("%s bdaddr %pMR hcon %p", hdev->name, &cp->bdaddr, conn); in hci_cs_create_conn()
1534 conn = hci_conn_add(hdev, ACL_LINK, &cp->bdaddr, in hci_cs_create_conn()
1546 struct hci_cp_add_sco *cp; in hci_cs_add_sco() local
1555 cp = hci_sent_cmd_data(hdev, HCI_OP_ADD_SCO); in hci_cs_add_sco()
1556 if (!cp) in hci_cs_add_sco()
1559 handle = __le16_to_cpu(cp->handle); in hci_cs_add_sco()
1581 struct hci_cp_auth_requested *cp; in hci_cs_auth_requested() local
1589 cp = hci_sent_cmd_data(hdev, HCI_OP_AUTH_REQUESTED); in hci_cs_auth_requested()
1590 if (!cp) in hci_cs_auth_requested()
1595 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); in hci_cs_auth_requested()
1608 struct hci_cp_set_conn_encrypt *cp; in hci_cs_set_conn_encrypt() local
1616 cp = hci_sent_cmd_data(hdev, HCI_OP_SET_CONN_ENCRYPT); in hci_cs_set_conn_encrypt()
1617 if (!cp) in hci_cs_set_conn_encrypt()
1622 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); in hci_cs_set_conn_encrypt()
1658 struct hci_cp_remote_name_req cp; in hci_resolve_name() local
1660 memset(&cp, 0, sizeof(cp)); in hci_resolve_name()
1662 bacpy(&cp.bdaddr, &e->data.bdaddr); in hci_resolve_name()
1663 cp.pscan_rep_mode = e->data.pscan_rep_mode; in hci_resolve_name()
1664 cp.pscan_mode = e->data.pscan_mode; in hci_resolve_name()
1665 cp.clock_offset = e->data.clock_offset; in hci_resolve_name()
1667 return hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ, sizeof(cp), &cp); in hci_resolve_name()
1741 struct hci_cp_remote_name_req *cp; in hci_cs_remote_name_req() local
1751 cp = hci_sent_cmd_data(hdev, HCI_OP_REMOTE_NAME_REQ); in hci_cs_remote_name_req()
1752 if (!cp) in hci_cs_remote_name_req()
1757 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); in hci_cs_remote_name_req()
1760 hci_check_pending_name(hdev, conn, &cp->bdaddr, NULL, 0); in hci_cs_remote_name_req()
1784 struct hci_cp_read_remote_features *cp; in hci_cs_read_remote_features() local
1792 cp = hci_sent_cmd_data(hdev, HCI_OP_READ_REMOTE_FEATURES); in hci_cs_read_remote_features()
1793 if (!cp) in hci_cs_read_remote_features()
1798 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); in hci_cs_read_remote_features()
1811 struct hci_cp_read_remote_ext_features *cp; in hci_cs_read_remote_ext_features() local
1819 cp = hci_sent_cmd_data(hdev, HCI_OP_READ_REMOTE_EXT_FEATURES); in hci_cs_read_remote_ext_features()
1820 if (!cp) in hci_cs_read_remote_ext_features()
1825 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); in hci_cs_read_remote_ext_features()
1838 struct hci_cp_setup_sync_conn *cp; in hci_cs_setup_sync_conn() local
1847 cp = hci_sent_cmd_data(hdev, HCI_OP_SETUP_SYNC_CONN); in hci_cs_setup_sync_conn()
1848 if (!cp) in hci_cs_setup_sync_conn()
1851 handle = __le16_to_cpu(cp->handle); in hci_cs_setup_sync_conn()
1873 struct hci_cp_sniff_mode *cp; in hci_cs_sniff_mode() local
1881 cp = hci_sent_cmd_data(hdev, HCI_OP_SNIFF_MODE); in hci_cs_sniff_mode()
1882 if (!cp) in hci_cs_sniff_mode()
1887 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); in hci_cs_sniff_mode()
1900 struct hci_cp_exit_sniff_mode *cp; in hci_cs_exit_sniff_mode() local
1908 cp = hci_sent_cmd_data(hdev, HCI_OP_EXIT_SNIFF_MODE); in hci_cs_exit_sniff_mode()
1909 if (!cp) in hci_cs_exit_sniff_mode()
1914 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); in hci_cs_exit_sniff_mode()
1927 struct hci_cp_disconnect *cp; in hci_cs_disconnect() local
1933 cp = hci_sent_cmd_data(hdev, HCI_OP_DISCONNECT); in hci_cs_disconnect()
1934 if (!cp) in hci_cs_disconnect()
1939 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); in hci_cs_disconnect()
1949 struct hci_cp_create_phy_link *cp; in hci_cs_create_phylink() local
1953 cp = hci_sent_cmd_data(hdev, HCI_OP_CREATE_PHY_LINK); in hci_cs_create_phylink()
1954 if (!cp) in hci_cs_create_phylink()
1962 hcon = hci_conn_hash_lookup_handle(hdev, cp->phy_handle); in hci_cs_create_phylink()
1966 amp_write_remote_assoc(hdev, cp->phy_handle); in hci_cs_create_phylink()
1974 struct hci_cp_accept_phy_link *cp; in hci_cs_accept_phylink() local
1981 cp = hci_sent_cmd_data(hdev, HCI_OP_ACCEPT_PHY_LINK); in hci_cs_accept_phylink()
1982 if (!cp) in hci_cs_accept_phylink()
1985 amp_write_remote_assoc(hdev, cp->phy_handle); in hci_cs_accept_phylink()
1990 struct hci_cp_le_create_conn *cp; in hci_cs_le_create_conn() local
2002 cp = hci_sent_cmd_data(hdev, HCI_OP_LE_CREATE_CONN); in hci_cs_le_create_conn()
2003 if (!cp) in hci_cs_le_create_conn()
2008 conn = hci_conn_hash_lookup_ba(hdev, LE_LINK, &cp->peer_addr); in hci_cs_le_create_conn()
2016 conn->init_addr_type = cp->own_address_type; in hci_cs_le_create_conn()
2017 if (cp->own_address_type == ADDR_LE_DEV_RANDOM) in hci_cs_le_create_conn()
2022 conn->resp_addr_type = cp->peer_addr_type; in hci_cs_le_create_conn()
2023 bacpy(&conn->resp_addr, &cp->peer_addr); in hci_cs_le_create_conn()
2030 if (cp->filter_policy == HCI_LE_USE_PEER_ADDR) in hci_cs_le_create_conn()
2041 struct hci_cp_le_read_remote_features *cp; in hci_cs_le_read_remote_features() local
2049 cp = hci_sent_cmd_data(hdev, HCI_OP_LE_READ_REMOTE_FEATURES); in hci_cs_le_read_remote_features()
2050 if (!cp) in hci_cs_le_read_remote_features()
2055 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); in hci_cs_le_read_remote_features()
2068 struct hci_cp_le_start_enc *cp; in hci_cs_le_start_enc() local
2078 cp = hci_sent_cmd_data(hdev, HCI_OP_LE_START_ENC); in hci_cs_le_start_enc()
2079 if (!cp) in hci_cs_le_start_enc()
2082 conn = hci_conn_hash_lookup_handle(hdev, __le16_to_cpu(cp->handle)); in hci_cs_le_start_enc()
2098 struct hci_cp_switch_role *cp; in hci_cs_switch_role() local
2106 cp = hci_sent_cmd_data(hdev, HCI_OP_SWITCH_ROLE); in hci_cs_switch_role()
2107 if (!cp) in hci_cs_switch_role()
2112 conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &cp->bdaddr); in hci_cs_switch_role()
2263 struct hci_cp_read_remote_features cp; in hci_conn_complete_evt() local
2264 cp.handle = ev->handle; in hci_conn_complete_evt()
2266 sizeof(cp), &cp); in hci_conn_complete_evt()
2273 struct hci_cp_change_conn_ptype cp; in hci_conn_complete_evt() local
2274 cp.handle = ev->handle; in hci_conn_complete_evt()
2275 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_conn_complete_evt()
2276 hci_send_cmd(hdev, HCI_OP_CHANGE_CONN_PTYPE, sizeof(cp), in hci_conn_complete_evt()
2277 &cp); in hci_conn_complete_evt()
2303 struct hci_cp_reject_conn_req cp; in hci_reject_conn() local
2305 bacpy(&cp.bdaddr, bdaddr); in hci_reject_conn()
2306 cp.reason = HCI_ERROR_REJ_BAD_ADDR; in hci_reject_conn()
2307 hci_send_cmd(hdev, HCI_OP_REJECT_CONN_REQ, sizeof(cp), &cp); in hci_reject_conn()
2373 struct hci_cp_accept_conn_req cp; in hci_conn_request_evt() local
2376 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2379 cp.role = 0x00; /* Become master */ in hci_conn_request_evt()
2381 cp.role = 0x01; /* Remain slave */ in hci_conn_request_evt()
2383 hci_send_cmd(hdev, HCI_OP_ACCEPT_CONN_REQ, sizeof(cp), &cp); in hci_conn_request_evt()
2385 struct hci_cp_accept_sync_conn_req cp; in hci_conn_request_evt() local
2388 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_conn_request_evt()
2389 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_conn_request_evt()
2391 cp.tx_bandwidth = cpu_to_le32(0x00001f40); in hci_conn_request_evt()
2392 cp.rx_bandwidth = cpu_to_le32(0x00001f40); in hci_conn_request_evt()
2393 cp.max_latency = cpu_to_le16(0xffff); in hci_conn_request_evt()
2394 cp.content_format = cpu_to_le16(hdev->voice_setting); in hci_conn_request_evt()
2395 cp.retrans_effort = 0xff; in hci_conn_request_evt()
2397 hci_send_cmd(hdev, HCI_OP_ACCEPT_SYNC_CONN_REQ, sizeof(cp), in hci_conn_request_evt()
2398 &cp); in hci_conn_request_evt()
2529 struct hci_cp_set_conn_encrypt cp; in hci_auth_complete_evt() local
2530 cp.handle = ev->handle; in hci_auth_complete_evt()
2531 cp.encrypt = 0x01; in hci_auth_complete_evt()
2532 hci_send_cmd(hdev, HCI_OP_SET_CONN_ENCRYPT, sizeof(cp), in hci_auth_complete_evt()
2533 &cp); in hci_auth_complete_evt()
2549 struct hci_cp_set_conn_encrypt cp; in hci_auth_complete_evt() local
2550 cp.handle = ev->handle; in hci_auth_complete_evt()
2551 cp.encrypt = 0x01; in hci_auth_complete_evt()
2552 hci_send_cmd(hdev, HCI_OP_SET_CONN_ENCRYPT, sizeof(cp), in hci_auth_complete_evt()
2553 &cp); in hci_auth_complete_evt()
2594 struct hci_cp_auth_requested cp; in hci_remote_name_evt() local
2598 cp.handle = __cpu_to_le16(conn->handle); in hci_remote_name_evt()
2599 hci_send_cmd(hdev, HCI_OP_AUTH_REQUESTED, sizeof(cp), &cp); in hci_remote_name_evt()
2723 struct hci_cp_read_remote_ext_features cp; in hci_remote_features_evt() local
2724 cp.handle = ev->handle; in hci_remote_features_evt()
2725 cp.page = 0x01; in hci_remote_features_evt()
2727 sizeof(cp), &cp); in hci_remote_features_evt()
2732 struct hci_cp_remote_name_req cp; in hci_remote_features_evt() local
2733 memset(&cp, 0, sizeof(cp)); in hci_remote_features_evt()
2734 bacpy(&cp.bdaddr, &conn->dst); in hci_remote_features_evt()
2735 cp.pscan_rep_mode = 0x02; in hci_remote_features_evt()
2736 hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ, sizeof(cp), &cp); in hci_remote_features_evt()
3437 struct hci_cp_link_key_reply cp; in hci_link_key_request_evt() local
3480 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_link_key_request_evt()
3481 memcpy(cp.link_key, key->val, HCI_LINK_KEY_SIZE); in hci_link_key_request_evt()
3483 hci_send_cmd(hdev, HCI_OP_LINK_KEY_REPLY, sizeof(cp), &cp); in hci_link_key_request_evt()
3721 struct hci_cp_remote_name_req cp; in hci_remote_ext_features_evt() local
3722 memset(&cp, 0, sizeof(cp)); in hci_remote_ext_features_evt()
3723 bacpy(&cp.bdaddr, &conn->dst); in hci_remote_ext_features_evt()
3724 cp.pscan_rep_mode = 0x02; in hci_remote_ext_features_evt()
3725 hci_send_cmd(hdev, HCI_OP_REMOTE_NAME_REQ, sizeof(cp), &cp); in hci_remote_ext_features_evt()
3999 struct hci_cp_io_capability_reply cp; in hci_io_capa_request_evt() local
4001 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4004 cp.capability = (conn->io_capability == 0x04) ? in hci_io_capa_request_evt()
4025 cp.authentication = conn->auth_type; in hci_io_capa_request_evt()
4026 cp.oob_data = bredr_oob_data_present(conn); in hci_io_capa_request_evt()
4029 sizeof(cp), &cp); in hci_io_capa_request_evt()
4031 struct hci_cp_io_capability_neg_reply cp; in hci_io_capa_request_evt() local
4033 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_io_capa_request_evt()
4034 cp.reason = HCI_ERROR_PAIRING_NOT_ALLOWED; in hci_io_capa_request_evt()
4037 sizeof(cp), &cp); in hci_io_capa_request_evt()
4277 struct hci_cp_remote_oob_data_neg_reply cp; in hci_remote_oob_data_request_evt() local
4279 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4281 sizeof(cp), &cp); in hci_remote_oob_data_request_evt()
4286 struct hci_cp_remote_oob_ext_data_reply cp; in hci_remote_oob_data_request_evt() local
4288 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4290 memset(cp.hash192, 0, sizeof(cp.hash192)); in hci_remote_oob_data_request_evt()
4291 memset(cp.rand192, 0, sizeof(cp.rand192)); in hci_remote_oob_data_request_evt()
4293 memcpy(cp.hash192, data->hash192, sizeof(cp.hash192)); in hci_remote_oob_data_request_evt()
4294 memcpy(cp.rand192, data->rand192, sizeof(cp.rand192)); in hci_remote_oob_data_request_evt()
4296 memcpy(cp.hash256, data->hash256, sizeof(cp.hash256)); in hci_remote_oob_data_request_evt()
4297 memcpy(cp.rand256, data->rand256, sizeof(cp.rand256)); in hci_remote_oob_data_request_evt()
4300 sizeof(cp), &cp); in hci_remote_oob_data_request_evt()
4302 struct hci_cp_remote_oob_data_reply cp; in hci_remote_oob_data_request_evt() local
4304 bacpy(&cp.bdaddr, &ev->bdaddr); in hci_remote_oob_data_request_evt()
4305 memcpy(cp.hash, data->hash192, sizeof(cp.hash)); in hci_remote_oob_data_request_evt()
4306 memcpy(cp.rand, data->rand192, sizeof(cp.rand)); in hci_remote_oob_data_request_evt()
4309 sizeof(cp), &cp); in hci_remote_oob_data_request_evt()
4570 struct hci_cp_le_read_remote_features cp; in hci_le_conn_complete_evt() local
4572 cp.handle = __cpu_to_le16(conn->handle); in hci_le_conn_complete_evt()
4575 sizeof(cp), &cp); in hci_le_conn_complete_evt()
4931 struct hci_cp_le_ltk_reply cp; in hci_le_ltk_request_evt() local
4958 memcpy(cp.ltk, ltk->val, sizeof(ltk->val)); in hci_le_ltk_request_evt()
4959 cp.handle = cpu_to_le16(conn->handle); in hci_le_ltk_request_evt()
4965 hci_send_cmd(hdev, HCI_OP_LE_LTK_REPLY, sizeof(cp), &cp); in hci_le_ltk_request_evt()
4994 struct hci_cp_le_conn_param_req_neg_reply cp; in send_conn_param_neg_reply() local
4996 cp.handle = cpu_to_le16(handle); in send_conn_param_neg_reply()
4997 cp.reason = reason; in send_conn_param_neg_reply()
4999 hci_send_cmd(hdev, HCI_OP_LE_CONN_PARAM_REQ_NEG_REPLY, sizeof(cp), in send_conn_param_neg_reply()
5000 &cp); in send_conn_param_neg_reply()
5007 struct hci_cp_le_conn_param_req_reply cp; in hci_le_remote_conn_param_req_evt() local
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()
5055 cp.min_ce_len = 0; in hci_le_remote_conn_param_req_evt()
5056 cp.max_ce_len = 0; in hci_le_remote_conn_param_req_evt()
5058 hci_send_cmd(hdev, HCI_OP_LE_CONN_PARAM_REQ_REPLY, sizeof(cp), &cp); in hci_le_remote_conn_param_req_evt()