Lines Matching full:cp

901 	struct hci_cp_write_eir cp;  in hci_update_eir_sync()  local
917 memset(&cp, 0, sizeof(cp)); in hci_update_eir_sync()
919 eir_create(hdev, cp.data); in hci_update_eir_sync()
921 if (memcmp(cp.data, hdev->eir, sizeof(cp.data)) == 0) in hci_update_eir_sync()
924 memcpy(hdev->eir, cp.data, sizeof(cp.data)); in hci_update_eir_sync()
926 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_update_eir_sync()
1147 struct hci_cp_le_set_ext_adv_enable *cp; in hci_disable_ext_adv_instance_sync() local
1149 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_disable_ext_adv_instance_sync()
1166 cp = (void *)data; in hci_disable_ext_adv_instance_sync()
1167 set = (void *)cp->data; in hci_disable_ext_adv_instance_sync()
1170 cp->num_of_sets = !!instance; in hci_disable_ext_adv_instance_sync()
1171 cp->enable = 0x00; in hci_disable_ext_adv_instance_sync()
1175 size = sizeof(*cp) + sizeof(*set) * cp->num_of_sets; in hci_disable_ext_adv_instance_sync()
1184 struct hci_cp_le_set_adv_set_rand_addr cp; in hci_set_adv_set_random_addr_sync() local
1198 memset(&cp, 0, sizeof(cp)); in hci_set_adv_set_random_addr_sync()
1200 cp.handle = instance; in hci_set_adv_set_random_addr_sync()
1201 bacpy(&cp.bdaddr, random_addr); in hci_set_adv_set_random_addr_sync()
1204 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_set_random_addr_sync()
1209 struct hci_cp_le_set_ext_adv_params cp; in hci_setup_ext_adv_instance_sync() local
1257 memset(&cp, 0, sizeof(cp)); in hci_setup_ext_adv_instance_sync()
1260 hci_cpu_to_le24(adv->min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1261 hci_cpu_to_le24(adv->max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1262 cp.tx_power = adv->tx_power; in hci_setup_ext_adv_instance_sync()
1264 hci_cpu_to_le24(hdev->le_adv_min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1265 hci_cpu_to_le24(hdev->le_adv_max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1266 cp.tx_power = HCI_ADV_TX_POWER_NO_PREFERENCE; in hci_setup_ext_adv_instance_sync()
1273 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_CONN_IND); in hci_setup_ext_adv_instance_sync()
1275 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_IND); in hci_setup_ext_adv_instance_sync()
1279 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1281 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1284 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_NON_CONN_IND); in hci_setup_ext_adv_instance_sync()
1286 cp.evt_properties = cpu_to_le16(LE_LEGACY_NONCONN_IND); in hci_setup_ext_adv_instance_sync()
1297 hci_copy_identity_address(hdev, &cp.peer_addr, in hci_setup_ext_adv_instance_sync()
1298 &cp.peer_addr_type); in hci_setup_ext_adv_instance_sync()
1300 cp.own_addr_type = own_addr_type; in hci_setup_ext_adv_instance_sync()
1301 cp.channel_map = hdev->le_adv_channel_map; in hci_setup_ext_adv_instance_sync()
1302 cp.handle = adv ? adv->handle : instance; in hci_setup_ext_adv_instance_sync()
1305 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1306 cp.secondary_phy = HCI_ADV_PHY_2M; in hci_setup_ext_adv_instance_sync()
1308 cp.primary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1309 cp.secondary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1312 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1313 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1317 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_ext_adv_instance_sync()
1379 struct hci_cp_le_set_scan_rsp_data cp; in __hci_set_scan_rsp_data_sync() local
1382 memset(&cp, 0, sizeof(cp)); in __hci_set_scan_rsp_data_sync()
1384 len = eir_create_scan_rsp(hdev, instance, cp.data); in __hci_set_scan_rsp_data_sync()
1387 !memcmp(cp.data, hdev->scan_rsp_data, len)) in __hci_set_scan_rsp_data_sync()
1390 memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data)); in __hci_set_scan_rsp_data_sync()
1393 cp.length = len; in __hci_set_scan_rsp_data_sync()
1396 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in __hci_set_scan_rsp_data_sync()
1412 struct hci_cp_le_set_ext_adv_enable *cp; in hci_enable_ext_advertising_sync() local
1414 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_enable_ext_advertising_sync()
1428 cp = (void *)data; in hci_enable_ext_advertising_sync()
1429 set = (void *)cp->data; in hci_enable_ext_advertising_sync()
1431 memset(cp, 0, sizeof(*cp)); in hci_enable_ext_advertising_sync()
1433 cp->enable = 0x01; in hci_enable_ext_advertising_sync()
1434 cp->num_of_sets = 0x01; in hci_enable_ext_advertising_sync()
1451 sizeof(*cp) + in hci_enable_ext_advertising_sync()
1452 sizeof(*set) * cp->num_of_sets, in hci_enable_ext_advertising_sync()
1473 struct hci_cp_le_set_per_adv_enable cp; in hci_disable_per_advertising_sync() local
1481 memset(&cp, 0, sizeof(cp)); in hci_disable_per_advertising_sync()
1483 cp.enable = 0x00; in hci_disable_per_advertising_sync()
1484 cp.handle = instance; in hci_disable_per_advertising_sync()
1487 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disable_per_advertising_sync()
1493 struct hci_cp_le_set_per_adv_params cp; in hci_set_per_adv_params_sync() local
1495 memset(&cp, 0, sizeof(cp)); in hci_set_per_adv_params_sync()
1503 cp.handle = instance; in hci_set_per_adv_params_sync()
1504 cp.min_interval = cpu_to_le16(min_interval); in hci_set_per_adv_params_sync()
1505 cp.max_interval = cpu_to_le16(max_interval); in hci_set_per_adv_params_sync()
1506 cp.periodic_properties = 0x0000; in hci_set_per_adv_params_sync()
1509 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_per_adv_params_sync()
1538 struct hci_cp_le_set_per_adv_enable cp; in hci_enable_per_advertising_sync() local
1546 memset(&cp, 0, sizeof(cp)); in hci_enable_per_advertising_sync()
1548 cp.enable = 0x01; in hci_enable_per_advertising_sync()
1549 cp.handle = instance; in hci_enable_per_advertising_sync()
1552 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_per_advertising_sync()
1670 struct hci_cp_le_set_adv_param cp; in hci_enable_advertising_sync() local
1714 memset(&cp, 0, sizeof(cp)); in hci_enable_advertising_sync()
1725 cp.type = LE_ADV_IND; in hci_enable_advertising_sync()
1728 cp.type = LE_ADV_SCAN_IND; in hci_enable_advertising_sync()
1730 cp.type = LE_ADV_NONCONN_IND; in hci_enable_advertising_sync()
1739 cp.min_interval = cpu_to_le16(adv_min_interval); in hci_enable_advertising_sync()
1740 cp.max_interval = cpu_to_le16(adv_max_interval); in hci_enable_advertising_sync()
1741 cp.own_address_type = own_addr_type; in hci_enable_advertising_sync()
1742 cp.channel_map = hdev->le_adv_channel_map; in hci_enable_advertising_sync()
1745 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_advertising_sync()
1814 struct hci_cp_le_term_big cp; in hci_le_terminate_big_sync() local
1816 memset(&cp, 0, sizeof(cp)); in hci_le_terminate_big_sync()
1817 cp.handle = handle; in hci_le_terminate_big_sync()
1818 cp.reason = reason; in hci_le_terminate_big_sync()
1821 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_terminate_big_sync()
1864 struct hci_cp_le_set_adv_data cp; in hci_set_adv_data_sync() local
1867 memset(&cp, 0, sizeof(cp)); in hci_set_adv_data_sync()
1869 len = eir_create_adv_data(hdev, instance, cp.data); in hci_set_adv_data_sync()
1873 memcmp(cp.data, hdev->adv_data, len) == 0) in hci_set_adv_data_sync()
1876 memcpy(hdev->adv_data, cp.data, sizeof(cp.data)); in hci_set_adv_data_sync()
1879 cp.length = len; in hci_set_adv_data_sync()
1882 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_data_sync()
2084 struct hci_cp_read_rssi cp; in hci_read_rssi_sync() local
2086 cp.handle = handle; in hci_read_rssi_sync()
2088 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_rssi_sync()
2091 int hci_read_clock_sync(struct hci_dev *hdev, struct hci_cp_read_clock *cp) in hci_read_clock_sync() argument
2094 sizeof(*cp), cp, HCI_CMD_TIMEOUT); in hci_read_clock_sync()
2099 struct hci_cp_read_tx_power cp; in hci_read_tx_power_sync() local
2101 cp.handle = handle; in hci_read_tx_power_sync()
2102 cp.type = type; in hci_read_tx_power_sync()
2104 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_tx_power_sync()
2128 struct hci_cp_le_set_ext_scan_enable cp; in hci_le_set_ext_scan_enable_sync() local
2130 memset(&cp, 0, sizeof(cp)); in hci_le_set_ext_scan_enable_sync()
2131 cp.enable = val; in hci_le_set_ext_scan_enable_sync()
2134 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_ext_scan_enable_sync()
2136 cp.filter_dup = filter_dup; in hci_le_set_ext_scan_enable_sync()
2139 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_ext_scan_enable_sync()
2145 struct hci_cp_le_set_scan_enable cp; in hci_le_set_scan_enable_sync() local
2150 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_enable_sync()
2151 cp.enable = val; in hci_le_set_scan_enable_sync()
2154 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_scan_enable_sync()
2156 cp.filter_dup = filter_dup; in hci_le_set_scan_enable_sync()
2159 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_enable_sync()
2253 struct hci_cp_le_del_from_resolv_list cp; in hci_le_del_resolve_list_sync() local
2265 cp.bdaddr_type = bdaddr_type; in hci_le_del_resolve_list_sync()
2266 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_resolve_list_sync()
2269 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_resolve_list_sync()
2275 struct hci_cp_le_del_from_accept_list cp; in hci_le_del_accept_list_sync() local
2282 cp.bdaddr_type = bdaddr_type; in hci_le_del_accept_list_sync()
2283 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_accept_list_sync()
2288 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_del_accept_list_sync()
2291 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_accept_list_sync()
2297 bt_dev_dbg(hdev, "Remove %pMR (0x%x) from allow list", &cp.bdaddr, in hci_le_del_accept_list_sync()
2298 cp.bdaddr_type); in hci_le_del_accept_list_sync()
2316 struct hci_cp_le_add_to_resolv_list cp; in hci_le_add_resolve_list_sync() local
2331 hci_copy_identity_address(hdev, &cp.bdaddr, &cp.bdaddr_type); in hci_le_add_resolve_list_sync()
2332 memcpy(cp.peer_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2347 cp.bdaddr_type = params->addr_type; in hci_le_add_resolve_list_sync()
2348 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_resolve_list_sync()
2349 memcpy(cp.peer_irk, irk->val, 16); in hci_le_add_resolve_list_sync()
2366 memcpy(cp.local_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2368 memset(cp.local_irk, 0, 16); in hci_le_add_resolve_list_sync()
2371 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_resolve_list_sync()
2378 struct hci_cp_le_set_privacy_mode cp; in hci_le_set_privacy_mode_sync() local
2396 memset(&cp, 0, sizeof(cp)); in hci_le_set_privacy_mode_sync()
2397 cp.bdaddr_type = irk->addr_type; in hci_le_set_privacy_mode_sync()
2398 bacpy(&cp.bdaddr, &irk->bdaddr); in hci_le_set_privacy_mode_sync()
2399 cp.mode = HCI_DEVICE_PRIVACY; in hci_le_set_privacy_mode_sync()
2404 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_privacy_mode_sync()
2415 struct hci_cp_le_add_to_accept_list cp; in hci_le_add_accept_list_sync() local
2458 cp.bdaddr_type = params->addr_type; in hci_le_add_accept_list_sync()
2459 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_accept_list_sync()
2462 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_accept_list_sync()
2466 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_add_accept_list_sync()
2470 bt_dev_dbg(hdev, "Add %pMR (0x%x) to allow list", &cp.bdaddr, in hci_le_add_accept_list_sync()
2471 cp.bdaddr_type); in hci_le_add_accept_list_sync()
2851 static void hci_le_scan_phy_params(struct hci_cp_le_scan_phy_params *cp, in hci_le_scan_phy_params() argument
2854 cp->type = type; in hci_le_scan_phy_params()
2855 cp->interval = cpu_to_le16(interval); in hci_le_scan_phy_params()
2856 cp->window = cpu_to_le16(window); in hci_le_scan_phy_params()
2863 struct hci_cp_le_set_ext_scan_params *cp; in hci_le_set_ext_scan_param_sync() local
2865 u8 data[sizeof(*cp) + sizeof(*phy) * 2]; in hci_le_set_ext_scan_param_sync()
2868 cp = (void *)data; in hci_le_set_ext_scan_param_sync()
2869 phy = (void *)cp->data; in hci_le_set_ext_scan_param_sync()
2873 cp->own_addr_type = own_addr_type; in hci_le_set_ext_scan_param_sync()
2874 cp->filter_policy = filter_policy; in hci_le_set_ext_scan_param_sync()
2893 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2902 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2917 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2924 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2935 sizeof(*cp) + sizeof(*phy) * num_phy, in hci_le_set_ext_scan_param_sync()
2943 struct hci_cp_le_set_scan_param cp; in hci_le_set_scan_param_sync() local
2950 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_param_sync()
2951 cp.type = type; in hci_le_set_scan_param_sync()
2952 cp.interval = cpu_to_le16(interval); in hci_le_set_scan_param_sync()
2953 cp.window = cpu_to_le16(window); in hci_le_set_scan_param_sync()
2954 cp.own_address_type = own_addr_type; in hci_le_set_scan_param_sync()
2955 cp.filter_policy = filter_policy; in hci_le_set_scan_param_sync()
2958 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_param_sync()
3257 struct hci_cp_write_le_host_supported cp; in hci_write_le_host_supported_sync() local
3270 memset(&cp, 0, sizeof(cp)); in hci_write_le_host_supported_sync()
3272 cp.le = le; in hci_write_le_host_supported_sync()
3273 cp.simul = simul; in hci_write_le_host_supported_sync()
3276 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_le_host_supported_sync()
3339 struct hci_cp_write_page_scan_activity cp; in hci_write_fast_connectable_sync() local
3349 memset(&cp, 0, sizeof(cp)); in hci_write_fast_connectable_sync()
3355 cp.interval = cpu_to_le16(0x0100); in hci_write_fast_connectable_sync()
3358 cp.interval = cpu_to_le16(hdev->def_page_scan_int); in hci_write_fast_connectable_sync()
3361 cp.window = cpu_to_le16(hdev->def_page_scan_window); in hci_write_fast_connectable_sync()
3363 if (__cpu_to_le16(hdev->page_scan_interval) != cp.interval || in hci_write_fast_connectable_sync()
3364 __cpu_to_le16(hdev->page_scan_window) != cp.window) { in hci_write_fast_connectable_sync()
3367 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_fast_connectable_sync()
3440 struct hci_cp_write_local_name cp; in hci_update_name_sync() local
3442 memset(&cp, 0, sizeof(cp)); in hci_update_name_sync()
3444 memcpy(cp.name, hdev->dev_name, sizeof(cp.name)); in hci_update_name_sync()
3447 sizeof(cp), &cp, in hci_update_name_sync()
3744 struct hci_cp_set_event_filter cp; in hci_set_event_filter_sync() local
3752 memset(&cp, 0, sizeof(cp)); in hci_set_event_filter_sync()
3753 cp.flt_type = flt_type; in hci_set_event_filter_sync()
3756 cp.cond_type = cond_type; in hci_set_event_filter_sync()
3757 bacpy(&cp.addr_conn_flt.bdaddr, bdaddr); in hci_set_event_filter_sync()
3758 cp.addr_conn_flt.auto_accept = auto_accept; in hci_set_event_filter_sync()
3763 sizeof(cp.flt_type) : sizeof(cp), &cp, in hci_set_event_filter_sync()
3834 struct hci_cp_write_eir cp; in hci_write_eir_sync() local
3840 memset(&cp, 0, sizeof(cp)); in hci_write_eir_sync()
3842 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_write_eir_sync()
3875 struct hci_cp_read_local_ext_features cp; in hci_read_local_ext_features_sync() local
3880 memset(&cp, 0, sizeof(cp)); in hci_read_local_ext_features_sync()
3881 cp.page = page; in hci_read_local_ext_features_sync()
3884 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_local_ext_features_sync()
4090 struct hci_cp_read_stored_link_key cp; in hci_read_stored_link_key_sync() local
4096 memset(&cp, 0, sizeof(cp)); in hci_read_stored_link_key_sync()
4097 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_read_stored_link_key_sync()
4098 cp.read_all = 0x01; in hci_read_stored_link_key_sync()
4101 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_stored_link_key_sync()
4106 struct hci_cp_write_def_link_policy cp; in hci_setup_link_policy_sync() local
4112 memset(&cp, 0, sizeof(cp)); in hci_setup_link_policy_sync()
4123 cp.policy = cpu_to_le16(link_policy); in hci_setup_link_policy_sync()
4126 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_link_policy_sync()
4427 struct hci_cp_write_le_host_supported cp; in hci_set_le_support_sync() local
4433 memset(&cp, 0, sizeof(cp)); in hci_set_le_support_sync()
4436 cp.le = 0x01; in hci_set_le_support_sync()
4437 cp.simul = 0x00; in hci_set_le_support_sync()
4440 if (cp.le == lmp_host_le_capable(hdev)) in hci_set_le_support_sync()
4444 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_le_support_sync()
4450 struct hci_cp_le_set_host_feature cp; in hci_le_set_host_feature_sync() local
4455 memset(&cp, 0, sizeof(cp)); in hci_le_set_host_feature_sync()
4458 cp.bit_number = 32; in hci_le_set_host_feature_sync()
4459 cp.bit_value = 1; in hci_le_set_host_feature_sync()
4462 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_host_feature_sync()
4514 struct hci_cp_delete_stored_link_key cp; in hci_delete_stored_link_key_sync() local
4533 memset(&cp, 0, sizeof(cp)); in hci_delete_stored_link_key_sync()
4534 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_delete_stored_link_key_sync()
4535 cp.delete_all = 0x01; in hci_delete_stored_link_key_sync()
4538 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_delete_stored_link_key_sync()
4651 struct hci_cp_write_def_err_data_reporting cp; in hci_set_err_data_report_sync() local
4662 memset(&cp, 0, sizeof(cp)); in hci_set_err_data_report_sync()
4663 cp.err_data_reporting = enabled ? ERR_DATA_REPORTING_ENABLED : in hci_set_err_data_report_sync()
4667 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_err_data_report_sync()
4693 struct hci_cp_le_write_def_data_len cp; in hci_le_set_write_def_data_len_sync() local
4698 memset(&cp, 0, sizeof(cp)); in hci_le_set_write_def_data_len_sync()
4699 cp.tx_len = cpu_to_le16(hdev->le_max_tx_len); in hci_le_set_write_def_data_len_sync()
4700 cp.tx_time = cpu_to_le16(hdev->le_max_tx_time); in hci_le_set_write_def_data_len_sync()
4703 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_write_def_data_len_sync()
4711 struct hci_cp_le_set_default_phy cp; in hci_le_set_default_phy_sync() local
4722 memset(&cp, 0, sizeof(cp)); in hci_le_set_default_phy_sync()
4723 cp.all_phys = 0x00; in hci_le_set_default_phy_sync()
4724 cp.tx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4725 cp.rx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4729 cp.tx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4730 cp.rx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4735 cp.tx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4736 cp.rx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4740 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_default_phy_sync()
5340 struct hci_cp_remote_name_req_cancel cp; in hci_remote_name_cancel_sync() local
5342 memset(&cp, 0, sizeof(cp)); in hci_remote_name_cancel_sync()
5343 bacpy(&cp.bdaddr, addr); in hci_remote_name_cancel_sync()
5346 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_remote_name_cancel_sync()
5405 struct hci_cp_disconnect cp; in hci_disconnect_sync() local
5418 memset(&cp, 0, sizeof(cp)); in hci_disconnect_sync()
5419 cp.handle = cpu_to_le16(conn->handle); in hci_disconnect_sync()
5420 cp.reason = reason; in hci_disconnect_sync()
5429 sizeof(cp), &cp, in hci_disconnect_sync()
5433 return __hci_cmd_sync_status(hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp, in hci_disconnect_sync()
5503 struct hci_cp_reject_sync_conn_req cp; in hci_reject_sco_sync() local
5505 memset(&cp, 0, sizeof(cp)); in hci_reject_sco_sync()
5506 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_sco_sync()
5507 cp.reason = reason; in hci_reject_sco_sync()
5513 cp.reason = HCI_ERROR_REJ_LIMITED_RESOURCES; in hci_reject_sco_sync()
5516 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_sco_sync()
5522 struct hci_cp_le_reject_cis cp; in hci_le_reject_cis_sync() local
5524 memset(&cp, 0, sizeof(cp)); in hci_le_reject_cis_sync()
5525 cp.handle = cpu_to_le16(conn->handle); in hci_le_reject_cis_sync()
5526 cp.reason = reason; in hci_le_reject_cis_sync()
5529 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_reject_cis_sync()
5535 struct hci_cp_reject_conn_req cp; in hci_reject_conn_sync() local
5543 memset(&cp, 0, sizeof(cp)); in hci_reject_conn_sync()
5544 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_conn_sync()
5545 cp.reason = reason; in hci_reject_conn_sync()
5548 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_conn_sync()
5682 struct hci_cp_write_current_iac_lap cp; in hci_write_iac_sync() local
5687 memset(&cp, 0, sizeof(cp)); in hci_write_iac_sync()
5691 cp.num_iac = min_t(u8, hdev->num_iac, 2); in hci_write_iac_sync()
5692 cp.iac_lap[0] = 0x00; /* LIAC */ in hci_write_iac_sync()
5693 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5694 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5695 cp.iac_lap[3] = 0x33; /* GIAC */ in hci_write_iac_sync()
5696 cp.iac_lap[4] = 0x8b; in hci_write_iac_sync()
5697 cp.iac_lap[5] = 0x9e; in hci_write_iac_sync()
5700 cp.num_iac = 1; in hci_write_iac_sync()
5701 cp.iac_lap[0] = 0x33; /* GIAC */ in hci_write_iac_sync()
5702 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5703 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5707 (cp.num_iac * 3) + 1, &cp, in hci_write_iac_sync()
5804 struct hci_cp_inquiry cp; in hci_inquiry_sync() local
5815 memset(&cp, 0, sizeof(cp)); in hci_inquiry_sync()
5818 memcpy(&cp.lap, liac, sizeof(cp.lap)); in hci_inquiry_sync()
5820 memcpy(&cp.lap, giac, sizeof(cp.lap)); in hci_inquiry_sync()
5822 cp.length = length; in hci_inquiry_sync()
5823 cp.num_rsp = num_rsp; in hci_inquiry_sync()
5826 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_inquiry_sync()
6230 struct hci_cp_le_set_ext_adv_params cp; in hci_le_ext_directed_advertising_sync() local
6248 memset(&cp, 0, sizeof(cp)); in hci_le_ext_directed_advertising_sync()
6250 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_le_ext_directed_advertising_sync()
6251 cp.channel_map = hdev->le_adv_channel_map; in hci_le_ext_directed_advertising_sync()
6252 cp.tx_power = HCI_TX_POWER_INVALID; in hci_le_ext_directed_advertising_sync()
6253 cp.primary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6254 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6255 cp.handle = 0x00; /* Use instance 0 for directed adv */ in hci_le_ext_directed_advertising_sync()
6256 cp.own_addr_type = own_addr_type; in hci_le_ext_directed_advertising_sync()
6257 cp.peer_addr_type = conn->dst_type; in hci_le_ext_directed_advertising_sync()
6258 bacpy(&cp.peer_addr, &conn->dst); in hci_le_ext_directed_advertising_sync()
6268 err = hci_remove_ext_adv_instance_sync(hdev, cp.handle, NULL); in hci_le_ext_directed_advertising_sync()
6273 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_ext_directed_advertising_sync()
6293 struct hci_cp_le_set_adv_param cp; in hci_le_directed_advertising_sync() local
6316 memset(&cp, 0, sizeof(cp)); in hci_le_directed_advertising_sync()
6322 cp.min_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6323 cp.max_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6325 cp.type = LE_ADV_DIRECT_IND; in hci_le_directed_advertising_sync()
6326 cp.own_address_type = own_addr_type; in hci_le_directed_advertising_sync()
6327 cp.direct_addr_type = conn->dst_type; in hci_le_directed_advertising_sync()
6328 bacpy(&cp.direct_addr, &conn->dst); in hci_le_directed_advertising_sync()
6329 cp.channel_map = hdev->le_adv_channel_map; in hci_le_directed_advertising_sync()
6332 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_directed_advertising_sync()
6362 struct hci_cp_le_ext_create_conn *cp; in hci_le_ext_create_conn_sync() local
6364 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_le_ext_create_conn_sync()
6367 cp = (void *)data; in hci_le_ext_create_conn_sync()
6368 p = (void *)cp->data; in hci_le_ext_create_conn_sync()
6370 memset(cp, 0, sizeof(*cp)); in hci_le_ext_create_conn_sync()
6372 bacpy(&cp->peer_addr, &conn->dst); in hci_le_ext_create_conn_sync()
6373 cp->peer_addr_type = conn->dst_type; in hci_le_ext_create_conn_sync()
6374 cp->own_addr_type = own_addr_type; in hci_le_ext_create_conn_sync()
6376 plen = sizeof(*cp); in hci_le_ext_create_conn_sync()
6380 cp->phys |= LE_SCAN_PHY_1M; in hci_le_ext_create_conn_sync()
6389 cp->phys |= LE_SCAN_PHY_2M; in hci_le_ext_create_conn_sync()
6398 cp->phys |= LE_SCAN_PHY_CODED; in hci_le_ext_create_conn_sync()
6412 struct hci_cp_le_create_conn cp; in hci_le_create_conn_sync() local
6486 memset(&cp, 0, sizeof(cp)); in hci_le_create_conn_sync()
6488 cp.scan_interval = cpu_to_le16(hdev->le_scan_int_connect); in hci_le_create_conn_sync()
6489 cp.scan_window = cpu_to_le16(hdev->le_scan_window_connect); in hci_le_create_conn_sync()
6491 bacpy(&cp.peer_addr, &conn->dst); in hci_le_create_conn_sync()
6492 cp.peer_addr_type = conn->dst_type; in hci_le_create_conn_sync()
6493 cp.own_address_type = own_addr_type; in hci_le_create_conn_sync()
6494 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_le_create_conn_sync()
6495 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_le_create_conn_sync()
6496 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_le_create_conn_sync()
6497 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_le_create_conn_sync()
6498 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6499 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6508 sizeof(cp), &cp, in hci_le_create_conn_sync()
6622 struct hci_cp_le_remove_cig cp; in hci_le_remove_cig_sync() local
6624 memset(&cp, 0, sizeof(cp)); in hci_le_remove_cig_sync()
6625 cp.cig_id = handle; in hci_le_remove_cig_sync()
6627 return __hci_cmd_sync_status(hdev, HCI_OP_LE_REMOVE_CIG, sizeof(cp), in hci_le_remove_cig_sync()
6628 &cp, HCI_CMD_TIMEOUT); in hci_le_remove_cig_sync()
6633 struct hci_cp_le_big_term_sync cp; in hci_le_big_terminate_sync() local
6635 memset(&cp, 0, sizeof(cp)); in hci_le_big_terminate_sync()
6636 cp.handle = handle; in hci_le_big_terminate_sync()
6639 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_big_terminate_sync()
6644 struct hci_cp_le_pa_term_sync cp; in hci_le_pa_terminate_sync() local
6646 memset(&cp, 0, sizeof(cp)); in hci_le_pa_terminate_sync()
6647 cp.handle = cpu_to_le16(handle); in hci_le_pa_terminate_sync()
6650 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_pa_terminate_sync()
6743 struct hci_cp_create_conn cp; in hci_acl_create_conn_sync() local
6772 memset(&cp, 0, sizeof(cp)); in hci_acl_create_conn_sync()
6773 bacpy(&cp.bdaddr, &conn->dst); in hci_acl_create_conn_sync()
6774 cp.pscan_rep_mode = 0x02; in hci_acl_create_conn_sync()
6779 cp.pscan_rep_mode = ie->data.pscan_rep_mode; in hci_acl_create_conn_sync()
6780 cp.pscan_mode = ie->data.pscan_mode; in hci_acl_create_conn_sync()
6781 cp.clock_offset = ie->data.clock_offset | in hci_acl_create_conn_sync()
6788 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_acl_create_conn_sync()
6790 cp.role_switch = 0x01; in hci_acl_create_conn_sync()
6792 cp.role_switch = 0x00; in hci_acl_create_conn_sync()
6795 sizeof(cp), &cp, in hci_acl_create_conn_sync()
6864 struct hci_cp_le_conn_update cp; in hci_le_conn_update_sync() local
6866 memset(&cp, 0, sizeof(cp)); in hci_le_conn_update_sync()
6867 cp.handle = cpu_to_le16(conn->handle); in hci_le_conn_update_sync()
6868 cp.conn_interval_min = cpu_to_le16(params->conn_min_interval); in hci_le_conn_update_sync()
6869 cp.conn_interval_max = cpu_to_le16(params->conn_max_interval); in hci_le_conn_update_sync()
6870 cp.conn_latency = cpu_to_le16(params->conn_latency); in hci_le_conn_update_sync()
6871 cp.supervision_timeout = cpu_to_le16(params->supervision_timeout); in hci_le_conn_update_sync()
6872 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update_sync()
6873 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update_sync()
6876 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_conn_update_sync()