Lines Matching full:cp
202 struct hci_cp_create_conn cp; in hci_acl_create_connection() local
214 memset(&cp, 0, sizeof(cp)); in hci_acl_create_connection()
215 bacpy(&cp.bdaddr, &conn->dst); in hci_acl_create_connection()
216 cp.pscan_rep_mode = 0x02; in hci_acl_create_connection()
221 cp.pscan_rep_mode = ie->data.pscan_rep_mode; in hci_acl_create_connection()
222 cp.pscan_mode = ie->data.pscan_mode; in hci_acl_create_connection()
223 cp.clock_offset = ie->data.clock_offset | in hci_acl_create_connection()
230 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_acl_create_connection()
232 cp.role_switch = 0x01; in hci_acl_create_connection()
234 cp.role_switch = 0x00; in hci_acl_create_connection()
236 hci_send_cmd(hdev, HCI_OP_CREATE_CONN, sizeof(cp), &cp); in hci_acl_create_connection()
264 struct hci_cp_add_sco cp; in hci_add_sco() local
273 cp.handle = cpu_to_le16(handle); in hci_add_sco()
274 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_add_sco()
276 hci_send_cmd(hdev, HCI_OP_ADD_SCO, sizeof(cp), &cp); in hci_add_sco()
282 struct hci_cp_setup_sync_conn cp; in hci_setup_sync() local
292 cp.handle = cpu_to_le16(handle); in hci_setup_sync()
294 cp.tx_bandwidth = cpu_to_le32(0x00001f40); in hci_setup_sync()
295 cp.rx_bandwidth = cpu_to_le32(0x00001f40); in hci_setup_sync()
296 cp.voice_setting = cpu_to_le16(conn->setting); in hci_setup_sync()
319 cp.retrans_effort = param->retrans_effort; in hci_setup_sync()
320 cp.pkt_type = __cpu_to_le16(param->pkt_type); in hci_setup_sync()
321 cp.max_latency = __cpu_to_le16(param->max_latency); in hci_setup_sync()
323 if (hci_send_cmd(hdev, HCI_OP_SETUP_SYNC_CONN, sizeof(cp), &cp) < 0) in hci_setup_sync()
334 struct hci_cp_le_conn_update cp; in hci_le_conn_update() local
348 memset(&cp, 0, sizeof(cp)); in hci_le_conn_update()
349 cp.handle = cpu_to_le16(conn->handle); in hci_le_conn_update()
350 cp.conn_interval_min = cpu_to_le16(min); in hci_le_conn_update()
351 cp.conn_interval_max = cpu_to_le16(max); in hci_le_conn_update()
352 cp.conn_latency = cpu_to_le16(latency); in hci_le_conn_update()
353 cp.supervision_timeout = cpu_to_le16(to_multiplier); in hci_le_conn_update()
354 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update()
355 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update()
357 hci_send_cmd(hdev, HCI_OP_LE_CONN_UPDATE, sizeof(cp), &cp); in hci_le_conn_update()
369 struct hci_cp_le_start_enc cp; in hci_le_start_enc() local
373 memset(&cp, 0, sizeof(cp)); in hci_le_start_enc()
375 cp.handle = cpu_to_le16(conn->handle); in hci_le_start_enc()
376 cp.rand = rand; in hci_le_start_enc()
377 cp.ediv = ediv; in hci_le_start_enc()
378 memcpy(cp.ltk, ltk, key_size); in hci_le_start_enc()
380 hci_send_cmd(hdev, HCI_OP_LE_START_ENC, sizeof(cp), &cp); in hci_le_start_enc()
450 struct hci_cp_sniff_subrate cp; in hci_conn_idle() local
451 cp.handle = cpu_to_le16(conn->handle); in hci_conn_idle()
452 cp.max_latency = cpu_to_le16(0); in hci_conn_idle()
453 cp.min_remote_timeout = cpu_to_le16(0); in hci_conn_idle()
454 cp.min_local_timeout = cpu_to_le16(0); in hci_conn_idle()
455 hci_send_cmd(hdev, HCI_OP_SNIFF_SUBRATE, sizeof(cp), &cp); in hci_conn_idle()
459 struct hci_cp_sniff_mode cp; in hci_conn_idle() local
460 cp.handle = cpu_to_le16(conn->handle); in hci_conn_idle()
461 cp.max_interval = cpu_to_le16(hdev->sniff_max_interval); in hci_conn_idle()
462 cp.min_interval = cpu_to_le16(hdev->sniff_min_interval); in hci_conn_idle()
463 cp.attempt = cpu_to_le16(4); in hci_conn_idle()
464 cp.timeout = cpu_to_le16(1); in hci_conn_idle()
465 hci_send_cmd(hdev, HCI_OP_SNIFF_MODE, sizeof(cp), &cp); in hci_conn_idle()
481 struct hci_cp_le_set_ext_adv_enable cp; in le_disable_advertising() local
483 cp.enable = 0x00; in le_disable_advertising()
484 cp.num_of_sets = 0x00; in le_disable_advertising()
486 hci_send_cmd(hdev, HCI_OP_LE_SET_EXT_ADV_ENABLE, sizeof(cp), in le_disable_advertising()
487 &cp); in le_disable_advertising()
829 struct hci_cp_le_ext_create_conn *cp; in hci_req_add_le_create_conn() local
831 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_req_add_le_create_conn()
834 cp = (void *) data; in hci_req_add_le_create_conn()
835 p = (void *) cp->data; in hci_req_add_le_create_conn()
837 memset(cp, 0, sizeof(*cp)); in hci_req_add_le_create_conn()
839 bacpy(&cp->peer_addr, &conn->dst); in hci_req_add_le_create_conn()
840 cp->peer_addr_type = conn->dst_type; in hci_req_add_le_create_conn()
841 cp->own_addr_type = own_addr_type; in hci_req_add_le_create_conn()
843 plen = sizeof(*cp); in hci_req_add_le_create_conn()
846 cp->phys |= LE_SCAN_PHY_1M; in hci_req_add_le_create_conn()
854 cp->phys |= LE_SCAN_PHY_2M; in hci_req_add_le_create_conn()
862 cp->phys |= LE_SCAN_PHY_CODED; in hci_req_add_le_create_conn()
871 struct hci_cp_le_create_conn cp; in hci_req_add_le_create_conn() local
873 memset(&cp, 0, sizeof(cp)); in hci_req_add_le_create_conn()
875 cp.scan_interval = cpu_to_le16(hdev->le_scan_int_connect); in hci_req_add_le_create_conn()
876 cp.scan_window = cpu_to_le16(hdev->le_scan_window_connect); in hci_req_add_le_create_conn()
878 bacpy(&cp.peer_addr, &conn->dst); in hci_req_add_le_create_conn()
879 cp.peer_addr_type = conn->dst_type; in hci_req_add_le_create_conn()
880 cp.own_address_type = own_addr_type; in hci_req_add_le_create_conn()
881 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_req_add_le_create_conn()
882 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_req_add_le_create_conn()
883 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_req_add_le_create_conn()
884 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_req_add_le_create_conn()
885 cp.min_ce_len = cpu_to_le16(0x0000); in hci_req_add_le_create_conn()
886 cp.max_ce_len = cpu_to_le16(0x0000); in hci_req_add_le_create_conn()
888 hci_req_add(req, HCI_OP_LE_CREATE_CONN, sizeof(cp), &cp); in hci_req_add_le_create_conn()
903 struct hci_cp_le_set_ext_adv_params cp; in hci_req_directed_advertising() local
913 memset(&cp, 0, sizeof(cp)); in hci_req_directed_advertising()
915 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_req_directed_advertising()
916 cp.own_addr_type = own_addr_type; in hci_req_directed_advertising()
917 cp.channel_map = hdev->le_adv_channel_map; in hci_req_directed_advertising()
918 cp.tx_power = HCI_TX_POWER_INVALID; in hci_req_directed_advertising()
919 cp.primary_phy = HCI_ADV_PHY_1M; in hci_req_directed_advertising()
920 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_req_directed_advertising()
921 cp.handle = 0; /* Use instance 0 for directed adv */ in hci_req_directed_advertising()
922 cp.own_addr_type = own_addr_type; in hci_req_directed_advertising()
923 cp.peer_addr_type = conn->dst_type; in hci_req_directed_advertising()
924 bacpy(&cp.peer_addr, &conn->dst); in hci_req_directed_advertising()
934 __hci_req_remove_ext_adv_instance(req, cp.handle); in hci_req_directed_advertising()
936 hci_req_add(req, HCI_OP_LE_SET_EXT_ADV_PARAMS, sizeof(cp), &cp); in hci_req_directed_advertising()
941 struct hci_cp_le_set_adv_set_rand_addr cp; in hci_req_directed_advertising() local
943 memset(&cp, 0, sizeof(cp)); in hci_req_directed_advertising()
945 cp.handle = 0; in hci_req_directed_advertising()
946 bacpy(&cp.bdaddr, &random_addr); in hci_req_directed_advertising()
950 sizeof(cp), &cp); in hci_req_directed_advertising()
955 struct hci_cp_le_set_adv_param cp; in hci_req_directed_advertising() local
971 memset(&cp, 0, sizeof(cp)); in hci_req_directed_advertising()
977 cp.min_interval = cpu_to_le16(0x0020); in hci_req_directed_advertising()
978 cp.max_interval = cpu_to_le16(0x0020); in hci_req_directed_advertising()
980 cp.type = LE_ADV_DIRECT_IND; in hci_req_directed_advertising()
981 cp.own_address_type = own_addr_type; in hci_req_directed_advertising()
982 cp.direct_addr_type = conn->dst_type; in hci_req_directed_advertising()
983 bacpy(&cp.direct_addr, &conn->dst); in hci_req_directed_advertising()
984 cp.channel_map = hdev->le_adv_channel_map; in hci_req_directed_advertising()
986 hci_req_add(req, HCI_OP_LE_SET_ADV_PARAM, sizeof(cp), &cp); in hci_req_directed_advertising()
1373 struct hci_cp_auth_requested cp; in hci_conn_auth() local
1375 cp.handle = cpu_to_le16(conn->handle); in hci_conn_auth()
1377 sizeof(cp), &cp); in hci_conn_auth()
1397 struct hci_cp_set_conn_encrypt cp; in hci_conn_encrypt() local
1398 cp.handle = cpu_to_le16(conn->handle); in hci_conn_encrypt()
1399 cp.encrypt = 0x01; in hci_conn_encrypt()
1400 hci_send_cmd(conn->hdev, HCI_OP_SET_CONN_ENCRYPT, sizeof(cp), in hci_conn_encrypt()
1401 &cp); in hci_conn_encrypt()
1511 struct hci_cp_switch_role cp; in hci_conn_switch_role() local
1512 bacpy(&cp.bdaddr, &conn->dst); in hci_conn_switch_role()
1513 cp.role = role; in hci_conn_switch_role()
1514 hci_send_cmd(conn->hdev, HCI_OP_SWITCH_ROLE, sizeof(cp), &cp); in hci_conn_switch_role()
1535 struct hci_cp_exit_sniff_mode cp; in hci_conn_enter_active_mode() local
1536 cp.handle = cpu_to_le16(conn->handle); in hci_conn_enter_active_mode()
1537 hci_send_cmd(hdev, HCI_OP_EXIT_SNIFF_MODE, sizeof(cp), &cp); in hci_conn_enter_active_mode()