Lines Matching refs:cp
192 struct hci_cp_create_conn cp; in hci_acl_create_connection() local
204 memset(&cp, 0, sizeof(cp)); in hci_acl_create_connection()
205 bacpy(&cp.bdaddr, &conn->dst); in hci_acl_create_connection()
206 cp.pscan_rep_mode = 0x02; in hci_acl_create_connection()
211 cp.pscan_rep_mode = ie->data.pscan_rep_mode; in hci_acl_create_connection()
212 cp.pscan_mode = ie->data.pscan_mode; in hci_acl_create_connection()
213 cp.clock_offset = ie->data.clock_offset | in hci_acl_create_connection()
222 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_acl_create_connection()
224 cp.role_switch = 0x01; in hci_acl_create_connection()
226 cp.role_switch = 0x00; in hci_acl_create_connection()
228 hci_send_cmd(hdev, HCI_OP_CREATE_CONN, sizeof(cp), &cp); in hci_acl_create_connection()
256 struct hci_cp_add_sco cp; in hci_add_sco() local
265 cp.handle = cpu_to_le16(handle); in hci_add_sco()
266 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_add_sco()
268 hci_send_cmd(hdev, HCI_OP_ADD_SCO, sizeof(cp), &cp); in hci_add_sco()
274 struct hci_cp_setup_sync_conn cp; in hci_setup_sync() local
284 cp.handle = cpu_to_le16(handle); in hci_setup_sync()
286 cp.tx_bandwidth = cpu_to_le32(0x00001f40); in hci_setup_sync()
287 cp.rx_bandwidth = cpu_to_le32(0x00001f40); in hci_setup_sync()
288 cp.voice_setting = cpu_to_le16(conn->setting); in hci_setup_sync()
311 cp.retrans_effort = param->retrans_effort; in hci_setup_sync()
312 cp.pkt_type = __cpu_to_le16(param->pkt_type); in hci_setup_sync()
313 cp.max_latency = __cpu_to_le16(param->max_latency); in hci_setup_sync()
315 if (hci_send_cmd(hdev, HCI_OP_SETUP_SYNC_CONN, sizeof(cp), &cp) < 0) in hci_setup_sync()
326 struct hci_cp_le_conn_update cp; in hci_le_conn_update() local
340 memset(&cp, 0, sizeof(cp)); in hci_le_conn_update()
341 cp.handle = cpu_to_le16(conn->handle); in hci_le_conn_update()
342 cp.conn_interval_min = cpu_to_le16(min); in hci_le_conn_update()
343 cp.conn_interval_max = cpu_to_le16(max); in hci_le_conn_update()
344 cp.conn_latency = cpu_to_le16(latency); in hci_le_conn_update()
345 cp.supervision_timeout = cpu_to_le16(to_multiplier); in hci_le_conn_update()
346 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update()
347 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update()
349 hci_send_cmd(hdev, HCI_OP_LE_CONN_UPDATE, sizeof(cp), &cp); in hci_le_conn_update()
361 struct hci_cp_le_start_enc cp; in hci_le_start_enc() local
365 memset(&cp, 0, sizeof(cp)); in hci_le_start_enc()
367 cp.handle = cpu_to_le16(conn->handle); in hci_le_start_enc()
368 cp.rand = rand; in hci_le_start_enc()
369 cp.ediv = ediv; in hci_le_start_enc()
370 memcpy(cp.ltk, ltk, key_size); in hci_le_start_enc()
372 hci_send_cmd(hdev, HCI_OP_LE_START_ENC, sizeof(cp), &cp); in hci_le_start_enc()
442 struct hci_cp_sniff_subrate cp; in hci_conn_idle() local
443 cp.handle = cpu_to_le16(conn->handle); in hci_conn_idle()
444 cp.max_latency = cpu_to_le16(0); in hci_conn_idle()
445 cp.min_remote_timeout = cpu_to_le16(0); in hci_conn_idle()
446 cp.min_local_timeout = cpu_to_le16(0); in hci_conn_idle()
447 hci_send_cmd(hdev, HCI_OP_SNIFF_SUBRATE, sizeof(cp), &cp); in hci_conn_idle()
451 struct hci_cp_sniff_mode cp; in hci_conn_idle() local
452 cp.handle = cpu_to_le16(conn->handle); in hci_conn_idle()
453 cp.max_interval = cpu_to_le16(hdev->sniff_max_interval); in hci_conn_idle()
454 cp.min_interval = cpu_to_le16(hdev->sniff_min_interval); in hci_conn_idle()
455 cp.attempt = cpu_to_le16(4); in hci_conn_idle()
456 cp.timeout = cpu_to_le16(1); in hci_conn_idle()
457 hci_send_cmd(hdev, HCI_OP_SNIFF_MODE, sizeof(cp), &cp); in hci_conn_idle()
798 struct hci_cp_le_ext_create_conn *cp; in hci_req_add_le_create_conn() local
800 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_req_add_le_create_conn()
803 cp = (void *) data; in hci_req_add_le_create_conn()
804 p = (void *) cp->data; in hci_req_add_le_create_conn()
806 memset(cp, 0, sizeof(*cp)); in hci_req_add_le_create_conn()
808 bacpy(&cp->peer_addr, &conn->dst); in hci_req_add_le_create_conn()
809 cp->peer_addr_type = conn->dst_type; in hci_req_add_le_create_conn()
810 cp->own_addr_type = own_addr_type; in hci_req_add_le_create_conn()
812 plen = sizeof(*cp); in hci_req_add_le_create_conn()
815 cp->phys |= LE_SCAN_PHY_1M; in hci_req_add_le_create_conn()
823 cp->phys |= LE_SCAN_PHY_2M; in hci_req_add_le_create_conn()
831 cp->phys |= LE_SCAN_PHY_CODED; in hci_req_add_le_create_conn()
840 struct hci_cp_le_create_conn cp; in hci_req_add_le_create_conn() local
842 memset(&cp, 0, sizeof(cp)); in hci_req_add_le_create_conn()
847 cp.scan_interval = cpu_to_le16(hdev->le_scan_interval); in hci_req_add_le_create_conn()
848 cp.scan_window = cp.scan_interval; in hci_req_add_le_create_conn()
850 bacpy(&cp.peer_addr, &conn->dst); in hci_req_add_le_create_conn()
851 cp.peer_addr_type = conn->dst_type; in hci_req_add_le_create_conn()
852 cp.own_address_type = own_addr_type; in hci_req_add_le_create_conn()
853 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_req_add_le_create_conn()
854 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_req_add_le_create_conn()
855 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_req_add_le_create_conn()
856 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_req_add_le_create_conn()
857 cp.min_ce_len = cpu_to_le16(0x0000); in hci_req_add_le_create_conn()
858 cp.max_ce_len = cpu_to_le16(0x0000); in hci_req_add_le_create_conn()
860 hci_req_add(req, HCI_OP_LE_CREATE_CONN, sizeof(cp), &cp); in hci_req_add_le_create_conn()
875 struct hci_cp_le_set_ext_adv_params cp; in hci_req_directed_advertising() local
885 memset(&cp, 0, sizeof(cp)); in hci_req_directed_advertising()
887 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_req_directed_advertising()
888 cp.own_addr_type = own_addr_type; in hci_req_directed_advertising()
889 cp.channel_map = hdev->le_adv_channel_map; in hci_req_directed_advertising()
890 cp.tx_power = HCI_TX_POWER_INVALID; in hci_req_directed_advertising()
891 cp.primary_phy = HCI_ADV_PHY_1M; in hci_req_directed_advertising()
892 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_req_directed_advertising()
893 cp.handle = 0; /* Use instance 0 for directed adv */ in hci_req_directed_advertising()
894 cp.own_addr_type = own_addr_type; in hci_req_directed_advertising()
895 cp.peer_addr_type = conn->dst_type; in hci_req_directed_advertising()
896 bacpy(&cp.peer_addr, &conn->dst); in hci_req_directed_advertising()
898 hci_req_add(req, HCI_OP_LE_SET_EXT_ADV_PARAMS, sizeof(cp), &cp); in hci_req_directed_advertising()
903 struct hci_cp_le_set_adv_set_rand_addr cp; in hci_req_directed_advertising() local
905 memset(&cp, 0, sizeof(cp)); in hci_req_directed_advertising()
907 cp.handle = 0; in hci_req_directed_advertising()
908 bacpy(&cp.bdaddr, &random_addr); in hci_req_directed_advertising()
912 sizeof(cp), &cp); in hci_req_directed_advertising()
917 struct hci_cp_le_set_adv_param cp; in hci_req_directed_advertising() local
933 memset(&cp, 0, sizeof(cp)); in hci_req_directed_advertising()
934 cp.type = LE_ADV_DIRECT_IND; in hci_req_directed_advertising()
935 cp.own_address_type = own_addr_type; in hci_req_directed_advertising()
936 cp.direct_addr_type = conn->dst_type; in hci_req_directed_advertising()
937 bacpy(&cp.direct_addr, &conn->dst); in hci_req_directed_advertising()
938 cp.channel_map = hdev->le_adv_channel_map; in hci_req_directed_advertising()
940 hci_req_add(req, HCI_OP_LE_SET_ADV_PARAM, sizeof(cp), &cp); in hci_req_directed_advertising()
1301 struct hci_cp_auth_requested cp; in hci_conn_auth() local
1303 cp.handle = cpu_to_le16(conn->handle); in hci_conn_auth()
1305 sizeof(cp), &cp); in hci_conn_auth()
1325 struct hci_cp_set_conn_encrypt cp; in hci_conn_encrypt() local
1326 cp.handle = cpu_to_le16(conn->handle); in hci_conn_encrypt()
1327 cp.encrypt = 0x01; in hci_conn_encrypt()
1328 hci_send_cmd(conn->hdev, HCI_OP_SET_CONN_ENCRYPT, sizeof(cp), in hci_conn_encrypt()
1329 &cp); in hci_conn_encrypt()
1431 struct hci_cp_switch_role cp; in hci_conn_switch_role() local
1432 bacpy(&cp.bdaddr, &conn->dst); in hci_conn_switch_role()
1433 cp.role = role; in hci_conn_switch_role()
1434 hci_send_cmd(conn->hdev, HCI_OP_SWITCH_ROLE, sizeof(cp), &cp); in hci_conn_switch_role()
1455 struct hci_cp_exit_sniff_mode cp; in hci_conn_enter_active_mode() local
1456 cp.handle = cpu_to_le16(conn->handle); in hci_conn_enter_active_mode()
1457 hci_send_cmd(hdev, HCI_OP_EXIT_SNIFF_MODE, sizeof(cp), &cp); in hci_conn_enter_active_mode()