Lines Matching full:cp

672 	struct hci_cp_write_eir cp;  in hci_update_eir_sync()  local
688 memset(&cp, 0, sizeof(cp)); in hci_update_eir_sync()
690 eir_create(hdev, cp.data); in hci_update_eir_sync()
692 if (memcmp(cp.data, hdev->eir, sizeof(cp.data)) == 0) in hci_update_eir_sync()
695 memcpy(hdev->eir, cp.data, sizeof(cp.data)); in hci_update_eir_sync()
697 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_update_eir_sync()
918 struct hci_cp_le_set_ext_adv_enable *cp; in hci_disable_ext_adv_instance_sync() local
920 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_disable_ext_adv_instance_sync()
938 cp = (void *)data; in hci_disable_ext_adv_instance_sync()
939 set = (void *)cp->data; in hci_disable_ext_adv_instance_sync()
942 cp->num_of_sets = !!instance; in hci_disable_ext_adv_instance_sync()
943 cp->enable = 0x00; in hci_disable_ext_adv_instance_sync()
947 size = sizeof(*cp) + sizeof(*set) * cp->num_of_sets; in hci_disable_ext_adv_instance_sync()
956 struct hci_cp_le_set_adv_set_rand_addr cp; in hci_set_adv_set_random_addr_sync() local
970 memset(&cp, 0, sizeof(cp)); in hci_set_adv_set_random_addr_sync()
972 cp.handle = instance; in hci_set_adv_set_random_addr_sync()
973 bacpy(&cp.bdaddr, random_addr); in hci_set_adv_set_random_addr_sync()
976 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_set_random_addr_sync()
981 struct hci_cp_le_set_ext_adv_params cp; in hci_setup_ext_adv_instance_sync() local
1029 memset(&cp, 0, sizeof(cp)); in hci_setup_ext_adv_instance_sync()
1032 hci_cpu_to_le24(adv->min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1033 hci_cpu_to_le24(adv->max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1034 cp.tx_power = adv->tx_power; in hci_setup_ext_adv_instance_sync()
1036 hci_cpu_to_le24(hdev->le_adv_min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1037 hci_cpu_to_le24(hdev->le_adv_max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1038 cp.tx_power = HCI_ADV_TX_POWER_NO_PREFERENCE; in hci_setup_ext_adv_instance_sync()
1045 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_CONN_IND); in hci_setup_ext_adv_instance_sync()
1047 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_IND); in hci_setup_ext_adv_instance_sync()
1051 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1053 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1056 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_NON_CONN_IND); in hci_setup_ext_adv_instance_sync()
1058 cp.evt_properties = cpu_to_le16(LE_LEGACY_NONCONN_IND); in hci_setup_ext_adv_instance_sync()
1069 hci_copy_identity_address(hdev, &cp.peer_addr, in hci_setup_ext_adv_instance_sync()
1070 &cp.peer_addr_type); in hci_setup_ext_adv_instance_sync()
1072 cp.own_addr_type = own_addr_type; in hci_setup_ext_adv_instance_sync()
1073 cp.channel_map = hdev->le_adv_channel_map; in hci_setup_ext_adv_instance_sync()
1074 cp.handle = instance; in hci_setup_ext_adv_instance_sync()
1077 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1078 cp.secondary_phy = HCI_ADV_PHY_2M; in hci_setup_ext_adv_instance_sync()
1080 cp.primary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1081 cp.secondary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1084 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1085 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1089 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_ext_adv_instance_sync()
1115 struct hci_cp_le_set_ext_scan_rsp_data cp; in hci_set_ext_scan_rsp_data_sync() member
1132 pdu.cp.handle = instance; in hci_set_ext_scan_rsp_data_sync()
1133 pdu.cp.length = len; in hci_set_ext_scan_rsp_data_sync()
1134 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_ext_scan_rsp_data_sync()
1135 pdu.cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; in hci_set_ext_scan_rsp_data_sync()
1138 sizeof(pdu.cp) + len, &pdu.cp, in hci_set_ext_scan_rsp_data_sync()
1155 struct hci_cp_le_set_scan_rsp_data cp; in __hci_set_scan_rsp_data_sync() local
1158 memset(&cp, 0, sizeof(cp)); in __hci_set_scan_rsp_data_sync()
1160 len = eir_create_scan_rsp(hdev, instance, cp.data); in __hci_set_scan_rsp_data_sync()
1163 !memcmp(cp.data, hdev->scan_rsp_data, len)) in __hci_set_scan_rsp_data_sync()
1166 memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data)); in __hci_set_scan_rsp_data_sync()
1169 cp.length = len; in __hci_set_scan_rsp_data_sync()
1172 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in __hci_set_scan_rsp_data_sync()
1188 struct hci_cp_le_set_ext_adv_enable *cp; in hci_enable_ext_advertising_sync() local
1190 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_enable_ext_advertising_sync()
1204 cp = (void *)data; in hci_enable_ext_advertising_sync()
1205 set = (void *)cp->data; in hci_enable_ext_advertising_sync()
1207 memset(cp, 0, sizeof(*cp)); in hci_enable_ext_advertising_sync()
1209 cp->enable = 0x01; in hci_enable_ext_advertising_sync()
1210 cp->num_of_sets = 0x01; in hci_enable_ext_advertising_sync()
1227 sizeof(*cp) + in hci_enable_ext_advertising_sync()
1228 sizeof(*set) * cp->num_of_sets, in hci_enable_ext_advertising_sync()
1249 struct hci_cp_le_set_per_adv_enable cp; in hci_disable_per_advertising_sync() local
1257 memset(&cp, 0, sizeof(cp)); in hci_disable_per_advertising_sync()
1259 cp.enable = 0x00; in hci_disable_per_advertising_sync()
1260 cp.handle = instance; in hci_disable_per_advertising_sync()
1263 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disable_per_advertising_sync()
1269 struct hci_cp_le_set_per_adv_params cp; in hci_set_per_adv_params_sync() local
1271 memset(&cp, 0, sizeof(cp)); in hci_set_per_adv_params_sync()
1279 cp.handle = instance; in hci_set_per_adv_params_sync()
1280 cp.min_interval = cpu_to_le16(min_interval); in hci_set_per_adv_params_sync()
1281 cp.max_interval = cpu_to_le16(max_interval); in hci_set_per_adv_params_sync()
1282 cp.periodic_properties = 0x0000; in hci_set_per_adv_params_sync()
1285 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_per_adv_params_sync()
1291 struct hci_cp_le_set_per_adv_data cp; in hci_set_per_adv_data_sync() member
1307 pdu.cp.length = len; in hci_set_per_adv_data_sync()
1308 pdu.cp.handle = instance; in hci_set_per_adv_data_sync()
1309 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_per_adv_data_sync()
1312 sizeof(pdu.cp) + len, &pdu, in hci_set_per_adv_data_sync()
1318 struct hci_cp_le_set_per_adv_enable cp; in hci_enable_per_advertising_sync() local
1326 memset(&cp, 0, sizeof(cp)); in hci_enable_per_advertising_sync()
1328 cp.enable = 0x01; in hci_enable_per_advertising_sync()
1329 cp.handle = instance; in hci_enable_per_advertising_sync()
1332 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_per_advertising_sync()
1450 struct hci_cp_le_set_adv_param cp; in hci_enable_advertising_sync() local
1494 memset(&cp, 0, sizeof(cp)); in hci_enable_advertising_sync()
1505 cp.type = LE_ADV_IND; in hci_enable_advertising_sync()
1508 cp.type = LE_ADV_SCAN_IND; in hci_enable_advertising_sync()
1510 cp.type = LE_ADV_NONCONN_IND; in hci_enable_advertising_sync()
1519 cp.min_interval = cpu_to_le16(adv_min_interval); in hci_enable_advertising_sync()
1520 cp.max_interval = cpu_to_le16(adv_max_interval); in hci_enable_advertising_sync()
1521 cp.own_address_type = own_addr_type; in hci_enable_advertising_sync()
1522 cp.channel_map = hdev->le_adv_channel_map; in hci_enable_advertising_sync()
1525 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_advertising_sync()
1594 struct hci_cp_le_term_big cp; in hci_le_terminate_big_sync() local
1596 memset(&cp, 0, sizeof(cp)); in hci_le_terminate_big_sync()
1597 cp.handle = handle; in hci_le_terminate_big_sync()
1598 cp.reason = reason; in hci_le_terminate_big_sync()
1601 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_terminate_big_sync()
1607 struct hci_cp_le_set_ext_adv_data cp; in hci_set_ext_adv_data_sync() member
1624 pdu.cp.length = len; in hci_set_ext_adv_data_sync()
1625 pdu.cp.handle = instance; in hci_set_ext_adv_data_sync()
1626 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_ext_adv_data_sync()
1627 pdu.cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; in hci_set_ext_adv_data_sync()
1630 sizeof(pdu.cp) + len, &pdu.cp, in hci_set_ext_adv_data_sync()
1648 struct hci_cp_le_set_adv_data cp; in hci_set_adv_data_sync() local
1651 memset(&cp, 0, sizeof(cp)); in hci_set_adv_data_sync()
1653 len = eir_create_adv_data(hdev, instance, cp.data); in hci_set_adv_data_sync()
1657 memcmp(cp.data, hdev->adv_data, len) == 0) in hci_set_adv_data_sync()
1660 memcpy(hdev->adv_data, cp.data, sizeof(cp.data)); in hci_set_adv_data_sync()
1663 cp.length = len; in hci_set_adv_data_sync()
1666 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_data_sync()
1868 struct hci_cp_read_rssi cp; in hci_read_rssi_sync() local
1870 cp.handle = handle; in hci_read_rssi_sync()
1872 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_rssi_sync()
1875 int hci_read_clock_sync(struct hci_dev *hdev, struct hci_cp_read_clock *cp) in hci_read_clock_sync() argument
1878 sizeof(*cp), cp, HCI_CMD_TIMEOUT); in hci_read_clock_sync()
1883 struct hci_cp_read_tx_power cp; in hci_read_tx_power_sync() local
1885 cp.handle = handle; in hci_read_tx_power_sync()
1886 cp.type = type; in hci_read_tx_power_sync()
1888 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_tx_power_sync()
1912 struct hci_cp_le_set_ext_scan_enable cp; in hci_le_set_ext_scan_enable_sync() local
1914 memset(&cp, 0, sizeof(cp)); in hci_le_set_ext_scan_enable_sync()
1915 cp.enable = val; in hci_le_set_ext_scan_enable_sync()
1918 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_ext_scan_enable_sync()
1920 cp.filter_dup = filter_dup; in hci_le_set_ext_scan_enable_sync()
1923 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_ext_scan_enable_sync()
1929 struct hci_cp_le_set_scan_enable cp; in hci_le_set_scan_enable_sync() local
1934 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_enable_sync()
1935 cp.enable = val; in hci_le_set_scan_enable_sync()
1938 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_scan_enable_sync()
1940 cp.filter_dup = filter_dup; in hci_le_set_scan_enable_sync()
1943 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_enable_sync()
2042 struct hci_cp_le_del_from_resolv_list cp; in hci_le_del_resolve_list_sync() local
2054 cp.bdaddr_type = bdaddr_type; in hci_le_del_resolve_list_sync()
2055 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_resolve_list_sync()
2058 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_resolve_list_sync()
2064 struct hci_cp_le_del_from_accept_list cp; in hci_le_del_accept_list_sync() local
2071 cp.bdaddr_type = bdaddr_type; in hci_le_del_accept_list_sync()
2072 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_accept_list_sync()
2077 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_del_accept_list_sync()
2080 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_accept_list_sync()
2086 bt_dev_dbg(hdev, "Remove %pMR (0x%x) from allow list", &cp.bdaddr, in hci_le_del_accept_list_sync()
2087 cp.bdaddr_type); in hci_le_del_accept_list_sync()
2105 struct hci_cp_le_add_to_resolv_list cp; in hci_le_add_resolve_list_sync() local
2120 hci_copy_identity_address(hdev, &cp.bdaddr, &cp.bdaddr_type); in hci_le_add_resolve_list_sync()
2121 memcpy(cp.peer_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2136 cp.bdaddr_type = params->addr_type; in hci_le_add_resolve_list_sync()
2137 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_resolve_list_sync()
2138 memcpy(cp.peer_irk, irk->val, 16); in hci_le_add_resolve_list_sync()
2155 memcpy(cp.local_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2157 memset(cp.local_irk, 0, 16); in hci_le_add_resolve_list_sync()
2160 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_resolve_list_sync()
2167 struct hci_cp_le_set_privacy_mode cp; in hci_le_set_privacy_mode_sync() local
2185 memset(&cp, 0, sizeof(cp)); in hci_le_set_privacy_mode_sync()
2186 cp.bdaddr_type = irk->addr_type; in hci_le_set_privacy_mode_sync()
2187 bacpy(&cp.bdaddr, &irk->bdaddr); in hci_le_set_privacy_mode_sync()
2188 cp.mode = HCI_DEVICE_PRIVACY; in hci_le_set_privacy_mode_sync()
2193 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_privacy_mode_sync()
2204 struct hci_cp_le_add_to_accept_list cp; in hci_le_add_accept_list_sync() local
2247 cp.bdaddr_type = params->addr_type; in hci_le_add_accept_list_sync()
2248 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_accept_list_sync()
2251 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_accept_list_sync()
2255 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_add_accept_list_sync()
2259 bt_dev_dbg(hdev, "Add %pMR (0x%x) to allow list", &cp.bdaddr, in hci_le_add_accept_list_sync()
2260 cp.bdaddr_type); in hci_le_add_accept_list_sync()
2609 struct hci_cp_le_set_ext_scan_params *cp; in hci_le_set_ext_scan_param_sync() local
2611 u8 data[sizeof(*cp) + sizeof(*phy) * 2]; in hci_le_set_ext_scan_param_sync()
2614 cp = (void *)data; in hci_le_set_ext_scan_param_sync()
2615 phy = (void *)cp->data; in hci_le_set_ext_scan_param_sync()
2619 cp->own_addr_type = own_addr_type; in hci_le_set_ext_scan_param_sync()
2620 cp->filter_policy = filter_policy; in hci_le_set_ext_scan_param_sync()
2623 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2634 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2645 sizeof(*cp) + sizeof(*phy) * num_phy, in hci_le_set_ext_scan_param_sync()
2653 struct hci_cp_le_set_scan_param cp; in hci_le_set_scan_param_sync() local
2660 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_param_sync()
2661 cp.type = type; in hci_le_set_scan_param_sync()
2662 cp.interval = cpu_to_le16(interval); in hci_le_set_scan_param_sync()
2663 cp.window = cpu_to_le16(window); in hci_le_set_scan_param_sync()
2664 cp.own_address_type = own_addr_type; in hci_le_set_scan_param_sync()
2665 cp.filter_policy = filter_policy; in hci_le_set_scan_param_sync()
2668 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_param_sync()
2931 struct hci_cp_write_le_host_supported cp; in hci_write_le_host_supported_sync() local
2944 memset(&cp, 0, sizeof(cp)); in hci_write_le_host_supported_sync()
2946 cp.le = le; in hci_write_le_host_supported_sync()
2947 cp.simul = simul; in hci_write_le_host_supported_sync()
2950 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_le_host_supported_sync()
3013 struct hci_cp_write_page_scan_activity cp; in hci_write_fast_connectable_sync() local
3023 memset(&cp, 0, sizeof(cp)); in hci_write_fast_connectable_sync()
3029 cp.interval = cpu_to_le16(0x0100); in hci_write_fast_connectable_sync()
3032 cp.interval = cpu_to_le16(hdev->def_page_scan_int); in hci_write_fast_connectable_sync()
3035 cp.window = cpu_to_le16(hdev->def_page_scan_window); in hci_write_fast_connectable_sync()
3037 if (__cpu_to_le16(hdev->page_scan_interval) != cp.interval || in hci_write_fast_connectable_sync()
3038 __cpu_to_le16(hdev->page_scan_window) != cp.window) { in hci_write_fast_connectable_sync()
3041 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_fast_connectable_sync()
3114 struct hci_cp_write_local_name cp; in hci_update_name_sync() local
3116 memset(&cp, 0, sizeof(cp)); in hci_update_name_sync()
3118 memcpy(cp.name, hdev->dev_name, sizeof(cp.name)); in hci_update_name_sync()
3121 sizeof(cp), &cp, in hci_update_name_sync()
3483 struct hci_cp_set_event_filter cp; in hci_set_event_filter_sync() local
3491 memset(&cp, 0, sizeof(cp)); in hci_set_event_filter_sync()
3492 cp.flt_type = flt_type; in hci_set_event_filter_sync()
3495 cp.cond_type = cond_type; in hci_set_event_filter_sync()
3496 bacpy(&cp.addr_conn_flt.bdaddr, bdaddr); in hci_set_event_filter_sync()
3497 cp.addr_conn_flt.auto_accept = auto_accept; in hci_set_event_filter_sync()
3502 sizeof(cp.flt_type) : sizeof(cp), &cp, in hci_set_event_filter_sync()
3573 struct hci_cp_write_eir cp; in hci_write_eir_sync() local
3579 memset(&cp, 0, sizeof(cp)); in hci_write_eir_sync()
3581 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_write_eir_sync()
3614 struct hci_cp_read_local_ext_features cp; in hci_read_local_ext_features_sync() local
3619 memset(&cp, 0, sizeof(cp)); in hci_read_local_ext_features_sync()
3620 cp.page = page; in hci_read_local_ext_features_sync()
3623 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_local_ext_features_sync()
3832 struct hci_cp_read_stored_link_key cp; in hci_read_stored_link_key_sync() local
3838 memset(&cp, 0, sizeof(cp)); in hci_read_stored_link_key_sync()
3839 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_read_stored_link_key_sync()
3840 cp.read_all = 0x01; in hci_read_stored_link_key_sync()
3843 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_stored_link_key_sync()
3848 struct hci_cp_write_def_link_policy cp; in hci_setup_link_policy_sync() local
3854 memset(&cp, 0, sizeof(cp)); in hci_setup_link_policy_sync()
3865 cp.policy = cpu_to_le16(link_policy); in hci_setup_link_policy_sync()
3868 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_link_policy_sync()
4179 struct hci_cp_write_le_host_supported cp; in hci_set_le_support_sync() local
4185 memset(&cp, 0, sizeof(cp)); in hci_set_le_support_sync()
4188 cp.le = 0x01; in hci_set_le_support_sync()
4189 cp.simul = 0x00; in hci_set_le_support_sync()
4192 if (cp.le == lmp_host_le_capable(hdev)) in hci_set_le_support_sync()
4196 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_le_support_sync()
4202 struct hci_cp_le_set_host_feature cp; in hci_le_set_host_feature_sync() local
4207 memset(&cp, 0, sizeof(cp)); in hci_le_set_host_feature_sync()
4210 cp.bit_number = 32; in hci_le_set_host_feature_sync()
4211 cp.bit_value = 1; in hci_le_set_host_feature_sync()
4214 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_host_feature_sync()
4266 struct hci_cp_delete_stored_link_key cp; in hci_delete_stored_link_key_sync() local
4285 memset(&cp, 0, sizeof(cp)); in hci_delete_stored_link_key_sync()
4286 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_delete_stored_link_key_sync()
4287 cp.delete_all = 0x01; in hci_delete_stored_link_key_sync()
4290 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_delete_stored_link_key_sync()
4403 struct hci_cp_write_def_err_data_reporting cp; in hci_set_err_data_report_sync() local
4414 memset(&cp, 0, sizeof(cp)); in hci_set_err_data_report_sync()
4415 cp.err_data_reporting = enabled ? ERR_DATA_REPORTING_ENABLED : in hci_set_err_data_report_sync()
4419 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_err_data_report_sync()
4445 struct hci_cp_le_write_def_data_len cp; in hci_le_set_write_def_data_len_sync() local
4450 memset(&cp, 0, sizeof(cp)); in hci_le_set_write_def_data_len_sync()
4451 cp.tx_len = cpu_to_le16(hdev->le_max_tx_len); in hci_le_set_write_def_data_len_sync()
4452 cp.tx_time = cpu_to_le16(hdev->le_max_tx_time); in hci_le_set_write_def_data_len_sync()
4455 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_write_def_data_len_sync()
4463 struct hci_cp_le_set_default_phy cp; in hci_le_set_default_phy_sync() local
4474 memset(&cp, 0, sizeof(cp)); in hci_le_set_default_phy_sync()
4475 cp.all_phys = 0x00; in hci_le_set_default_phy_sync()
4476 cp.tx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4477 cp.rx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4481 cp.tx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4482 cp.rx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4487 cp.tx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4488 cp.rx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4492 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_default_phy_sync()
5090 struct hci_cp_remote_name_req_cancel cp; in hci_remote_name_cancel_sync() local
5092 memset(&cp, 0, sizeof(cp)); in hci_remote_name_cancel_sync()
5093 bacpy(&cp.bdaddr, addr); in hci_remote_name_cancel_sync()
5096 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_remote_name_cancel_sync()
5152 struct hci_cp_disconn_phy_link cp; in hci_disconnect_phy_link_sync() local
5154 memset(&cp, 0, sizeof(cp)); in hci_disconnect_phy_link_sync()
5155 cp.phy_handle = HCI_PHY_HANDLE(handle); in hci_disconnect_phy_link_sync()
5156 cp.reason = reason; in hci_disconnect_phy_link_sync()
5159 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disconnect_phy_link_sync()
5165 struct hci_cp_disconnect cp; in hci_disconnect_sync() local
5181 memset(&cp, 0, sizeof(cp)); in hci_disconnect_sync()
5182 cp.handle = cpu_to_le16(conn->handle); in hci_disconnect_sync()
5183 cp.reason = reason; in hci_disconnect_sync()
5192 sizeof(cp), &cp, in hci_disconnect_sync()
5196 return __hci_cmd_sync_status(hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp, in hci_disconnect_sync()
5266 struct hci_cp_reject_sync_conn_req cp; in hci_reject_sco_sync() local
5268 memset(&cp, 0, sizeof(cp)); in hci_reject_sco_sync()
5269 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_sco_sync()
5270 cp.reason = reason; in hci_reject_sco_sync()
5276 cp.reason = HCI_ERROR_REJ_LIMITED_RESOURCES; in hci_reject_sco_sync()
5279 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_sco_sync()
5285 struct hci_cp_le_reject_cis cp; in hci_le_reject_cis_sync() local
5287 memset(&cp, 0, sizeof(cp)); in hci_le_reject_cis_sync()
5288 cp.handle = cpu_to_le16(conn->handle); in hci_le_reject_cis_sync()
5289 cp.reason = reason; in hci_le_reject_cis_sync()
5292 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_reject_cis_sync()
5298 struct hci_cp_reject_conn_req cp; in hci_reject_conn_sync() local
5306 memset(&cp, 0, sizeof(cp)); in hci_reject_conn_sync()
5307 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_conn_sync()
5308 cp.reason = reason; in hci_reject_conn_sync()
5311 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_conn_sync()
5439 struct hci_cp_write_current_iac_lap cp; in hci_write_iac_sync() local
5444 memset(&cp, 0, sizeof(cp)); in hci_write_iac_sync()
5448 cp.num_iac = min_t(u8, hdev->num_iac, 2); in hci_write_iac_sync()
5449 cp.iac_lap[0] = 0x00; /* LIAC */ in hci_write_iac_sync()
5450 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5451 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5452 cp.iac_lap[3] = 0x33; /* GIAC */ in hci_write_iac_sync()
5453 cp.iac_lap[4] = 0x8b; in hci_write_iac_sync()
5454 cp.iac_lap[5] = 0x9e; in hci_write_iac_sync()
5457 cp.num_iac = 1; in hci_write_iac_sync()
5458 cp.iac_lap[0] = 0x33; /* GIAC */ in hci_write_iac_sync()
5459 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5460 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5464 (cp.num_iac * 3) + 1, &cp, in hci_write_iac_sync()
5561 struct hci_cp_inquiry cp; in hci_inquiry_sync() local
5572 memset(&cp, 0, sizeof(cp)); in hci_inquiry_sync()
5575 memcpy(&cp.lap, liac, sizeof(cp.lap)); in hci_inquiry_sync()
5577 memcpy(&cp.lap, giac, sizeof(cp.lap)); in hci_inquiry_sync()
5579 cp.length = length; in hci_inquiry_sync()
5582 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_inquiry_sync()
5987 struct hci_cp_le_set_ext_adv_params cp; in hci_le_ext_directed_advertising_sync() local
6005 memset(&cp, 0, sizeof(cp)); in hci_le_ext_directed_advertising_sync()
6007 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_le_ext_directed_advertising_sync()
6008 cp.channel_map = hdev->le_adv_channel_map; in hci_le_ext_directed_advertising_sync()
6009 cp.tx_power = HCI_TX_POWER_INVALID; in hci_le_ext_directed_advertising_sync()
6010 cp.primary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6011 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6012 cp.handle = 0x00; /* Use instance 0 for directed adv */ in hci_le_ext_directed_advertising_sync()
6013 cp.own_addr_type = own_addr_type; in hci_le_ext_directed_advertising_sync()
6014 cp.peer_addr_type = conn->dst_type; in hci_le_ext_directed_advertising_sync()
6015 bacpy(&cp.peer_addr, &conn->dst); in hci_le_ext_directed_advertising_sync()
6025 err = hci_remove_ext_adv_instance_sync(hdev, cp.handle, NULL); in hci_le_ext_directed_advertising_sync()
6030 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_ext_directed_advertising_sync()
6050 struct hci_cp_le_set_adv_param cp; in hci_le_directed_advertising_sync() local
6073 memset(&cp, 0, sizeof(cp)); in hci_le_directed_advertising_sync()
6079 cp.min_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6080 cp.max_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6082 cp.type = LE_ADV_DIRECT_IND; in hci_le_directed_advertising_sync()
6083 cp.own_address_type = own_addr_type; in hci_le_directed_advertising_sync()
6084 cp.direct_addr_type = conn->dst_type; in hci_le_directed_advertising_sync()
6085 bacpy(&cp.direct_addr, &conn->dst); in hci_le_directed_advertising_sync()
6086 cp.channel_map = hdev->le_adv_channel_map; in hci_le_directed_advertising_sync()
6089 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_directed_advertising_sync()
6119 struct hci_cp_le_ext_create_conn *cp; in hci_le_ext_create_conn_sync() local
6121 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_le_ext_create_conn_sync()
6124 cp = (void *)data; in hci_le_ext_create_conn_sync()
6125 p = (void *)cp->data; in hci_le_ext_create_conn_sync()
6127 memset(cp, 0, sizeof(*cp)); in hci_le_ext_create_conn_sync()
6129 bacpy(&cp->peer_addr, &conn->dst); in hci_le_ext_create_conn_sync()
6130 cp->peer_addr_type = conn->dst_type; in hci_le_ext_create_conn_sync()
6131 cp->own_addr_type = own_addr_type; in hci_le_ext_create_conn_sync()
6133 plen = sizeof(*cp); in hci_le_ext_create_conn_sync()
6136 cp->phys |= LE_SCAN_PHY_1M; in hci_le_ext_create_conn_sync()
6144 cp->phys |= LE_SCAN_PHY_2M; in hci_le_ext_create_conn_sync()
6152 cp->phys |= LE_SCAN_PHY_CODED; in hci_le_ext_create_conn_sync()
6166 struct hci_cp_le_create_conn cp; in hci_le_create_conn_sync() local
6231 memset(&cp, 0, sizeof(cp)); in hci_le_create_conn_sync()
6233 cp.scan_interval = cpu_to_le16(hdev->le_scan_int_connect); in hci_le_create_conn_sync()
6234 cp.scan_window = cpu_to_le16(hdev->le_scan_window_connect); in hci_le_create_conn_sync()
6236 bacpy(&cp.peer_addr, &conn->dst); in hci_le_create_conn_sync()
6237 cp.peer_addr_type = conn->dst_type; in hci_le_create_conn_sync()
6238 cp.own_address_type = own_addr_type; in hci_le_create_conn_sync()
6239 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_le_create_conn_sync()
6240 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_le_create_conn_sync()
6241 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_le_create_conn_sync()
6242 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_le_create_conn_sync()
6243 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6244 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6253 sizeof(cp), &cp, in hci_le_create_conn_sync()
6271 struct hci_cp_le_create_cis cp; in hci_le_create_cis_sync() member
6338 struct hci_cis *cis = &cmd.cis[cmd.cp.num_cis]; in hci_le_create_cis_sync()
6347 cmd.cp.num_cis++; in hci_le_create_cis_sync()
6349 if (cmd.cp.num_cis >= ARRAY_SIZE(cmd.cis)) in hci_le_create_cis_sync()
6358 if (!cmd.cp.num_cis) in hci_le_create_cis_sync()
6363 sizeof(cmd.cp) + sizeof(cmd.cis[0]) * in hci_le_create_cis_sync()
6364 cmd.cp.num_cis, &cmd, in hci_le_create_cis_sync()
6371 struct hci_cp_le_remove_cig cp; in hci_le_remove_cig_sync() local
6373 memset(&cp, 0, sizeof(cp)); in hci_le_remove_cig_sync()
6374 cp.cig_id = handle; in hci_le_remove_cig_sync()
6376 return __hci_cmd_sync_status(hdev, HCI_OP_LE_REMOVE_CIG, sizeof(cp), in hci_le_remove_cig_sync()
6377 &cp, HCI_CMD_TIMEOUT); in hci_le_remove_cig_sync()
6382 struct hci_cp_le_big_term_sync cp; in hci_le_big_terminate_sync() local
6384 memset(&cp, 0, sizeof(cp)); in hci_le_big_terminate_sync()
6385 cp.handle = handle; in hci_le_big_terminate_sync()
6388 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_big_terminate_sync()
6393 struct hci_cp_le_pa_term_sync cp; in hci_le_pa_terminate_sync() local
6395 memset(&cp, 0, sizeof(cp)); in hci_le_pa_terminate_sync()
6396 cp.handle = cpu_to_le16(handle); in hci_le_pa_terminate_sync()
6399 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_pa_terminate_sync()