Lines Matching refs:cp
188 struct hci_cp_create_conn cp; in hci_acl_create_connection() local
200 memset(&cp, 0, sizeof(cp)); in hci_acl_create_connection()
201 bacpy(&cp.bdaddr, &conn->dst); in hci_acl_create_connection()
202 cp.pscan_rep_mode = 0x02; in hci_acl_create_connection()
207 cp.pscan_rep_mode = ie->data.pscan_rep_mode; in hci_acl_create_connection()
208 cp.pscan_mode = ie->data.pscan_mode; in hci_acl_create_connection()
209 cp.clock_offset = ie->data.clock_offset | in hci_acl_create_connection()
218 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_acl_create_connection()
220 cp.role_switch = 0x01; in hci_acl_create_connection()
222 cp.role_switch = 0x00; in hci_acl_create_connection()
224 hci_send_cmd(hdev, HCI_OP_CREATE_CONN, sizeof(cp), &cp); in hci_acl_create_connection()
252 struct hci_cp_add_sco cp; in hci_add_sco() local
261 cp.handle = cpu_to_le16(handle); in hci_add_sco()
262 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_add_sco()
264 hci_send_cmd(hdev, HCI_OP_ADD_SCO, sizeof(cp), &cp); in hci_add_sco()
270 struct hci_cp_setup_sync_conn cp; in hci_setup_sync() local
280 cp.handle = cpu_to_le16(handle); in hci_setup_sync()
282 cp.tx_bandwidth = cpu_to_le32(0x00001f40); in hci_setup_sync()
283 cp.rx_bandwidth = cpu_to_le32(0x00001f40); in hci_setup_sync()
284 cp.voice_setting = cpu_to_le16(conn->setting); in hci_setup_sync()
307 cp.retrans_effort = param->retrans_effort; in hci_setup_sync()
308 cp.pkt_type = __cpu_to_le16(param->pkt_type); in hci_setup_sync()
309 cp.max_latency = __cpu_to_le16(param->max_latency); in hci_setup_sync()
311 if (hci_send_cmd(hdev, HCI_OP_SETUP_SYNC_CONN, sizeof(cp), &cp) < 0) in hci_setup_sync()
322 struct hci_cp_le_conn_update cp; in hci_le_conn_update() local
336 memset(&cp, 0, sizeof(cp)); in hci_le_conn_update()
337 cp.handle = cpu_to_le16(conn->handle); in hci_le_conn_update()
338 cp.conn_interval_min = cpu_to_le16(min); in hci_le_conn_update()
339 cp.conn_interval_max = cpu_to_le16(max); in hci_le_conn_update()
340 cp.conn_latency = cpu_to_le16(latency); in hci_le_conn_update()
341 cp.supervision_timeout = cpu_to_le16(to_multiplier); in hci_le_conn_update()
342 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update()
343 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update()
345 hci_send_cmd(hdev, HCI_OP_LE_CONN_UPDATE, sizeof(cp), &cp); in hci_le_conn_update()
357 struct hci_cp_le_start_enc cp; in hci_le_start_enc() local
361 memset(&cp, 0, sizeof(cp)); in hci_le_start_enc()
363 cp.handle = cpu_to_le16(conn->handle); in hci_le_start_enc()
364 cp.rand = rand; in hci_le_start_enc()
365 cp.ediv = ediv; in hci_le_start_enc()
366 memcpy(cp.ltk, ltk, key_size); in hci_le_start_enc()
368 hci_send_cmd(hdev, HCI_OP_LE_START_ENC, sizeof(cp), &cp); in hci_le_start_enc()
438 struct hci_cp_sniff_subrate cp; in hci_conn_idle() local
439 cp.handle = cpu_to_le16(conn->handle); in hci_conn_idle()
440 cp.max_latency = cpu_to_le16(0); in hci_conn_idle()
441 cp.min_remote_timeout = cpu_to_le16(0); in hci_conn_idle()
442 cp.min_local_timeout = cpu_to_le16(0); in hci_conn_idle()
443 hci_send_cmd(hdev, HCI_OP_SNIFF_SUBRATE, sizeof(cp), &cp); in hci_conn_idle()
447 struct hci_cp_sniff_mode cp; in hci_conn_idle() local
448 cp.handle = cpu_to_le16(conn->handle); in hci_conn_idle()
449 cp.max_interval = cpu_to_le16(hdev->sniff_max_interval); in hci_conn_idle()
450 cp.min_interval = cpu_to_le16(hdev->sniff_min_interval); in hci_conn_idle()
451 cp.attempt = cpu_to_le16(4); in hci_conn_idle()
452 cp.timeout = cpu_to_le16(1); in hci_conn_idle()
453 hci_send_cmd(hdev, HCI_OP_SNIFF_MODE, sizeof(cp), &cp); in hci_conn_idle()
713 struct hci_cp_le_create_conn cp; in hci_req_add_le_create_conn() local
717 memset(&cp, 0, sizeof(cp)); in hci_req_add_le_create_conn()
728 cp.scan_interval = cpu_to_le16(hdev->le_scan_interval); in hci_req_add_le_create_conn()
729 cp.scan_window = cp.scan_interval; in hci_req_add_le_create_conn()
731 bacpy(&cp.peer_addr, &conn->dst); in hci_req_add_le_create_conn()
732 cp.peer_addr_type = conn->dst_type; in hci_req_add_le_create_conn()
733 cp.own_address_type = own_addr_type; in hci_req_add_le_create_conn()
734 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_req_add_le_create_conn()
735 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_req_add_le_create_conn()
736 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_req_add_le_create_conn()
737 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_req_add_le_create_conn()
738 cp.min_ce_len = cpu_to_le16(0x0000); in hci_req_add_le_create_conn()
739 cp.max_ce_len = cpu_to_le16(0x0000); in hci_req_add_le_create_conn()
741 hci_req_add(req, HCI_OP_LE_CREATE_CONN, sizeof(cp), &cp); in hci_req_add_le_create_conn()
751 struct hci_cp_le_set_adv_param cp; in hci_req_directed_advertising() local
768 memset(&cp, 0, sizeof(cp)); in hci_req_directed_advertising()
769 cp.type = LE_ADV_DIRECT_IND; in hci_req_directed_advertising()
770 cp.own_address_type = own_addr_type; in hci_req_directed_advertising()
771 cp.direct_addr_type = conn->dst_type; in hci_req_directed_advertising()
772 bacpy(&cp.direct_addr, &conn->dst); in hci_req_directed_advertising()
773 cp.channel_map = hdev->le_adv_channel_map; in hci_req_directed_advertising()
775 hci_req_add(req, HCI_OP_LE_SET_ADV_PARAM, sizeof(cp), &cp); in hci_req_directed_advertising()
1189 struct hci_cp_auth_requested cp; in hci_conn_auth() local
1191 cp.handle = cpu_to_le16(conn->handle); in hci_conn_auth()
1193 sizeof(cp), &cp); in hci_conn_auth()
1213 struct hci_cp_set_conn_encrypt cp; in hci_conn_encrypt() local
1214 cp.handle = cpu_to_le16(conn->handle); in hci_conn_encrypt()
1215 cp.encrypt = 0x01; in hci_conn_encrypt()
1216 hci_send_cmd(conn->hdev, HCI_OP_SET_CONN_ENCRYPT, sizeof(cp), in hci_conn_encrypt()
1217 &cp); in hci_conn_encrypt()
1319 struct hci_cp_switch_role cp; in hci_conn_switch_role() local
1320 bacpy(&cp.bdaddr, &conn->dst); in hci_conn_switch_role()
1321 cp.role = role; in hci_conn_switch_role()
1322 hci_send_cmd(conn->hdev, HCI_OP_SWITCH_ROLE, sizeof(cp), &cp); in hci_conn_switch_role()
1343 struct hci_cp_exit_sniff_mode cp; in hci_conn_enter_active_mode() local
1344 cp.handle = cpu_to_le16(conn->handle); in hci_conn_enter_active_mode()
1345 hci_send_cmd(hdev, HCI_OP_EXIT_SNIFF_MODE, sizeof(cp), &cp); in hci_conn_enter_active_mode()