Lines Matching refs:cp

404     struct bt_hci_cp_le_set_scan_enable *cp;  in hci_api_le_scan_enable()  local
408 buf = bt_hci_cmd_create(BT_HCI_OP_LE_SET_SCAN_ENABLE, sizeof(*cp)); in hci_api_le_scan_enable()
414 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_scan_enable()
417 cp->filter_dup = atomic_test_bit(bt_dev.flags, in hci_api_le_scan_enable()
420 cp->filter_dup = BT_HCI_LE_SCAN_FILTER_DUP_DISABLE; in hci_api_le_scan_enable()
423 cp->enable = enable; in hci_api_le_scan_enable()
505 struct bt_hci_cp_le_write_default_data_len *cp; in hci_api_le_set_default_data_len() local
509 buf = bt_hci_cmd_create(BT_HCI_OP_LE_WRITE_DEFAULT_DATA_LEN, sizeof(*cp)); in hci_api_le_set_default_data_len()
515 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_set_default_data_len()
516 cp->max_tx_octets = sys_cpu_to_le16(tx_octets); in hci_api_le_set_default_data_len()
517 cp->max_tx_time = sys_cpu_to_le16(tx_time); in hci_api_le_set_default_data_len()
529 struct bt_hci_cp_le_set_data_len *cp; in hci_api_le_set_data_len() local
533 buf = bt_hci_cmd_create(BT_HCI_OP_LE_SET_DATA_LEN, sizeof(*cp)); in hci_api_le_set_data_len()
539 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_set_data_len()
540 cp->handle = sys_cpu_to_le16(conn_handle); in hci_api_le_set_data_len()
541 cp->tx_octets = sys_cpu_to_le16(tx_octets); in hci_api_le_set_data_len()
542 cp->tx_time = sys_cpu_to_le16(tx_time); in hci_api_le_set_data_len()
1194 struct bt_hci_cp_le_create_conn *cp; in hci_api_le_create_conn() local
1196 buf = bt_hci_cmd_create(BT_HCI_OP_LE_CREATE_CONN, sizeof(*cp)); in hci_api_le_create_conn()
1202 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_create_conn()
1203 memset(cp, 0, sizeof(*cp)); in hci_api_le_create_conn()
1206 cp->scan_interval = sys_cpu_to_le16(scan_interval); in hci_api_le_create_conn()
1207 cp->scan_window = cp->scan_interval; in hci_api_le_create_conn()
1209 cp->peer_addr.type = peer_addr_type; in hci_api_le_create_conn()
1210 memcpy(cp->peer_addr.a.val, peer_addr, 6); in hci_api_le_create_conn()
1211 cp->own_addr_type = own_addr_type; in hci_api_le_create_conn()
1212 cp->conn_interval_min = sys_cpu_to_le16(conn_interval_min); in hci_api_le_create_conn()
1213 cp->conn_interval_max = sys_cpu_to_le16(conn_interval_max); in hci_api_le_create_conn()
1214 cp->conn_latency = sys_cpu_to_le16(conn_latency); in hci_api_le_create_conn()
1215 cp->supervision_timeout = sys_cpu_to_le16(supervision_timeout); in hci_api_le_create_conn()
1246 struct bt_hci_cp_le_read_remote_features *cp; in hci_api_le_read_remote_features() local
1250 sizeof(*cp)); in hci_api_le_read_remote_features()
1256 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_read_remote_features()
1257 cp->handle = sys_cpu_to_le16(conn_handle); in hci_api_le_read_remote_features()
1263 struct bt_hci_cp_read_remote_version_info *cp; in hci_api_le_read_remote_version() local
1267 sizeof(*cp)); in hci_api_le_read_remote_version()
1272 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_read_remote_version()
1273 cp->handle = sys_cpu_to_le16(conn_handle); in hci_api_le_read_remote_version()
1282 struct bt_hci_cp_host_num_completed_packets *cp; in hci_api_host_num_complete_packets() local
1286 sizeof(*cp) + sizeof(*hc)); in hci_api_host_num_complete_packets()
1292 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_host_num_complete_packets()
1293 cp->num_handles = sys_cpu_to_le16(num_handles); in hci_api_host_num_complete_packets()
1336 struct bt_hci_cp_le_start_encryption *cp; in hci_api_le_start_encrypt() local
1339 buf = bt_hci_cmd_create(BT_HCI_OP_LE_START_ENCRYPTION, sizeof(*cp)); in hci_api_le_start_encrypt()
1345 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_start_encrypt()
1346 cp->handle = sys_cpu_to_le16(conn_handle); in hci_api_le_start_encrypt()
1347 memcpy(&cp->rand, rand, sizeof(cp->rand)); in hci_api_le_start_encrypt()
1348 memcpy(&cp->ediv, ediv, sizeof(cp->ediv)); in hci_api_le_start_encrypt()
1349 memcpy(cp->ltk, ltk, sizeof(cp->ltk)); in hci_api_le_start_encrypt()
1357 struct bt_hci_cp_le_ltk_req_reply *cp; in hci_api_le_enctypt_ltk_req_reply() local
1360 sizeof(*cp)); in hci_api_le_enctypt_ltk_req_reply()
1366 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_enctypt_ltk_req_reply()
1367 cp->handle = conn_handle; in hci_api_le_enctypt_ltk_req_reply()
1369 memcpy(cp->ltk, ltk, 16); in hci_api_le_enctypt_ltk_req_reply()
1376 struct bt_hci_cp_le_ltk_req_neg_reply *cp; in hci_api_le_enctypt_ltk_req_neg_reply() local
1379 buf = bt_hci_cmd_create(BT_HCI_OP_LE_LTK_REQ_NEG_REPLY, sizeof(*cp)); in hci_api_le_enctypt_ltk_req_neg_reply()
1385 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_enctypt_ltk_req_neg_reply()
1386 cp->handle = conn_handle; in hci_api_le_enctypt_ltk_req_neg_reply()
1409 struct bt_hci_cp_le_encrypt *cp; in hci_api_le_enc() local
1415 buf = bt_hci_cmd_create(BT_HCI_OP_LE_ENCRYPT, sizeof(*cp)); in hci_api_le_enc()
1421 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_enc()
1422 memcpy(cp->key, key, sizeof(cp->key)); in hci_api_le_enc()
1423 memcpy(cp->plaintext, plaintext, sizeof(cp->plaintext)); in hci_api_le_enc()
1443 struct bt_hci_cp_le_set_phy *cp; in hci_api_le_set_phy() local
1446 buf = bt_hci_cmd_create(BT_HCI_OP_LE_SET_PHY, sizeof(*cp)); in hci_api_le_set_phy()
1452 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_set_phy()
1453 cp->handle = sys_cpu_to_le16(handle); in hci_api_le_set_phy()
1454 cp->all_phys = all_phys; in hci_api_le_set_phy()
1455 cp->tx_phys = tx_phys; in hci_api_le_set_phy()
1456 cp->rx_phys = rx_phys; in hci_api_le_set_phy()
1457 cp->phy_opts = phy_opts; in hci_api_le_set_phy()
1469 struct bt_hci_cp_le_conn_param_req_reply *cp; in hci_api_le_conn_param_req_reply() local
1472 buf = bt_hci_cmd_create(BT_HCI_OP_LE_CONN_PARAM_REQ_REPLY, sizeof(*cp)); in hci_api_le_conn_param_req_reply()
1478 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_conn_param_req_reply()
1479 memset(cp, 0, sizeof(*cp)); in hci_api_le_conn_param_req_reply()
1481 cp->handle = sys_cpu_to_le16(handle); in hci_api_le_conn_param_req_reply()
1482 cp->interval_min = sys_cpu_to_le16(interval_min); in hci_api_le_conn_param_req_reply()
1483 cp->interval_max = sys_cpu_to_le16(interval_max); in hci_api_le_conn_param_req_reply()
1484 cp->latency = sys_cpu_to_le16(latency); in hci_api_le_conn_param_req_reply()
1485 cp->timeout = sys_cpu_to_le16(timeout); in hci_api_le_conn_param_req_reply()
1494 struct bt_hci_cp_le_conn_param_req_neg_reply *cp; in hci_api_le_conn_param_neg_reply() local
1498 sizeof(*cp)); in hci_api_le_conn_param_neg_reply()
1504 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_conn_param_neg_reply()
1505 cp->handle = sys_cpu_to_le16(handle); in hci_api_le_conn_param_neg_reply()
1506 cp->reason = sys_cpu_to_le16(reason); in hci_api_le_conn_param_neg_reply()
1516 struct bt_hci_cp_le_add_dev_to_rl *cp; in hci_api_le_add_dev_to_rl() local
1519 buf = bt_hci_cmd_create(BT_HCI_OP_LE_ADD_DEV_TO_RL, sizeof(*cp)); in hci_api_le_add_dev_to_rl()
1525 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_add_dev_to_rl()
1526 memset(cp, 0, sizeof(*cp)); in hci_api_le_add_dev_to_rl()
1528 cp->peer_id_addr.type = type; in hci_api_le_add_dev_to_rl()
1529 memcpy(cp->peer_id_addr.a.val, peer_id_addr, 6); in hci_api_le_add_dev_to_rl()
1532 memcpy(cp->peer_irk, peer_irk, 16); in hci_api_le_add_dev_to_rl()
1536 memcpy(cp->local_irk, local_irk, 16); in hci_api_le_add_dev_to_rl()
1545 struct bt_hci_cp_le_rem_dev_from_rl *cp; in hci_api_le_remove_dev_from_rl() local
1548 buf = bt_hci_cmd_create(BT_HCI_OP_LE_REM_DEV_FROM_RL, sizeof(*cp)); in hci_api_le_remove_dev_from_rl()
1554 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_remove_dev_from_rl()
1555 memset(cp, 0, sizeof(*cp)); in hci_api_le_remove_dev_from_rl()
1557 cp->peer_id_addr.type = type; in hci_api_le_remove_dev_from_rl()
1558 memcpy(cp->peer_id_addr.a.val, peer_id_addr, 6); in hci_api_le_remove_dev_from_rl()
1588 struct bt_hci_cp_le_set_privacy_mode cp; in hci_api_le_set_privacy_mode() local
1591 cp.id_addr.type = type; in hci_api_le_set_privacy_mode()
1592 memcpy(cp.id_addr.a.val, id_addr, 6); in hci_api_le_set_privacy_mode()
1594 cp.mode = mode; in hci_api_le_set_privacy_mode()
1596 buf = bt_hci_cmd_create(BT_HCI_OP_LE_SET_PRIVACY_MODE, sizeof(cp)); in hci_api_le_set_privacy_mode()
1602 net_buf_add_mem(buf, &cp, sizeof(cp)); in hci_api_le_set_privacy_mode()
1614 struct bt_hci_cp_le_generate_dhkey *cp; in hci_api_le_gen_dhkey() local
1617 buf = bt_hci_cmd_create(BT_HCI_OP_LE_GENERATE_DHKEY, sizeof(*cp)); in hci_api_le_gen_dhkey()
1623 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_gen_dhkey()
1624 memcpy(cp->key, remote_pk, sizeof(cp->key)); in hci_api_le_gen_dhkey()
1851 struct bt_hci_cp_le_set_adv_set_random_addr *cp; in hci_api_le_set_adv_random_addr() local
1855 sizeof(*cp)); in hci_api_le_set_adv_random_addr()
1860 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_set_adv_random_addr()
1862 cp->handle = handle; in hci_api_le_set_adv_random_addr()
1863 memcpy(&cp->bdaddr, addr, 6); in hci_api_le_set_adv_random_addr()
1871 struct bt_hci_cp_le_set_ext_scan_enable *cp; in hci_api_le_ext_scan_enable() local
1875 buf = bt_hci_cmd_create(BT_HCI_OP_LE_SET_EXT_SCAN_ENABLE, sizeof(*cp)); in hci_api_le_ext_scan_enable()
1880 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_ext_scan_enable()
1882 cp->enable = enable; in hci_api_le_ext_scan_enable()
1883 cp->filter_dup = filter_dup; in hci_api_le_ext_scan_enable()
1884 cp->duration = sys_cpu_to_le16(duration); in hci_api_le_ext_scan_enable()
1885 cp->period = 0; in hci_api_le_ext_scan_enable()
1918 struct bt_hci_cp_le_read_phy *cp; in hci_api_le_read_phy() local
1923 buf = bt_hci_cmd_create(BT_HCI_OP_LE_READ_PHY, sizeof(*cp)); in hci_api_le_read_phy()
1928 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_read_phy()
1929 cp->handle = sys_cpu_to_le16(conn_handle); in hci_api_le_read_phy()
1950 struct bt_hci_cp_le_ext_create_conn *cp; in hci_api_le_create_conn_ext() local
1959 buf = bt_hci_cmd_create(BT_HCI_OP_LE_EXT_CREATE_CONN, sizeof(*cp) + num_phys * sizeof(*phy)); in hci_api_le_create_conn_ext()
1964 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_create_conn_ext()
1965 (void)memset(cp, 0, sizeof(*cp)); in hci_api_le_create_conn_ext()
1966 cp->filter_policy = filter_policy; in hci_api_le_create_conn_ext()
1967 cp->peer_addr.type = peer_addr_type; in hci_api_le_create_conn_ext()
1968 memcpy(cp->peer_addr.a.val, peer_addr, 6); in hci_api_le_create_conn_ext()
1970 cp->own_addr_type = own_addr_type; in hci_api_le_create_conn_ext()
1971 cp->phys = init_phys; in hci_api_le_create_conn_ext()
2007 struct bt_hci_cp_le_set_rpa_timeout *cp; in hci_api_le_rpa_timeout_set() local
2010 sizeof(*cp)); in hci_api_le_rpa_timeout_set()
2015 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_rpa_timeout_set()
2016 cp->rpa_timeout = sys_cpu_to_le16(timeout); in hci_api_le_rpa_timeout_set()
2067 struct bt_hci_cp_le_remove_adv_set *cp; in hci_api_le_remove_adv_set() local
2070 buf = bt_hci_cmd_create(BT_HCI_OP_LE_REMOVE_ADV_SET, sizeof(*cp)); in hci_api_le_remove_adv_set()
2076 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_remove_adv_set()
2077 cp->handle = handle; in hci_api_le_remove_adv_set()
2084 struct bt_hci_cp_le_set_host_chan_classif *cp; in hci_api_le_set_host_chan_classif() local
2088 sizeof(*cp)); in hci_api_le_set_host_chan_classif()
2093 cp = net_buf_add(buf, sizeof(*cp)); in hci_api_le_set_host_chan_classif()
2095 memcpy(&cp->ch_map[0], &ch_map[0], 5); in hci_api_le_set_host_chan_classif()