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()
1148 struct hci_cp_le_set_ext_adv_enable *cp; in hci_disable_ext_adv_instance_sync() local
1150 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_disable_ext_adv_instance_sync()
1167 cp = (void *)data; in hci_disable_ext_adv_instance_sync()
1168 set = (void *)cp->data; in hci_disable_ext_adv_instance_sync()
1171 cp->num_of_sets = !!instance; in hci_disable_ext_adv_instance_sync()
1172 cp->enable = 0x00; in hci_disable_ext_adv_instance_sync()
1176 size = sizeof(*cp) + sizeof(*set) * cp->num_of_sets; in hci_disable_ext_adv_instance_sync()
1185 struct hci_cp_le_set_adv_set_rand_addr cp; in hci_set_adv_set_random_addr_sync() local
1199 memset(&cp, 0, sizeof(cp)); in hci_set_adv_set_random_addr_sync()
1201 cp.handle = instance; in hci_set_adv_set_random_addr_sync()
1202 bacpy(&cp.bdaddr, random_addr); in hci_set_adv_set_random_addr_sync()
1205 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_set_random_addr_sync()
1210 struct hci_cp_le_set_ext_adv_params cp; in hci_setup_ext_adv_instance_sync() local
1258 memset(&cp, 0, sizeof(cp)); in hci_setup_ext_adv_instance_sync()
1261 hci_cpu_to_le24(adv->min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1262 hci_cpu_to_le24(adv->max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1263 cp.tx_power = adv->tx_power; in hci_setup_ext_adv_instance_sync()
1265 hci_cpu_to_le24(hdev->le_adv_min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1266 hci_cpu_to_le24(hdev->le_adv_max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1267 cp.tx_power = HCI_ADV_TX_POWER_NO_PREFERENCE; in hci_setup_ext_adv_instance_sync()
1274 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_CONN_IND); in hci_setup_ext_adv_instance_sync()
1276 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_IND); in hci_setup_ext_adv_instance_sync()
1280 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1282 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1285 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_NON_CONN_IND); in hci_setup_ext_adv_instance_sync()
1287 cp.evt_properties = cpu_to_le16(LE_LEGACY_NONCONN_IND); in hci_setup_ext_adv_instance_sync()
1298 hci_copy_identity_address(hdev, &cp.peer_addr, in hci_setup_ext_adv_instance_sync()
1299 &cp.peer_addr_type); in hci_setup_ext_adv_instance_sync()
1301 cp.own_addr_type = own_addr_type; in hci_setup_ext_adv_instance_sync()
1302 cp.channel_map = hdev->le_adv_channel_map; in hci_setup_ext_adv_instance_sync()
1303 cp.handle = adv ? adv->handle : instance; in hci_setup_ext_adv_instance_sync()
1306 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1307 cp.secondary_phy = HCI_ADV_PHY_2M; in hci_setup_ext_adv_instance_sync()
1309 cp.primary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1310 cp.secondary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1313 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1314 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1318 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_ext_adv_instance_sync()
1380 struct hci_cp_le_set_scan_rsp_data cp; in __hci_set_scan_rsp_data_sync() local
1383 memset(&cp, 0, sizeof(cp)); in __hci_set_scan_rsp_data_sync()
1385 len = eir_create_scan_rsp(hdev, instance, cp.data); in __hci_set_scan_rsp_data_sync()
1388 !memcmp(cp.data, hdev->scan_rsp_data, len)) in __hci_set_scan_rsp_data_sync()
1391 memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data)); in __hci_set_scan_rsp_data_sync()
1394 cp.length = len; in __hci_set_scan_rsp_data_sync()
1397 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in __hci_set_scan_rsp_data_sync()
1413 struct hci_cp_le_set_ext_adv_enable *cp; in hci_enable_ext_advertising_sync() local
1415 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_enable_ext_advertising_sync()
1429 cp = (void *)data; in hci_enable_ext_advertising_sync()
1430 set = (void *)cp->data; in hci_enable_ext_advertising_sync()
1432 memset(cp, 0, sizeof(*cp)); in hci_enable_ext_advertising_sync()
1434 cp->enable = 0x01; in hci_enable_ext_advertising_sync()
1435 cp->num_of_sets = 0x01; in hci_enable_ext_advertising_sync()
1452 sizeof(*cp) + in hci_enable_ext_advertising_sync()
1453 sizeof(*set) * cp->num_of_sets, in hci_enable_ext_advertising_sync()
1474 struct hci_cp_le_set_per_adv_enable cp; in hci_disable_per_advertising_sync() local
1482 memset(&cp, 0, sizeof(cp)); in hci_disable_per_advertising_sync()
1484 cp.enable = 0x00; in hci_disable_per_advertising_sync()
1485 cp.handle = instance; in hci_disable_per_advertising_sync()
1488 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disable_per_advertising_sync()
1494 struct hci_cp_le_set_per_adv_params cp; in hci_set_per_adv_params_sync() local
1496 memset(&cp, 0, sizeof(cp)); in hci_set_per_adv_params_sync()
1504 cp.handle = instance; in hci_set_per_adv_params_sync()
1505 cp.min_interval = cpu_to_le16(min_interval); in hci_set_per_adv_params_sync()
1506 cp.max_interval = cpu_to_le16(max_interval); in hci_set_per_adv_params_sync()
1507 cp.periodic_properties = 0x0000; in hci_set_per_adv_params_sync()
1510 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_per_adv_params_sync()
1539 struct hci_cp_le_set_per_adv_enable cp; in hci_enable_per_advertising_sync() local
1547 memset(&cp, 0, sizeof(cp)); in hci_enable_per_advertising_sync()
1549 cp.enable = 0x01; in hci_enable_per_advertising_sync()
1550 cp.handle = instance; in hci_enable_per_advertising_sync()
1553 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_per_advertising_sync()
1671 struct hci_cp_le_set_adv_param cp; in hci_enable_advertising_sync() local
1715 memset(&cp, 0, sizeof(cp)); in hci_enable_advertising_sync()
1726 cp.type = LE_ADV_IND; in hci_enable_advertising_sync()
1729 cp.type = LE_ADV_SCAN_IND; in hci_enable_advertising_sync()
1731 cp.type = LE_ADV_NONCONN_IND; in hci_enable_advertising_sync()
1740 cp.min_interval = cpu_to_le16(adv_min_interval); in hci_enable_advertising_sync()
1741 cp.max_interval = cpu_to_le16(adv_max_interval); in hci_enable_advertising_sync()
1742 cp.own_address_type = own_addr_type; in hci_enable_advertising_sync()
1743 cp.channel_map = hdev->le_adv_channel_map; in hci_enable_advertising_sync()
1746 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_advertising_sync()
1791 struct hci_cp_le_term_big cp; in hci_le_terminate_big_sync() local
1793 memset(&cp, 0, sizeof(cp)); in hci_le_terminate_big_sync()
1794 cp.handle = handle; in hci_le_terminate_big_sync()
1795 cp.reason = reason; in hci_le_terminate_big_sync()
1798 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_terminate_big_sync()
1841 struct hci_cp_le_set_adv_data cp; in hci_set_adv_data_sync() local
1844 memset(&cp, 0, sizeof(cp)); in hci_set_adv_data_sync()
1846 len = eir_create_adv_data(hdev, instance, cp.data); in hci_set_adv_data_sync()
1850 memcmp(cp.data, hdev->adv_data, len) == 0) in hci_set_adv_data_sync()
1853 memcpy(hdev->adv_data, cp.data, sizeof(cp.data)); in hci_set_adv_data_sync()
1856 cp.length = len; in hci_set_adv_data_sync()
1859 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_data_sync()
2061 struct hci_cp_read_rssi cp; in hci_read_rssi_sync() local
2063 cp.handle = handle; in hci_read_rssi_sync()
2065 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_rssi_sync()
2068 int hci_read_clock_sync(struct hci_dev *hdev, struct hci_cp_read_clock *cp) in hci_read_clock_sync() argument
2071 sizeof(*cp), cp, HCI_CMD_TIMEOUT); in hci_read_clock_sync()
2076 struct hci_cp_read_tx_power cp; in hci_read_tx_power_sync() local
2078 cp.handle = handle; in hci_read_tx_power_sync()
2079 cp.type = type; in hci_read_tx_power_sync()
2081 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_tx_power_sync()
2105 struct hci_cp_le_set_ext_scan_enable cp; in hci_le_set_ext_scan_enable_sync() local
2107 memset(&cp, 0, sizeof(cp)); in hci_le_set_ext_scan_enable_sync()
2108 cp.enable = val; in hci_le_set_ext_scan_enable_sync()
2111 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_ext_scan_enable_sync()
2113 cp.filter_dup = filter_dup; in hci_le_set_ext_scan_enable_sync()
2116 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_ext_scan_enable_sync()
2122 struct hci_cp_le_set_scan_enable cp; in hci_le_set_scan_enable_sync() local
2127 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_enable_sync()
2128 cp.enable = val; in hci_le_set_scan_enable_sync()
2131 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_scan_enable_sync()
2133 cp.filter_dup = filter_dup; in hci_le_set_scan_enable_sync()
2136 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_enable_sync()
2230 struct hci_cp_le_del_from_resolv_list cp; in hci_le_del_resolve_list_sync() local
2242 cp.bdaddr_type = bdaddr_type; in hci_le_del_resolve_list_sync()
2243 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_resolve_list_sync()
2246 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_resolve_list_sync()
2252 struct hci_cp_le_del_from_accept_list cp; in hci_le_del_accept_list_sync() local
2259 cp.bdaddr_type = bdaddr_type; in hci_le_del_accept_list_sync()
2260 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_accept_list_sync()
2265 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_del_accept_list_sync()
2268 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_accept_list_sync()
2274 bt_dev_dbg(hdev, "Remove %pMR (0x%x) from allow list", &cp.bdaddr, in hci_le_del_accept_list_sync()
2275 cp.bdaddr_type); in hci_le_del_accept_list_sync()
2293 struct hci_cp_le_add_to_resolv_list cp; in hci_le_add_resolve_list_sync() local
2308 hci_copy_identity_address(hdev, &cp.bdaddr, &cp.bdaddr_type); in hci_le_add_resolve_list_sync()
2309 memcpy(cp.peer_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2325 cp.bdaddr_type = params->addr_type; in hci_le_add_resolve_list_sync()
2326 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_resolve_list_sync()
2327 memcpy(cp.peer_irk, irk->val, 16); in hci_le_add_resolve_list_sync()
2344 memcpy(cp.local_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2346 memset(cp.local_irk, 0, 16); in hci_le_add_resolve_list_sync()
2349 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_resolve_list_sync()
2356 struct hci_cp_le_set_privacy_mode cp; in hci_le_set_privacy_mode_sync() local
2378 memset(&cp, 0, sizeof(cp)); in hci_le_set_privacy_mode_sync()
2379 cp.bdaddr_type = irk->addr_type; in hci_le_set_privacy_mode_sync()
2380 bacpy(&cp.bdaddr, &irk->bdaddr); in hci_le_set_privacy_mode_sync()
2381 cp.mode = HCI_DEVICE_PRIVACY; in hci_le_set_privacy_mode_sync()
2386 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_privacy_mode_sync()
2397 struct hci_cp_le_add_to_accept_list cp; in hci_le_add_accept_list_sync() local
2435 cp.bdaddr_type = params->addr_type; in hci_le_add_accept_list_sync()
2436 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_accept_list_sync()
2439 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_accept_list_sync()
2443 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_add_accept_list_sync()
2447 bt_dev_dbg(hdev, "Add %pMR (0x%x) to allow list", &cp.bdaddr, in hci_le_add_accept_list_sync()
2448 cp.bdaddr_type); in hci_le_add_accept_list_sync()
2828 static void hci_le_scan_phy_params(struct hci_cp_le_scan_phy_params *cp, in hci_le_scan_phy_params() argument
2831 cp->type = type; in hci_le_scan_phy_params()
2832 cp->interval = cpu_to_le16(interval); in hci_le_scan_phy_params()
2833 cp->window = cpu_to_le16(window); in hci_le_scan_phy_params()
2840 struct hci_cp_le_set_ext_scan_params *cp; in hci_le_set_ext_scan_param_sync() local
2842 u8 data[sizeof(*cp) + sizeof(*phy) * 2]; in hci_le_set_ext_scan_param_sync()
2845 cp = (void *)data; in hci_le_set_ext_scan_param_sync()
2846 phy = (void *)cp->data; in hci_le_set_ext_scan_param_sync()
2850 cp->own_addr_type = own_addr_type; in hci_le_set_ext_scan_param_sync()
2851 cp->filter_policy = filter_policy; in hci_le_set_ext_scan_param_sync()
2870 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2879 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2894 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2901 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2912 sizeof(*cp) + sizeof(*phy) * num_phy, in hci_le_set_ext_scan_param_sync()
2920 struct hci_cp_le_set_scan_param cp; in hci_le_set_scan_param_sync() local
2927 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_param_sync()
2928 cp.type = type; in hci_le_set_scan_param_sync()
2929 cp.interval = cpu_to_le16(interval); in hci_le_set_scan_param_sync()
2930 cp.window = cpu_to_le16(window); in hci_le_set_scan_param_sync()
2931 cp.own_address_type = own_addr_type; in hci_le_set_scan_param_sync()
2932 cp.filter_policy = filter_policy; in hci_le_set_scan_param_sync()
2935 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_param_sync()
3234 struct hci_cp_write_le_host_supported cp; in hci_write_le_host_supported_sync() local
3247 memset(&cp, 0, sizeof(cp)); in hci_write_le_host_supported_sync()
3249 cp.le = le; in hci_write_le_host_supported_sync()
3250 cp.simul = simul; in hci_write_le_host_supported_sync()
3253 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_le_host_supported_sync()
3316 struct hci_cp_write_page_scan_activity cp; in hci_write_fast_connectable_sync() local
3326 memset(&cp, 0, sizeof(cp)); in hci_write_fast_connectable_sync()
3332 cp.interval = cpu_to_le16(0x0100); in hci_write_fast_connectable_sync()
3335 cp.interval = cpu_to_le16(hdev->def_page_scan_int); in hci_write_fast_connectable_sync()
3338 cp.window = cpu_to_le16(hdev->def_page_scan_window); in hci_write_fast_connectable_sync()
3340 if (__cpu_to_le16(hdev->page_scan_interval) != cp.interval || in hci_write_fast_connectable_sync()
3341 __cpu_to_le16(hdev->page_scan_window) != cp.window) { in hci_write_fast_connectable_sync()
3344 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_fast_connectable_sync()
3417 struct hci_cp_write_local_name cp; in hci_update_name_sync() local
3419 memset(&cp, 0, sizeof(cp)); in hci_update_name_sync()
3421 memcpy(cp.name, hdev->dev_name, sizeof(cp.name)); in hci_update_name_sync()
3424 sizeof(cp), &cp, in hci_update_name_sync()
3724 struct hci_cp_set_event_filter cp; in hci_set_event_filter_sync() local
3732 memset(&cp, 0, sizeof(cp)); in hci_set_event_filter_sync()
3733 cp.flt_type = flt_type; in hci_set_event_filter_sync()
3736 cp.cond_type = cond_type; in hci_set_event_filter_sync()
3737 bacpy(&cp.addr_conn_flt.bdaddr, bdaddr); in hci_set_event_filter_sync()
3738 cp.addr_conn_flt.auto_accept = auto_accept; in hci_set_event_filter_sync()
3743 sizeof(cp.flt_type) : sizeof(cp), &cp, in hci_set_event_filter_sync()
3775 struct hci_cp_write_sync_flowctl cp; in hci_write_sync_flowctl_sync() local
3783 memset(&cp, 0, sizeof(cp)); in hci_write_sync_flowctl_sync()
3784 cp.enable = 0x01; in hci_write_sync_flowctl_sync()
3787 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_sync_flowctl_sync()
3838 struct hci_cp_write_eir cp; in hci_write_eir_sync() local
3844 memset(&cp, 0, sizeof(cp)); in hci_write_eir_sync()
3846 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_write_eir_sync()
3879 struct hci_cp_read_local_ext_features cp; in hci_read_local_ext_features_sync() local
3884 memset(&cp, 0, sizeof(cp)); in hci_read_local_ext_features_sync()
3885 cp.page = page; in hci_read_local_ext_features_sync()
3888 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_local_ext_features_sync()
4094 struct hci_cp_read_stored_link_key cp; in hci_read_stored_link_key_sync() local
4100 memset(&cp, 0, sizeof(cp)); in hci_read_stored_link_key_sync()
4101 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_read_stored_link_key_sync()
4102 cp.read_all = 0x01; in hci_read_stored_link_key_sync()
4105 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_stored_link_key_sync()
4110 struct hci_cp_write_def_link_policy cp; in hci_setup_link_policy_sync() local
4116 memset(&cp, 0, sizeof(cp)); in hci_setup_link_policy_sync()
4127 cp.policy = cpu_to_le16(link_policy); in hci_setup_link_policy_sync()
4130 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_link_policy_sync()
4440 struct hci_cp_write_le_host_supported cp; in hci_set_le_support_sync() local
4446 memset(&cp, 0, sizeof(cp)); in hci_set_le_support_sync()
4449 cp.le = 0x01; in hci_set_le_support_sync()
4450 cp.simul = 0x00; in hci_set_le_support_sync()
4453 if (cp.le == lmp_host_le_capable(hdev)) in hci_set_le_support_sync()
4457 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_le_support_sync()
4463 struct hci_cp_le_set_host_feature cp; in hci_le_set_host_feature_sync() local
4468 memset(&cp, 0, sizeof(cp)); in hci_le_set_host_feature_sync()
4471 cp.bit_number = 32; in hci_le_set_host_feature_sync()
4472 cp.bit_value = 1; in hci_le_set_host_feature_sync()
4475 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_host_feature_sync()
4527 struct hci_cp_delete_stored_link_key cp; in hci_delete_stored_link_key_sync() local
4546 memset(&cp, 0, sizeof(cp)); in hci_delete_stored_link_key_sync()
4547 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_delete_stored_link_key_sync()
4548 cp.delete_all = 0x01; in hci_delete_stored_link_key_sync()
4551 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_delete_stored_link_key_sync()
4664 struct hci_cp_write_def_err_data_reporting cp; in hci_set_err_data_report_sync() local
4675 memset(&cp, 0, sizeof(cp)); in hci_set_err_data_report_sync()
4676 cp.err_data_reporting = enabled ? ERR_DATA_REPORTING_ENABLED : in hci_set_err_data_report_sync()
4680 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_err_data_report_sync()
4706 struct hci_cp_le_write_def_data_len cp; in hci_le_set_write_def_data_len_sync() local
4711 memset(&cp, 0, sizeof(cp)); in hci_le_set_write_def_data_len_sync()
4712 cp.tx_len = cpu_to_le16(hdev->le_max_tx_len); in hci_le_set_write_def_data_len_sync()
4713 cp.tx_time = cpu_to_le16(hdev->le_max_tx_time); in hci_le_set_write_def_data_len_sync()
4716 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_write_def_data_len_sync()
4724 struct hci_cp_le_set_default_phy cp; in hci_le_set_default_phy_sync() local
4735 memset(&cp, 0, sizeof(cp)); in hci_le_set_default_phy_sync()
4736 cp.all_phys = 0x00; in hci_le_set_default_phy_sync()
4737 cp.tx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4738 cp.rx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4742 cp.tx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4743 cp.rx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4748 cp.tx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4749 cp.rx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4753 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_default_phy_sync()
5360 struct hci_cp_remote_name_req_cancel cp; in hci_remote_name_cancel_sync() local
5362 memset(&cp, 0, sizeof(cp)); in hci_remote_name_cancel_sync()
5363 bacpy(&cp.bdaddr, addr); in hci_remote_name_cancel_sync()
5366 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_remote_name_cancel_sync()
5425 struct hci_cp_disconnect cp; in hci_disconnect_sync() local
5438 memset(&cp, 0, sizeof(cp)); in hci_disconnect_sync()
5439 cp.handle = cpu_to_le16(conn->handle); in hci_disconnect_sync()
5440 cp.reason = reason; in hci_disconnect_sync()
5449 sizeof(cp), &cp, in hci_disconnect_sync()
5453 return __hci_cmd_sync_status(hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp, in hci_disconnect_sync()
5523 struct hci_cp_reject_sync_conn_req cp; in hci_reject_sco_sync() local
5525 memset(&cp, 0, sizeof(cp)); in hci_reject_sco_sync()
5526 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_sco_sync()
5527 cp.reason = reason; in hci_reject_sco_sync()
5533 cp.reason = HCI_ERROR_REJ_LIMITED_RESOURCES; in hci_reject_sco_sync()
5536 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_sco_sync()
5542 struct hci_cp_le_reject_cis cp; in hci_le_reject_cis_sync() local
5544 memset(&cp, 0, sizeof(cp)); in hci_le_reject_cis_sync()
5545 cp.handle = cpu_to_le16(conn->handle); in hci_le_reject_cis_sync()
5546 cp.reason = reason; in hci_le_reject_cis_sync()
5549 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_reject_cis_sync()
5555 struct hci_cp_reject_conn_req cp; in hci_reject_conn_sync() local
5563 memset(&cp, 0, sizeof(cp)); in hci_reject_conn_sync()
5564 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_conn_sync()
5565 cp.reason = reason; in hci_reject_conn_sync()
5568 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_conn_sync()
5702 struct hci_cp_write_current_iac_lap cp; in hci_write_iac_sync() local
5707 memset(&cp, 0, sizeof(cp)); in hci_write_iac_sync()
5711 cp.num_iac = min_t(u8, hdev->num_iac, 2); in hci_write_iac_sync()
5712 cp.iac_lap[0] = 0x00; /* LIAC */ in hci_write_iac_sync()
5713 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5714 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5715 cp.iac_lap[3] = 0x33; /* GIAC */ in hci_write_iac_sync()
5716 cp.iac_lap[4] = 0x8b; in hci_write_iac_sync()
5717 cp.iac_lap[5] = 0x9e; in hci_write_iac_sync()
5720 cp.num_iac = 1; in hci_write_iac_sync()
5721 cp.iac_lap[0] = 0x33; /* GIAC */ in hci_write_iac_sync()
5722 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5723 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5727 (cp.num_iac * 3) + 1, &cp, in hci_write_iac_sync()
5824 struct hci_cp_inquiry cp; in hci_inquiry_sync() local
5835 memset(&cp, 0, sizeof(cp)); in hci_inquiry_sync()
5838 memcpy(&cp.lap, liac, sizeof(cp.lap)); in hci_inquiry_sync()
5840 memcpy(&cp.lap, giac, sizeof(cp.lap)); in hci_inquiry_sync()
5842 cp.length = length; in hci_inquiry_sync()
5843 cp.num_rsp = num_rsp; in hci_inquiry_sync()
5846 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_inquiry_sync()
6250 struct hci_cp_le_set_ext_adv_params cp; in hci_le_ext_directed_advertising_sync() local
6268 memset(&cp, 0, sizeof(cp)); in hci_le_ext_directed_advertising_sync()
6270 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_le_ext_directed_advertising_sync()
6271 cp.channel_map = hdev->le_adv_channel_map; in hci_le_ext_directed_advertising_sync()
6272 cp.tx_power = HCI_TX_POWER_INVALID; in hci_le_ext_directed_advertising_sync()
6273 cp.primary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6274 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6275 cp.handle = 0x00; /* Use instance 0 for directed adv */ in hci_le_ext_directed_advertising_sync()
6276 cp.own_addr_type = own_addr_type; in hci_le_ext_directed_advertising_sync()
6277 cp.peer_addr_type = conn->dst_type; in hci_le_ext_directed_advertising_sync()
6278 bacpy(&cp.peer_addr, &conn->dst); in hci_le_ext_directed_advertising_sync()
6288 err = hci_remove_ext_adv_instance_sync(hdev, cp.handle, NULL); in hci_le_ext_directed_advertising_sync()
6293 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_ext_directed_advertising_sync()
6313 struct hci_cp_le_set_adv_param cp; in hci_le_directed_advertising_sync() local
6336 memset(&cp, 0, sizeof(cp)); in hci_le_directed_advertising_sync()
6342 cp.min_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6343 cp.max_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6345 cp.type = LE_ADV_DIRECT_IND; in hci_le_directed_advertising_sync()
6346 cp.own_address_type = own_addr_type; in hci_le_directed_advertising_sync()
6347 cp.direct_addr_type = conn->dst_type; in hci_le_directed_advertising_sync()
6348 bacpy(&cp.direct_addr, &conn->dst); in hci_le_directed_advertising_sync()
6349 cp.channel_map = hdev->le_adv_channel_map; in hci_le_directed_advertising_sync()
6352 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_directed_advertising_sync()
6382 struct hci_cp_le_ext_create_conn *cp; in hci_le_ext_create_conn_sync() local
6384 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_le_ext_create_conn_sync()
6387 cp = (void *)data; in hci_le_ext_create_conn_sync()
6388 p = (void *)cp->data; in hci_le_ext_create_conn_sync()
6390 memset(cp, 0, sizeof(*cp)); in hci_le_ext_create_conn_sync()
6392 bacpy(&cp->peer_addr, &conn->dst); in hci_le_ext_create_conn_sync()
6393 cp->peer_addr_type = conn->dst_type; in hci_le_ext_create_conn_sync()
6394 cp->own_addr_type = own_addr_type; in hci_le_ext_create_conn_sync()
6396 plen = sizeof(*cp); in hci_le_ext_create_conn_sync()
6400 cp->phys |= LE_SCAN_PHY_1M; in hci_le_ext_create_conn_sync()
6409 cp->phys |= LE_SCAN_PHY_2M; in hci_le_ext_create_conn_sync()
6418 cp->phys |= LE_SCAN_PHY_CODED; in hci_le_ext_create_conn_sync()
6432 struct hci_cp_le_create_conn cp; in hci_le_create_conn_sync() local
6506 memset(&cp, 0, sizeof(cp)); in hci_le_create_conn_sync()
6508 cp.scan_interval = cpu_to_le16(hdev->le_scan_int_connect); in hci_le_create_conn_sync()
6509 cp.scan_window = cpu_to_le16(hdev->le_scan_window_connect); in hci_le_create_conn_sync()
6511 bacpy(&cp.peer_addr, &conn->dst); in hci_le_create_conn_sync()
6512 cp.peer_addr_type = conn->dst_type; in hci_le_create_conn_sync()
6513 cp.own_address_type = own_addr_type; in hci_le_create_conn_sync()
6514 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_le_create_conn_sync()
6515 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_le_create_conn_sync()
6516 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_le_create_conn_sync()
6517 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_le_create_conn_sync()
6518 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6519 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6528 sizeof(cp), &cp, in hci_le_create_conn_sync()
6642 struct hci_cp_le_remove_cig cp; in hci_le_remove_cig_sync() local
6644 memset(&cp, 0, sizeof(cp)); in hci_le_remove_cig_sync()
6645 cp.cig_id = handle; in hci_le_remove_cig_sync()
6647 return __hci_cmd_sync_status(hdev, HCI_OP_LE_REMOVE_CIG, sizeof(cp), in hci_le_remove_cig_sync()
6648 &cp, HCI_CMD_TIMEOUT); in hci_le_remove_cig_sync()
6653 struct hci_cp_le_big_term_sync cp; in hci_le_big_terminate_sync() local
6655 memset(&cp, 0, sizeof(cp)); in hci_le_big_terminate_sync()
6656 cp.handle = handle; in hci_le_big_terminate_sync()
6659 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_big_terminate_sync()
6664 struct hci_cp_le_pa_term_sync cp; in hci_le_pa_terminate_sync() local
6666 memset(&cp, 0, sizeof(cp)); in hci_le_pa_terminate_sync()
6667 cp.handle = cpu_to_le16(handle); in hci_le_pa_terminate_sync()
6670 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_pa_terminate_sync()
6763 struct hci_cp_create_conn cp; in hci_acl_create_conn_sync() local
6792 memset(&cp, 0, sizeof(cp)); in hci_acl_create_conn_sync()
6793 bacpy(&cp.bdaddr, &conn->dst); in hci_acl_create_conn_sync()
6794 cp.pscan_rep_mode = 0x02; in hci_acl_create_conn_sync()
6799 cp.pscan_rep_mode = ie->data.pscan_rep_mode; in hci_acl_create_conn_sync()
6800 cp.pscan_mode = ie->data.pscan_mode; in hci_acl_create_conn_sync()
6801 cp.clock_offset = ie->data.clock_offset | in hci_acl_create_conn_sync()
6808 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_acl_create_conn_sync()
6810 cp.role_switch = 0x01; in hci_acl_create_conn_sync()
6812 cp.role_switch = 0x00; in hci_acl_create_conn_sync()
6815 sizeof(cp), &cp, in hci_acl_create_conn_sync()
6884 struct hci_cp_le_conn_update cp; in hci_le_conn_update_sync() local
6886 memset(&cp, 0, sizeof(cp)); in hci_le_conn_update_sync()
6887 cp.handle = cpu_to_le16(conn->handle); in hci_le_conn_update_sync()
6888 cp.conn_interval_min = cpu_to_le16(params->conn_min_interval); in hci_le_conn_update_sync()
6889 cp.conn_interval_max = cpu_to_le16(params->conn_max_interval); in hci_le_conn_update_sync()
6890 cp.conn_latency = cpu_to_le16(params->conn_latency); in hci_le_conn_update_sync()
6891 cp.supervision_timeout = cpu_to_le16(params->supervision_timeout); in hci_le_conn_update_sync()
6892 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update_sync()
6893 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update_sync()
6896 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_conn_update_sync()