Lines Matching full:cp
907 struct hci_cp_write_eir cp; in hci_update_eir_sync() local
923 memset(&cp, 0, sizeof(cp)); in hci_update_eir_sync()
925 eir_create(hdev, cp.data); in hci_update_eir_sync()
927 if (memcmp(cp.data, hdev->eir, sizeof(cp.data)) == 0) in hci_update_eir_sync()
930 memcpy(hdev->eir, cp.data, sizeof(cp.data)); in hci_update_eir_sync()
932 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_update_eir_sync()
1154 struct hci_cp_le_set_ext_adv_enable *cp; in hci_disable_ext_adv_instance_sync() local
1156 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_disable_ext_adv_instance_sync()
1173 cp = (void *)data; in hci_disable_ext_adv_instance_sync()
1174 set = (void *)cp->data; in hci_disable_ext_adv_instance_sync()
1177 cp->num_of_sets = !!instance; in hci_disable_ext_adv_instance_sync()
1178 cp->enable = 0x00; in hci_disable_ext_adv_instance_sync()
1182 size = sizeof(*cp) + sizeof(*set) * cp->num_of_sets; in hci_disable_ext_adv_instance_sync()
1191 struct hci_cp_le_set_adv_set_rand_addr cp; in hci_set_adv_set_random_addr_sync() local
1205 memset(&cp, 0, sizeof(cp)); in hci_set_adv_set_random_addr_sync()
1207 cp.handle = instance; in hci_set_adv_set_random_addr_sync()
1208 bacpy(&cp.bdaddr, random_addr); in hci_set_adv_set_random_addr_sync()
1211 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_set_random_addr_sync()
1216 const struct hci_cp_le_set_ext_adv_params *cp, in hci_set_ext_adv_params_sync() argument
1221 skb = __hci_cmd_sync(hdev, HCI_OP_LE_SET_EXT_ADV_PARAMS, sizeof(*cp), in hci_set_ext_adv_params_sync()
1222 cp, HCI_CMD_TIMEOUT); in hci_set_ext_adv_params_sync()
1245 hdev->adv_addr_type = cp->own_addr_type; in hci_set_ext_adv_params_sync()
1246 if (!cp->handle) { in hci_set_ext_adv_params_sync()
1298 struct hci_cp_le_set_adv_data cp; in hci_set_adv_data_sync() local
1301 memset(&cp, 0, sizeof(cp)); in hci_set_adv_data_sync()
1303 len = eir_create_adv_data(hdev, instance, cp.data, sizeof(cp.data)); in hci_set_adv_data_sync()
1307 memcmp(cp.data, hdev->adv_data, len) == 0) in hci_set_adv_data_sync()
1310 memcpy(hdev->adv_data, cp.data, sizeof(cp.data)); in hci_set_adv_data_sync()
1313 cp.length = len; in hci_set_adv_data_sync()
1316 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_data_sync()
1332 struct hci_cp_le_set_ext_adv_params cp; in hci_setup_ext_adv_instance_sync() local
1383 memset(&cp, 0, sizeof(cp)); in hci_setup_ext_adv_instance_sync()
1386 hci_cpu_to_le24(adv->min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1387 hci_cpu_to_le24(adv->max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1388 cp.tx_power = adv->tx_power; in hci_setup_ext_adv_instance_sync()
1389 cp.sid = adv->sid; in hci_setup_ext_adv_instance_sync()
1391 hci_cpu_to_le24(hdev->le_adv_min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1392 hci_cpu_to_le24(hdev->le_adv_max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1393 cp.tx_power = HCI_ADV_TX_POWER_NO_PREFERENCE; in hci_setup_ext_adv_instance_sync()
1394 cp.sid = 0x00; in hci_setup_ext_adv_instance_sync()
1401 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_CONN_IND); in hci_setup_ext_adv_instance_sync()
1403 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_IND); in hci_setup_ext_adv_instance_sync()
1407 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1409 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1412 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_NON_CONN_IND); in hci_setup_ext_adv_instance_sync()
1414 cp.evt_properties = cpu_to_le16(LE_LEGACY_NONCONN_IND); in hci_setup_ext_adv_instance_sync()
1425 hci_copy_identity_address(hdev, &cp.peer_addr, in hci_setup_ext_adv_instance_sync()
1426 &cp.peer_addr_type); in hci_setup_ext_adv_instance_sync()
1428 cp.own_addr_type = own_addr_type; in hci_setup_ext_adv_instance_sync()
1429 cp.channel_map = hdev->le_adv_channel_map; in hci_setup_ext_adv_instance_sync()
1430 cp.handle = adv ? adv->handle : instance; in hci_setup_ext_adv_instance_sync()
1433 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1434 cp.secondary_phy = HCI_ADV_PHY_2M; in hci_setup_ext_adv_instance_sync()
1436 cp.primary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1437 cp.secondary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1440 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1441 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1444 err = hci_set_ext_adv_params_sync(hdev, adv, &cp, &rp); in hci_setup_ext_adv_instance_sync()
1449 err = hci_set_ext_adv_data_sync(hdev, cp.handle); in hci_setup_ext_adv_instance_sync()
1511 struct hci_cp_le_set_scan_rsp_data cp; in __hci_set_scan_rsp_data_sync() local
1514 memset(&cp, 0, sizeof(cp)); in __hci_set_scan_rsp_data_sync()
1516 len = eir_create_scan_rsp(hdev, instance, cp.data); in __hci_set_scan_rsp_data_sync()
1519 !memcmp(cp.data, hdev->scan_rsp_data, len)) in __hci_set_scan_rsp_data_sync()
1522 memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data)); in __hci_set_scan_rsp_data_sync()
1525 cp.length = len; in __hci_set_scan_rsp_data_sync()
1528 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in __hci_set_scan_rsp_data_sync()
1544 struct hci_cp_le_set_ext_adv_enable *cp; in hci_enable_ext_advertising_sync() local
1546 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_enable_ext_advertising_sync()
1560 cp = (void *)data; in hci_enable_ext_advertising_sync()
1561 set = (void *)cp->data; in hci_enable_ext_advertising_sync()
1563 memset(cp, 0, sizeof(*cp)); in hci_enable_ext_advertising_sync()
1565 cp->enable = 0x01; in hci_enable_ext_advertising_sync()
1566 cp->num_of_sets = 0x01; in hci_enable_ext_advertising_sync()
1583 sizeof(*cp) + in hci_enable_ext_advertising_sync()
1584 sizeof(*set) * cp->num_of_sets, in hci_enable_ext_advertising_sync()
1605 struct hci_cp_le_set_per_adv_enable cp; in hci_disable_per_advertising_sync() local
1613 memset(&cp, 0, sizeof(cp)); in hci_disable_per_advertising_sync()
1615 cp.enable = 0x00; in hci_disable_per_advertising_sync()
1616 cp.handle = instance; in hci_disable_per_advertising_sync()
1619 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disable_per_advertising_sync()
1625 struct hci_cp_le_set_per_adv_params cp; in hci_set_per_adv_params_sync() local
1627 memset(&cp, 0, sizeof(cp)); in hci_set_per_adv_params_sync()
1635 cp.handle = instance; in hci_set_per_adv_params_sync()
1636 cp.min_interval = cpu_to_le16(min_interval); in hci_set_per_adv_params_sync()
1637 cp.max_interval = cpu_to_le16(max_interval); in hci_set_per_adv_params_sync()
1638 cp.periodic_properties = 0x0000; in hci_set_per_adv_params_sync()
1641 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_per_adv_params_sync()
1670 struct hci_cp_le_set_per_adv_enable cp; in hci_enable_per_advertising_sync() local
1678 memset(&cp, 0, sizeof(cp)); in hci_enable_per_advertising_sync()
1680 cp.enable = 0x01; in hci_enable_per_advertising_sync()
1681 cp.handle = instance; in hci_enable_per_advertising_sync()
1684 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_per_advertising_sync()
1824 struct hci_cp_le_set_adv_param cp; in hci_enable_advertising_sync() local
1868 memset(&cp, 0, sizeof(cp)); in hci_enable_advertising_sync()
1879 cp.type = LE_ADV_IND; in hci_enable_advertising_sync()
1882 cp.type = LE_ADV_SCAN_IND; in hci_enable_advertising_sync()
1884 cp.type = LE_ADV_NONCONN_IND; in hci_enable_advertising_sync()
1893 cp.min_interval = cpu_to_le16(adv_min_interval); in hci_enable_advertising_sync()
1894 cp.max_interval = cpu_to_le16(adv_max_interval); in hci_enable_advertising_sync()
1895 cp.own_address_type = own_addr_type; in hci_enable_advertising_sync()
1896 cp.channel_map = hdev->le_adv_channel_map; in hci_enable_advertising_sync()
1899 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_advertising_sync()
1944 struct hci_cp_le_term_big cp; in hci_le_terminate_big_sync() local
1946 memset(&cp, 0, sizeof(cp)); in hci_le_terminate_big_sync()
1947 cp.handle = handle; in hci_le_terminate_big_sync()
1948 cp.reason = reason; in hci_le_terminate_big_sync()
1951 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_terminate_big_sync()
2137 struct hci_cp_read_rssi cp; in hci_read_rssi_sync() local
2139 cp.handle = handle; in hci_read_rssi_sync()
2141 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_rssi_sync()
2144 int hci_read_clock_sync(struct hci_dev *hdev, struct hci_cp_read_clock *cp) in hci_read_clock_sync() argument
2147 sizeof(*cp), cp, HCI_CMD_TIMEOUT); in hci_read_clock_sync()
2152 struct hci_cp_read_tx_power cp; in hci_read_tx_power_sync() local
2154 cp.handle = handle; in hci_read_tx_power_sync()
2155 cp.type = type; in hci_read_tx_power_sync()
2157 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_tx_power_sync()
2178 struct hci_cp_le_set_ext_scan_enable cp; in hci_le_set_ext_scan_enable_sync() local
2180 memset(&cp, 0, sizeof(cp)); in hci_le_set_ext_scan_enable_sync()
2181 cp.enable = val; in hci_le_set_ext_scan_enable_sync()
2184 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_ext_scan_enable_sync()
2186 cp.filter_dup = filter_dup; in hci_le_set_ext_scan_enable_sync()
2189 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_ext_scan_enable_sync()
2195 struct hci_cp_le_set_scan_enable cp; in hci_le_set_scan_enable_sync() local
2200 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_enable_sync()
2201 cp.enable = val; in hci_le_set_scan_enable_sync()
2204 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_scan_enable_sync()
2206 cp.filter_dup = filter_dup; in hci_le_set_scan_enable_sync()
2209 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_enable_sync()
2303 struct hci_cp_le_del_from_resolv_list cp; in hci_le_del_resolve_list_sync() local
2315 cp.bdaddr_type = bdaddr_type; in hci_le_del_resolve_list_sync()
2316 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_resolve_list_sync()
2319 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_resolve_list_sync()
2325 struct hci_cp_le_del_from_accept_list cp; in hci_le_del_accept_list_sync() local
2332 cp.bdaddr_type = bdaddr_type; in hci_le_del_accept_list_sync()
2333 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_accept_list_sync()
2338 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_del_accept_list_sync()
2341 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_accept_list_sync()
2347 bt_dev_dbg(hdev, "Remove %pMR (0x%x) from allow list", &cp.bdaddr, in hci_le_del_accept_list_sync()
2348 cp.bdaddr_type); in hci_le_del_accept_list_sync()
2366 struct hci_cp_le_add_to_resolv_list cp; in hci_le_add_resolve_list_sync() local
2381 hci_copy_identity_address(hdev, &cp.bdaddr, &cp.bdaddr_type); in hci_le_add_resolve_list_sync()
2382 memcpy(cp.peer_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2398 cp.bdaddr_type = params->addr_type; in hci_le_add_resolve_list_sync()
2399 bacpy(&cp.bdaddr, ¶ms->addr); in hci_le_add_resolve_list_sync()
2400 memcpy(cp.peer_irk, irk->val, 16); in hci_le_add_resolve_list_sync()
2417 memcpy(cp.local_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2419 memset(cp.local_irk, 0, 16); in hci_le_add_resolve_list_sync()
2422 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_resolve_list_sync()
2429 struct hci_cp_le_set_privacy_mode cp; in hci_le_set_privacy_mode_sync() local
2451 memset(&cp, 0, sizeof(cp)); in hci_le_set_privacy_mode_sync()
2452 cp.bdaddr_type = irk->addr_type; in hci_le_set_privacy_mode_sync()
2453 bacpy(&cp.bdaddr, &irk->bdaddr); in hci_le_set_privacy_mode_sync()
2454 cp.mode = HCI_DEVICE_PRIVACY; in hci_le_set_privacy_mode_sync()
2459 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_privacy_mode_sync()
2470 struct hci_cp_le_add_to_accept_list cp; in hci_le_add_accept_list_sync() local
2508 cp.bdaddr_type = params->addr_type; in hci_le_add_accept_list_sync()
2509 bacpy(&cp.bdaddr, ¶ms->addr); in hci_le_add_accept_list_sync()
2512 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_accept_list_sync()
2516 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_add_accept_list_sync()
2520 bt_dev_dbg(hdev, "Add %pMR (0x%x) to allow list", &cp.bdaddr, in hci_le_add_accept_list_sync()
2521 cp.bdaddr_type); in hci_le_add_accept_list_sync()
2911 static void hci_le_scan_phy_params(struct hci_cp_le_scan_phy_params *cp, in hci_le_scan_phy_params() argument
2914 cp->type = type; in hci_le_scan_phy_params()
2915 cp->interval = cpu_to_le16(interval); in hci_le_scan_phy_params()
2916 cp->window = cpu_to_le16(window); in hci_le_scan_phy_params()
2923 struct hci_cp_le_set_ext_scan_params *cp; in hci_le_set_ext_scan_param_sync() local
2925 u8 data[sizeof(*cp) + sizeof(*phy) * 2]; in hci_le_set_ext_scan_param_sync()
2928 cp = (void *)data; in hci_le_set_ext_scan_param_sync()
2929 phy = (void *)cp->data; in hci_le_set_ext_scan_param_sync()
2933 cp->own_addr_type = own_addr_type; in hci_le_set_ext_scan_param_sync()
2934 cp->filter_policy = filter_policy; in hci_le_set_ext_scan_param_sync()
2953 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2962 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2977 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2984 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2995 sizeof(*cp) + sizeof(*phy) * num_phy, in hci_le_set_ext_scan_param_sync()
3003 struct hci_cp_le_set_scan_param cp; in hci_le_set_scan_param_sync() local
3010 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_param_sync()
3011 cp.type = type; in hci_le_set_scan_param_sync()
3012 cp.interval = cpu_to_le16(interval); in hci_le_set_scan_param_sync()
3013 cp.window = cpu_to_le16(window); in hci_le_set_scan_param_sync()
3014 cp.own_address_type = own_addr_type; in hci_le_set_scan_param_sync()
3015 cp.filter_policy = filter_policy; in hci_le_set_scan_param_sync()
3018 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_param_sync()
3317 struct hci_cp_write_le_host_supported cp; in hci_write_le_host_supported_sync() local
3330 memset(&cp, 0, sizeof(cp)); in hci_write_le_host_supported_sync()
3332 cp.le = le; in hci_write_le_host_supported_sync()
3333 cp.simul = simul; in hci_write_le_host_supported_sync()
3336 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_le_host_supported_sync()
3399 struct hci_cp_write_page_scan_activity cp; in hci_write_fast_connectable_sync() local
3409 memset(&cp, 0, sizeof(cp)); in hci_write_fast_connectable_sync()
3415 cp.interval = cpu_to_le16(0x0100); in hci_write_fast_connectable_sync()
3418 cp.interval = cpu_to_le16(hdev->def_page_scan_int); in hci_write_fast_connectable_sync()
3421 cp.window = cpu_to_le16(hdev->def_page_scan_window); in hci_write_fast_connectable_sync()
3423 if (__cpu_to_le16(hdev->page_scan_interval) != cp.interval || in hci_write_fast_connectable_sync()
3424 __cpu_to_le16(hdev->page_scan_window) != cp.window) { in hci_write_fast_connectable_sync()
3427 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_fast_connectable_sync()
3500 struct hci_cp_write_local_name cp; in hci_update_name_sync() local
3502 memset(&cp, 0, sizeof(cp)); in hci_update_name_sync()
3504 memcpy(cp.name, name, sizeof(cp.name)); in hci_update_name_sync()
3507 sizeof(cp), &cp, in hci_update_name_sync()
3807 struct hci_cp_set_event_filter cp; in hci_set_event_filter_sync() local
3815 memset(&cp, 0, sizeof(cp)); in hci_set_event_filter_sync()
3816 cp.flt_type = flt_type; in hci_set_event_filter_sync()
3819 cp.cond_type = cond_type; in hci_set_event_filter_sync()
3820 bacpy(&cp.addr_conn_flt.bdaddr, bdaddr); in hci_set_event_filter_sync()
3821 cp.addr_conn_flt.auto_accept = auto_accept; in hci_set_event_filter_sync()
3826 sizeof(cp.flt_type) : sizeof(cp), &cp, in hci_set_event_filter_sync()
3858 struct hci_cp_write_sync_flowctl cp; in hci_write_sync_flowctl_sync() local
3866 memset(&cp, 0, sizeof(cp)); in hci_write_sync_flowctl_sync()
3867 cp.enable = 0x01; in hci_write_sync_flowctl_sync()
3870 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_sync_flowctl_sync()
3921 struct hci_cp_write_eir cp; in hci_write_eir_sync() local
3927 memset(&cp, 0, sizeof(cp)); in hci_write_eir_sync()
3929 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_write_eir_sync()
3962 struct hci_cp_read_local_ext_features cp; in hci_read_local_ext_features_sync() local
3967 memset(&cp, 0, sizeof(cp)); in hci_read_local_ext_features_sync()
3968 cp.page = page; in hci_read_local_ext_features_sync()
3971 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_local_ext_features_sync()
4177 struct hci_cp_read_stored_link_key cp; in hci_read_stored_link_key_sync() local
4183 memset(&cp, 0, sizeof(cp)); in hci_read_stored_link_key_sync()
4184 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_read_stored_link_key_sync()
4185 cp.read_all = 0x01; in hci_read_stored_link_key_sync()
4188 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_stored_link_key_sync()
4193 struct hci_cp_write_def_link_policy cp; in hci_setup_link_policy_sync() local
4199 memset(&cp, 0, sizeof(cp)); in hci_setup_link_policy_sync()
4210 cp.policy = cpu_to_le16(link_policy); in hci_setup_link_policy_sync()
4213 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_link_policy_sync()
4523 struct hci_cp_write_le_host_supported cp; in hci_set_le_support_sync() local
4529 memset(&cp, 0, sizeof(cp)); in hci_set_le_support_sync()
4532 cp.le = 0x01; in hci_set_le_support_sync()
4533 cp.simul = 0x00; in hci_set_le_support_sync()
4536 if (cp.le == lmp_host_le_capable(hdev)) in hci_set_le_support_sync()
4540 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_le_support_sync()
4546 struct hci_cp_le_set_host_feature cp; in hci_le_set_host_feature_sync() local
4551 memset(&cp, 0, sizeof(cp)); in hci_le_set_host_feature_sync()
4554 cp.bit_number = 32; in hci_le_set_host_feature_sync()
4555 cp.bit_value = iso_enabled(hdev) ? 0x01 : 0x00; in hci_le_set_host_feature_sync()
4558 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_host_feature_sync()
4610 struct hci_cp_delete_stored_link_key cp; in hci_delete_stored_link_key_sync() local
4629 memset(&cp, 0, sizeof(cp)); in hci_delete_stored_link_key_sync()
4630 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_delete_stored_link_key_sync()
4631 cp.delete_all = 0x01; in hci_delete_stored_link_key_sync()
4634 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_delete_stored_link_key_sync()
4747 struct hci_cp_write_def_err_data_reporting cp; in hci_set_err_data_report_sync() local
4758 memset(&cp, 0, sizeof(cp)); in hci_set_err_data_report_sync()
4759 cp.err_data_reporting = enabled ? ERR_DATA_REPORTING_ENABLED : in hci_set_err_data_report_sync()
4763 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_err_data_report_sync()
4789 struct hci_cp_le_write_def_data_len cp; in hci_le_set_write_def_data_len_sync() local
4794 memset(&cp, 0, sizeof(cp)); in hci_le_set_write_def_data_len_sync()
4795 cp.tx_len = cpu_to_le16(hdev->le_max_tx_len); in hci_le_set_write_def_data_len_sync()
4796 cp.tx_time = cpu_to_le16(hdev->le_max_tx_time); in hci_le_set_write_def_data_len_sync()
4799 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_write_def_data_len_sync()
4807 struct hci_cp_le_set_default_phy cp; in hci_le_set_default_phy_sync() local
4818 memset(&cp, 0, sizeof(cp)); in hci_le_set_default_phy_sync()
4819 cp.all_phys = 0x00; in hci_le_set_default_phy_sync()
4820 cp.tx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4821 cp.rx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4825 cp.tx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4826 cp.rx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4831 cp.tx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4832 cp.rx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4836 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_default_phy_sync()
5443 struct hci_cp_remote_name_req_cancel cp; in hci_remote_name_cancel_sync() local
5445 memset(&cp, 0, sizeof(cp)); in hci_remote_name_cancel_sync()
5446 bacpy(&cp.bdaddr, addr); in hci_remote_name_cancel_sync()
5449 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_remote_name_cancel_sync()
5508 struct hci_cp_disconnect cp; in hci_disconnect_sync() local
5521 memset(&cp, 0, sizeof(cp)); in hci_disconnect_sync()
5522 cp.handle = cpu_to_le16(conn->handle); in hci_disconnect_sync()
5523 cp.reason = reason; in hci_disconnect_sync()
5532 sizeof(cp), &cp, in hci_disconnect_sync()
5536 return __hci_cmd_sync_status(hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp, in hci_disconnect_sync()
5607 struct hci_cp_reject_sync_conn_req cp; in hci_reject_sco_sync() local
5609 memset(&cp, 0, sizeof(cp)); in hci_reject_sco_sync()
5610 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_sco_sync()
5611 cp.reason = reason; in hci_reject_sco_sync()
5617 cp.reason = HCI_ERROR_REJ_LIMITED_RESOURCES; in hci_reject_sco_sync()
5620 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_sco_sync()
5626 struct hci_cp_le_reject_cis cp; in hci_le_reject_cis_sync() local
5628 memset(&cp, 0, sizeof(cp)); in hci_le_reject_cis_sync()
5629 cp.handle = cpu_to_le16(conn->handle); in hci_le_reject_cis_sync()
5630 cp.reason = reason; in hci_le_reject_cis_sync()
5633 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_reject_cis_sync()
5639 struct hci_cp_reject_conn_req cp; in hci_reject_conn_sync() local
5650 memset(&cp, 0, sizeof(cp)); in hci_reject_conn_sync()
5651 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_conn_sync()
5652 cp.reason = reason; in hci_reject_conn_sync()
5655 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_conn_sync()
5789 struct hci_cp_write_current_iac_lap cp; in hci_write_iac_sync() local
5794 memset(&cp, 0, sizeof(cp)); in hci_write_iac_sync()
5798 cp.num_iac = min_t(u8, hdev->num_iac, 2); in hci_write_iac_sync()
5799 cp.iac_lap[0] = 0x00; /* LIAC */ in hci_write_iac_sync()
5800 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5801 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5802 cp.iac_lap[3] = 0x33; /* GIAC */ in hci_write_iac_sync()
5803 cp.iac_lap[4] = 0x8b; in hci_write_iac_sync()
5804 cp.iac_lap[5] = 0x9e; in hci_write_iac_sync()
5807 cp.num_iac = 1; in hci_write_iac_sync()
5808 cp.iac_lap[0] = 0x33; /* GIAC */ in hci_write_iac_sync()
5809 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5810 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5814 (cp.num_iac * 3) + 1, &cp, in hci_write_iac_sync()
5911 struct hci_cp_inquiry cp; in hci_inquiry_sync() local
5922 memset(&cp, 0, sizeof(cp)); in hci_inquiry_sync()
5925 memcpy(&cp.lap, liac, sizeof(cp.lap)); in hci_inquiry_sync()
5927 memcpy(&cp.lap, giac, sizeof(cp.lap)); in hci_inquiry_sync()
5929 cp.length = length; in hci_inquiry_sync()
5930 cp.num_rsp = num_rsp; in hci_inquiry_sync()
5933 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_inquiry_sync()
6336 struct hci_cp_le_set_ext_adv_params cp; in hci_le_ext_directed_advertising_sync() local
6355 memset(&cp, 0, sizeof(cp)); in hci_le_ext_directed_advertising_sync()
6357 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_le_ext_directed_advertising_sync()
6358 cp.channel_map = hdev->le_adv_channel_map; in hci_le_ext_directed_advertising_sync()
6359 cp.tx_power = HCI_TX_POWER_INVALID; in hci_le_ext_directed_advertising_sync()
6360 cp.primary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6361 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6362 cp.handle = 0x00; /* Use instance 0 for directed adv */ in hci_le_ext_directed_advertising_sync()
6363 cp.own_addr_type = own_addr_type; in hci_le_ext_directed_advertising_sync()
6364 cp.peer_addr_type = conn->dst_type; in hci_le_ext_directed_advertising_sync()
6365 bacpy(&cp.peer_addr, &conn->dst); in hci_le_ext_directed_advertising_sync()
6375 err = hci_remove_ext_adv_instance_sync(hdev, cp.handle, NULL); in hci_le_ext_directed_advertising_sync()
6379 err = hci_set_ext_adv_params_sync(hdev, NULL, &cp, &rp); in hci_le_ext_directed_advertising_sync()
6384 err = hci_set_ext_adv_data_sync(hdev, cp.handle); in hci_le_ext_directed_advertising_sync()
6404 struct hci_cp_le_set_adv_param cp; in hci_le_directed_advertising_sync() local
6427 memset(&cp, 0, sizeof(cp)); in hci_le_directed_advertising_sync()
6433 cp.min_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6434 cp.max_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6436 cp.type = LE_ADV_DIRECT_IND; in hci_le_directed_advertising_sync()
6437 cp.own_address_type = own_addr_type; in hci_le_directed_advertising_sync()
6438 cp.direct_addr_type = conn->dst_type; in hci_le_directed_advertising_sync()
6439 bacpy(&cp.direct_addr, &conn->dst); in hci_le_directed_advertising_sync()
6440 cp.channel_map = hdev->le_adv_channel_map; in hci_le_directed_advertising_sync()
6443 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_directed_advertising_sync()
6473 struct hci_cp_le_ext_create_conn *cp; in hci_le_ext_create_conn_sync() local
6475 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_le_ext_create_conn_sync()
6478 cp = (void *)data; in hci_le_ext_create_conn_sync()
6479 p = (void *)cp->data; in hci_le_ext_create_conn_sync()
6481 memset(cp, 0, sizeof(*cp)); in hci_le_ext_create_conn_sync()
6483 bacpy(&cp->peer_addr, &conn->dst); in hci_le_ext_create_conn_sync()
6484 cp->peer_addr_type = conn->dst_type; in hci_le_ext_create_conn_sync()
6485 cp->own_addr_type = own_addr_type; in hci_le_ext_create_conn_sync()
6487 plen = sizeof(*cp); in hci_le_ext_create_conn_sync()
6491 cp->phys |= LE_SCAN_PHY_1M; in hci_le_ext_create_conn_sync()
6500 cp->phys |= LE_SCAN_PHY_2M; in hci_le_ext_create_conn_sync()
6509 cp->phys |= LE_SCAN_PHY_CODED; in hci_le_ext_create_conn_sync()
6523 struct hci_cp_le_create_conn cp; in hci_le_create_conn_sync() local
6597 memset(&cp, 0, sizeof(cp)); in hci_le_create_conn_sync()
6599 cp.scan_interval = cpu_to_le16(hdev->le_scan_int_connect); in hci_le_create_conn_sync()
6600 cp.scan_window = cpu_to_le16(hdev->le_scan_window_connect); in hci_le_create_conn_sync()
6602 bacpy(&cp.peer_addr, &conn->dst); in hci_le_create_conn_sync()
6603 cp.peer_addr_type = conn->dst_type; in hci_le_create_conn_sync()
6604 cp.own_address_type = own_addr_type; in hci_le_create_conn_sync()
6605 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_le_create_conn_sync()
6606 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_le_create_conn_sync()
6607 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_le_create_conn_sync()
6608 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_le_create_conn_sync()
6609 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6610 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6619 sizeof(cp), &cp, in hci_le_create_conn_sync()
6733 struct hci_cp_le_remove_cig cp; in hci_le_remove_cig_sync() local
6735 memset(&cp, 0, sizeof(cp)); in hci_le_remove_cig_sync()
6736 cp.cig_id = handle; in hci_le_remove_cig_sync()
6738 return __hci_cmd_sync_status(hdev, HCI_OP_LE_REMOVE_CIG, sizeof(cp), in hci_le_remove_cig_sync()
6739 &cp, HCI_CMD_TIMEOUT); in hci_le_remove_cig_sync()
6744 struct hci_cp_le_big_term_sync cp; in hci_le_big_terminate_sync() local
6746 memset(&cp, 0, sizeof(cp)); in hci_le_big_terminate_sync()
6747 cp.handle = handle; in hci_le_big_terminate_sync()
6750 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_big_terminate_sync()
6755 struct hci_cp_le_pa_term_sync cp; in hci_le_pa_terminate_sync() local
6757 memset(&cp, 0, sizeof(cp)); in hci_le_pa_terminate_sync()
6758 cp.handle = cpu_to_le16(handle); in hci_le_pa_terminate_sync()
6761 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_pa_terminate_sync()
6854 struct hci_cp_create_conn cp; in hci_acl_create_conn_sync() local
6883 memset(&cp, 0, sizeof(cp)); in hci_acl_create_conn_sync()
6884 bacpy(&cp.bdaddr, &conn->dst); in hci_acl_create_conn_sync()
6885 cp.pscan_rep_mode = 0x02; in hci_acl_create_conn_sync()
6890 cp.pscan_rep_mode = ie->data.pscan_rep_mode; in hci_acl_create_conn_sync()
6891 cp.pscan_mode = ie->data.pscan_mode; in hci_acl_create_conn_sync()
6892 cp.clock_offset = ie->data.clock_offset | in hci_acl_create_conn_sync()
6899 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_acl_create_conn_sync()
6901 cp.role_switch = 0x01; in hci_acl_create_conn_sync()
6903 cp.role_switch = 0x00; in hci_acl_create_conn_sync()
6906 sizeof(cp), &cp, in hci_acl_create_conn_sync()
6975 struct hci_cp_le_conn_update cp; in hci_le_conn_update_sync() local
6977 memset(&cp, 0, sizeof(cp)); in hci_le_conn_update_sync()
6978 cp.handle = cpu_to_le16(conn->handle); in hci_le_conn_update_sync()
6979 cp.conn_interval_min = cpu_to_le16(params->conn_min_interval); in hci_le_conn_update_sync()
6980 cp.conn_interval_max = cpu_to_le16(params->conn_max_interval); in hci_le_conn_update_sync()
6981 cp.conn_latency = cpu_to_le16(params->conn_latency); in hci_le_conn_update_sync()
6982 cp.supervision_timeout = cpu_to_le16(params->supervision_timeout); in hci_le_conn_update_sync()
6983 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update_sync()
6984 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update_sync()
6987 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_conn_update_sync()
7026 struct hci_cp_le_pa_create_sync cp; in hci_le_pa_create_sync() local
7070 memset(&cp, 0, sizeof(cp)); in hci_le_pa_create_sync()
7071 cp.options = qos->bcast.options; in hci_le_pa_create_sync()
7072 cp.sid = conn->sid; in hci_le_pa_create_sync()
7073 cp.addr_type = conn->dst_type; in hci_le_pa_create_sync()
7074 bacpy(&cp.addr, &conn->dst); in hci_le_pa_create_sync()
7075 cp.skip = cpu_to_le16(qos->bcast.skip); in hci_le_pa_create_sync()
7076 cp.sync_timeout = cpu_to_le16(qos->bcast.sync_timeout); in hci_le_pa_create_sync()
7077 cp.sync_cte_type = qos->bcast.sync_cte_type; in hci_le_pa_create_sync()
7091 sizeof(cp), &cp, in hci_le_pa_create_sync()
7128 DEFINE_FLEX(struct hci_cp_le_big_create_sync, cp, bis, num_bis, 0x11); in hci_le_big_create_sync()
7138 memset(cp, 0, sizeof(*cp)); in hci_le_big_create_sync()
7139 cp->handle = qos->bcast.big; in hci_le_big_create_sync()
7140 cp->sync_handle = cpu_to_le16(conn->sync_handle); in hci_le_big_create_sync()
7141 cp->encryption = qos->bcast.encryption; in hci_le_big_create_sync()
7142 memcpy(cp->bcode, qos->bcast.bcode, sizeof(cp->bcode)); in hci_le_big_create_sync()
7143 cp->mse = qos->bcast.mse; in hci_le_big_create_sync()
7144 cp->timeout = cpu_to_le16(qos->bcast.timeout); in hci_le_big_create_sync()
7145 cp->num_bis = conn->num_bis; in hci_le_big_create_sync()
7146 memcpy(cp->bis, conn->bis, conn->num_bis); in hci_le_big_create_sync()
7161 struct_size(cp, bis, cp->num_bis), cp, in hci_le_big_create_sync()
7165 hci_le_big_terminate_sync(hdev, cp->handle); in hci_le_big_create_sync()