Lines Matching full:cp
202 struct hci_cp_create_conn cp; in hci_acl_create_connection() local
231 memset(&cp, 0, sizeof(cp)); in hci_acl_create_connection()
232 bacpy(&cp.bdaddr, &conn->dst); in hci_acl_create_connection()
233 cp.pscan_rep_mode = 0x02; in hci_acl_create_connection()
238 cp.pscan_rep_mode = ie->data.pscan_rep_mode; in hci_acl_create_connection()
239 cp.pscan_mode = ie->data.pscan_mode; in hci_acl_create_connection()
240 cp.clock_offset = ie->data.clock_offset | in hci_acl_create_connection()
247 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_acl_create_connection()
249 cp.role_switch = 0x01; in hci_acl_create_connection()
251 cp.role_switch = 0x00; in hci_acl_create_connection()
253 hci_send_cmd(hdev, HCI_OP_CREATE_CONN, sizeof(cp), &cp); in hci_acl_create_connection()
281 struct hci_cp_add_sco cp; in hci_add_sco() local
290 cp.handle = cpu_to_le16(handle); in hci_add_sco()
291 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_add_sco()
293 hci_send_cmd(hdev, HCI_OP_ADD_SCO, sizeof(cp), &cp); in hci_add_sco()
313 struct hci_cp_setup_sync_conn cp; in hci_setup_sync() local
323 cp.handle = cpu_to_le16(handle); in hci_setup_sync()
325 cp.tx_bandwidth = cpu_to_le32(0x00001f40); in hci_setup_sync()
326 cp.rx_bandwidth = cpu_to_le32(0x00001f40); in hci_setup_sync()
327 cp.voice_setting = cpu_to_le16(conn->setting); in hci_setup_sync()
352 cp.retrans_effort = param->retrans_effort; in hci_setup_sync()
353 cp.pkt_type = __cpu_to_le16(param->pkt_type); in hci_setup_sync()
354 cp.max_latency = __cpu_to_le16(param->max_latency); in hci_setup_sync()
356 if (hci_send_cmd(hdev, HCI_OP_SETUP_SYNC_CONN, sizeof(cp), &cp) < 0) in hci_setup_sync()
367 struct hci_cp_le_conn_update cp; in hci_le_conn_update() local
381 memset(&cp, 0, sizeof(cp)); in hci_le_conn_update()
382 cp.handle = cpu_to_le16(conn->handle); in hci_le_conn_update()
383 cp.conn_interval_min = cpu_to_le16(min); in hci_le_conn_update()
384 cp.conn_interval_max = cpu_to_le16(max); in hci_le_conn_update()
385 cp.conn_latency = cpu_to_le16(latency); in hci_le_conn_update()
386 cp.supervision_timeout = cpu_to_le16(to_multiplier); in hci_le_conn_update()
387 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update()
388 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update()
390 hci_send_cmd(hdev, HCI_OP_LE_CONN_UPDATE, sizeof(cp), &cp); in hci_le_conn_update()
402 struct hci_cp_le_start_enc cp; in hci_le_start_enc() local
406 memset(&cp, 0, sizeof(cp)); in hci_le_start_enc()
408 cp.handle = cpu_to_le16(conn->handle); in hci_le_start_enc()
409 cp.rand = rand; in hci_le_start_enc()
410 cp.ediv = ediv; in hci_le_start_enc()
411 memcpy(cp.ltk, ltk, key_size); in hci_le_start_enc()
413 hci_send_cmd(hdev, HCI_OP_LE_START_ENC, sizeof(cp), &cp); in hci_le_start_enc()
483 struct hci_cp_sniff_subrate cp; in hci_conn_idle() local
484 cp.handle = cpu_to_le16(conn->handle); in hci_conn_idle()
485 cp.max_latency = cpu_to_le16(0); in hci_conn_idle()
486 cp.min_remote_timeout = cpu_to_le16(0); in hci_conn_idle()
487 cp.min_local_timeout = cpu_to_le16(0); in hci_conn_idle()
488 hci_send_cmd(hdev, HCI_OP_SNIFF_SUBRATE, sizeof(cp), &cp); in hci_conn_idle()
492 struct hci_cp_sniff_mode cp; in hci_conn_idle() local
493 cp.handle = cpu_to_le16(conn->handle); in hci_conn_idle()
494 cp.max_interval = cpu_to_le16(hdev->sniff_max_interval); in hci_conn_idle()
495 cp.min_interval = cpu_to_le16(hdev->sniff_min_interval); in hci_conn_idle()
496 cp.attempt = cpu_to_le16(4); in hci_conn_idle()
497 cp.timeout = cpu_to_le16(1); in hci_conn_idle()
498 hci_send_cmd(hdev, HCI_OP_SNIFF_MODE, sizeof(cp), &cp); in hci_conn_idle()
514 struct hci_cp_le_set_ext_adv_enable cp; in le_disable_advertising() local
516 cp.enable = 0x00; in le_disable_advertising()
517 cp.num_of_sets = 0x00; in le_disable_advertising()
519 hci_send_cmd(hdev, HCI_OP_LE_SET_EXT_ADV_ENABLE, sizeof(cp), in le_disable_advertising()
520 &cp); in le_disable_advertising()
875 struct hci_cp_le_ext_create_conn *cp; in hci_req_add_le_create_conn() local
877 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_req_add_le_create_conn()
880 cp = (void *) data; in hci_req_add_le_create_conn()
881 p = (void *) cp->data; in hci_req_add_le_create_conn()
883 memset(cp, 0, sizeof(*cp)); in hci_req_add_le_create_conn()
885 bacpy(&cp->peer_addr, &conn->dst); in hci_req_add_le_create_conn()
886 cp->peer_addr_type = conn->dst_type; in hci_req_add_le_create_conn()
887 cp->own_addr_type = own_addr_type; in hci_req_add_le_create_conn()
889 plen = sizeof(*cp); in hci_req_add_le_create_conn()
892 cp->phys |= LE_SCAN_PHY_1M; in hci_req_add_le_create_conn()
900 cp->phys |= LE_SCAN_PHY_2M; in hci_req_add_le_create_conn()
908 cp->phys |= LE_SCAN_PHY_CODED; in hci_req_add_le_create_conn()
917 struct hci_cp_le_create_conn cp; in hci_req_add_le_create_conn() local
919 memset(&cp, 0, sizeof(cp)); in hci_req_add_le_create_conn()
921 cp.scan_interval = cpu_to_le16(hdev->le_scan_int_connect); in hci_req_add_le_create_conn()
922 cp.scan_window = cpu_to_le16(hdev->le_scan_window_connect); in hci_req_add_le_create_conn()
924 bacpy(&cp.peer_addr, &conn->dst); in hci_req_add_le_create_conn()
925 cp.peer_addr_type = conn->dst_type; in hci_req_add_le_create_conn()
926 cp.own_address_type = own_addr_type; in hci_req_add_le_create_conn()
927 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_req_add_le_create_conn()
928 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_req_add_le_create_conn()
929 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_req_add_le_create_conn()
930 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_req_add_le_create_conn()
931 cp.min_ce_len = cpu_to_le16(0x0000); in hci_req_add_le_create_conn()
932 cp.max_ce_len = cpu_to_le16(0x0000); in hci_req_add_le_create_conn()
934 hci_req_add(req, HCI_OP_LE_CREATE_CONN, sizeof(cp), &cp); in hci_req_add_le_create_conn()
949 struct hci_cp_le_set_ext_adv_params cp; in hci_req_directed_advertising() local
959 memset(&cp, 0, sizeof(cp)); in hci_req_directed_advertising()
961 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_req_directed_advertising()
962 cp.own_addr_type = own_addr_type; in hci_req_directed_advertising()
963 cp.channel_map = hdev->le_adv_channel_map; in hci_req_directed_advertising()
964 cp.tx_power = HCI_TX_POWER_INVALID; in hci_req_directed_advertising()
965 cp.primary_phy = HCI_ADV_PHY_1M; in hci_req_directed_advertising()
966 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_req_directed_advertising()
967 cp.handle = 0; /* Use instance 0 for directed adv */ in hci_req_directed_advertising()
968 cp.own_addr_type = own_addr_type; in hci_req_directed_advertising()
969 cp.peer_addr_type = conn->dst_type; in hci_req_directed_advertising()
970 bacpy(&cp.peer_addr, &conn->dst); in hci_req_directed_advertising()
980 __hci_req_remove_ext_adv_instance(req, cp.handle); in hci_req_directed_advertising()
982 hci_req_add(req, HCI_OP_LE_SET_EXT_ADV_PARAMS, sizeof(cp), &cp); in hci_req_directed_advertising()
987 struct hci_cp_le_set_adv_set_rand_addr cp; in hci_req_directed_advertising() local
989 memset(&cp, 0, sizeof(cp)); in hci_req_directed_advertising()
991 cp.handle = 0; in hci_req_directed_advertising()
992 bacpy(&cp.bdaddr, &random_addr); in hci_req_directed_advertising()
996 sizeof(cp), &cp); in hci_req_directed_advertising()
1001 struct hci_cp_le_set_adv_param cp; in hci_req_directed_advertising() local
1017 memset(&cp, 0, sizeof(cp)); in hci_req_directed_advertising()
1023 cp.min_interval = cpu_to_le16(0x0020); in hci_req_directed_advertising()
1024 cp.max_interval = cpu_to_le16(0x0020); in hci_req_directed_advertising()
1026 cp.type = LE_ADV_DIRECT_IND; in hci_req_directed_advertising()
1027 cp.own_address_type = own_addr_type; in hci_req_directed_advertising()
1028 cp.direct_addr_type = conn->dst_type; in hci_req_directed_advertising()
1029 bacpy(&cp.direct_addr, &conn->dst); in hci_req_directed_advertising()
1030 cp.channel_map = hdev->le_adv_channel_map; in hci_req_directed_advertising()
1032 hci_req_add(req, HCI_OP_LE_SET_ADV_PARAM, sizeof(cp), &cp); in hci_req_directed_advertising()
1424 struct hci_cp_auth_requested cp; in hci_conn_auth() local
1426 cp.handle = cpu_to_le16(conn->handle); in hci_conn_auth()
1428 sizeof(cp), &cp); in hci_conn_auth()
1448 struct hci_cp_set_conn_encrypt cp; in hci_conn_encrypt() local
1449 cp.handle = cpu_to_le16(conn->handle); in hci_conn_encrypt()
1450 cp.encrypt = 0x01; in hci_conn_encrypt()
1451 hci_send_cmd(conn->hdev, HCI_OP_SET_CONN_ENCRYPT, sizeof(cp), in hci_conn_encrypt()
1452 &cp); in hci_conn_encrypt()
1562 struct hci_cp_switch_role cp; in hci_conn_switch_role() local
1563 bacpy(&cp.bdaddr, &conn->dst); in hci_conn_switch_role()
1564 cp.role = role; in hci_conn_switch_role()
1565 hci_send_cmd(conn->hdev, HCI_OP_SWITCH_ROLE, sizeof(cp), &cp); in hci_conn_switch_role()
1586 struct hci_cp_exit_sniff_mode cp; in hci_conn_enter_active_mode() local
1587 cp.handle = cpu_to_le16(conn->handle); in hci_conn_enter_active_mode()
1588 hci_send_cmd(hdev, HCI_OP_EXIT_SNIFF_MODE, sizeof(cp), &cp); in hci_conn_enter_active_mode()