Lines Matching refs: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 const struct hci_cp_le_set_ext_adv_params *cp, in hci_set_ext_adv_params_sync() argument
1215 skb = __hci_cmd_sync(hdev, HCI_OP_LE_SET_EXT_ADV_PARAMS, sizeof(*cp), in hci_set_ext_adv_params_sync()
1216 cp, HCI_CMD_TIMEOUT); in hci_set_ext_adv_params_sync()
1239 hdev->adv_addr_type = cp->own_addr_type; in hci_set_ext_adv_params_sync()
1240 if (!cp->handle) { in hci_set_ext_adv_params_sync()
1292 struct hci_cp_le_set_adv_data cp; in hci_set_adv_data_sync() local
1295 memset(&cp, 0, sizeof(cp)); in hci_set_adv_data_sync()
1297 len = eir_create_adv_data(hdev, instance, cp.data, sizeof(cp.data)); in hci_set_adv_data_sync()
1301 memcmp(cp.data, hdev->adv_data, len) == 0) in hci_set_adv_data_sync()
1304 memcpy(hdev->adv_data, cp.data, sizeof(cp.data)); in hci_set_adv_data_sync()
1307 cp.length = len; in hci_set_adv_data_sync()
1310 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_data_sync()
1326 struct hci_cp_le_set_ext_adv_params cp; in hci_setup_ext_adv_instance_sync() local
1375 memset(&cp, 0, sizeof(cp)); in hci_setup_ext_adv_instance_sync()
1378 hci_cpu_to_le24(adv->min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1379 hci_cpu_to_le24(adv->max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1380 cp.tx_power = adv->tx_power; in hci_setup_ext_adv_instance_sync()
1381 cp.sid = adv->sid; in hci_setup_ext_adv_instance_sync()
1383 hci_cpu_to_le24(hdev->le_adv_min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1384 hci_cpu_to_le24(hdev->le_adv_max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1385 cp.tx_power = HCI_ADV_TX_POWER_NO_PREFERENCE; in hci_setup_ext_adv_instance_sync()
1386 cp.sid = 0x00; in hci_setup_ext_adv_instance_sync()
1393 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_CONN_IND); in hci_setup_ext_adv_instance_sync()
1395 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_IND); in hci_setup_ext_adv_instance_sync()
1399 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1401 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1404 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_NON_CONN_IND); in hci_setup_ext_adv_instance_sync()
1406 cp.evt_properties = cpu_to_le16(LE_LEGACY_NONCONN_IND); in hci_setup_ext_adv_instance_sync()
1417 hci_copy_identity_address(hdev, &cp.peer_addr, in hci_setup_ext_adv_instance_sync()
1418 &cp.peer_addr_type); in hci_setup_ext_adv_instance_sync()
1420 cp.own_addr_type = own_addr_type; in hci_setup_ext_adv_instance_sync()
1421 cp.channel_map = hdev->le_adv_channel_map; in hci_setup_ext_adv_instance_sync()
1422 cp.handle = adv ? adv->handle : instance; in hci_setup_ext_adv_instance_sync()
1425 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1426 cp.secondary_phy = HCI_ADV_PHY_2M; in hci_setup_ext_adv_instance_sync()
1428 cp.primary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1429 cp.secondary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1432 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1433 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1436 err = hci_set_ext_adv_params_sync(hdev, adv, &cp, &rp); in hci_setup_ext_adv_instance_sync()
1441 err = hci_set_ext_adv_data_sync(hdev, cp.handle); in hci_setup_ext_adv_instance_sync()
1503 struct hci_cp_le_set_scan_rsp_data cp; in __hci_set_scan_rsp_data_sync() local
1506 memset(&cp, 0, sizeof(cp)); in __hci_set_scan_rsp_data_sync()
1508 len = eir_create_scan_rsp(hdev, instance, cp.data); in __hci_set_scan_rsp_data_sync()
1511 !memcmp(cp.data, hdev->scan_rsp_data, len)) in __hci_set_scan_rsp_data_sync()
1514 memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data)); in __hci_set_scan_rsp_data_sync()
1517 cp.length = len; in __hci_set_scan_rsp_data_sync()
1520 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in __hci_set_scan_rsp_data_sync()
1536 struct hci_cp_le_set_ext_adv_enable *cp; in hci_enable_ext_advertising_sync() local
1538 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_enable_ext_advertising_sync()
1552 cp = (void *)data; in hci_enable_ext_advertising_sync()
1553 set = (void *)cp->data; in hci_enable_ext_advertising_sync()
1555 memset(cp, 0, sizeof(*cp)); in hci_enable_ext_advertising_sync()
1557 cp->enable = 0x01; in hci_enable_ext_advertising_sync()
1558 cp->num_of_sets = 0x01; in hci_enable_ext_advertising_sync()
1575 sizeof(*cp) + in hci_enable_ext_advertising_sync()
1576 sizeof(*set) * cp->num_of_sets, in hci_enable_ext_advertising_sync()
1597 struct hci_cp_le_set_per_adv_enable cp; in hci_disable_per_advertising_sync() local
1605 memset(&cp, 0, sizeof(cp)); in hci_disable_per_advertising_sync()
1607 cp.enable = 0x00; in hci_disable_per_advertising_sync()
1608 cp.handle = instance; in hci_disable_per_advertising_sync()
1611 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disable_per_advertising_sync()
1617 struct hci_cp_le_set_per_adv_params cp; in hci_set_per_adv_params_sync() local
1619 memset(&cp, 0, sizeof(cp)); in hci_set_per_adv_params_sync()
1627 cp.handle = instance; in hci_set_per_adv_params_sync()
1628 cp.min_interval = cpu_to_le16(min_interval); in hci_set_per_adv_params_sync()
1629 cp.max_interval = cpu_to_le16(max_interval); in hci_set_per_adv_params_sync()
1630 cp.periodic_properties = 0x0000; in hci_set_per_adv_params_sync()
1633 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_per_adv_params_sync()
1662 struct hci_cp_le_set_per_adv_enable cp; in hci_enable_per_advertising_sync() local
1670 memset(&cp, 0, sizeof(cp)); in hci_enable_per_advertising_sync()
1672 cp.enable = 0x01; in hci_enable_per_advertising_sync()
1673 cp.handle = instance; in hci_enable_per_advertising_sync()
1676 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_per_advertising_sync()
1816 struct hci_cp_le_set_adv_param cp; in hci_enable_advertising_sync() local
1860 memset(&cp, 0, sizeof(cp)); in hci_enable_advertising_sync()
1871 cp.type = LE_ADV_IND; in hci_enable_advertising_sync()
1874 cp.type = LE_ADV_SCAN_IND; in hci_enable_advertising_sync()
1876 cp.type = LE_ADV_NONCONN_IND; in hci_enable_advertising_sync()
1885 cp.min_interval = cpu_to_le16(adv_min_interval); in hci_enable_advertising_sync()
1886 cp.max_interval = cpu_to_le16(adv_max_interval); in hci_enable_advertising_sync()
1887 cp.own_address_type = own_addr_type; in hci_enable_advertising_sync()
1888 cp.channel_map = hdev->le_adv_channel_map; in hci_enable_advertising_sync()
1891 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_advertising_sync()
1936 struct hci_cp_le_term_big cp; in hci_le_terminate_big_sync() local
1938 memset(&cp, 0, sizeof(cp)); in hci_le_terminate_big_sync()
1939 cp.handle = handle; in hci_le_terminate_big_sync()
1940 cp.reason = reason; in hci_le_terminate_big_sync()
1943 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_terminate_big_sync()
2129 struct hci_cp_read_rssi cp; in hci_read_rssi_sync() local
2131 cp.handle = handle; in hci_read_rssi_sync()
2133 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_rssi_sync()
2136 int hci_read_clock_sync(struct hci_dev *hdev, struct hci_cp_read_clock *cp) in hci_read_clock_sync() argument
2139 sizeof(*cp), cp, HCI_CMD_TIMEOUT); in hci_read_clock_sync()
2144 struct hci_cp_read_tx_power cp; in hci_read_tx_power_sync() local
2146 cp.handle = handle; in hci_read_tx_power_sync()
2147 cp.type = type; in hci_read_tx_power_sync()
2149 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_tx_power_sync()
2170 struct hci_cp_le_set_ext_scan_enable cp; in hci_le_set_ext_scan_enable_sync() local
2172 memset(&cp, 0, sizeof(cp)); in hci_le_set_ext_scan_enable_sync()
2173 cp.enable = val; in hci_le_set_ext_scan_enable_sync()
2176 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_ext_scan_enable_sync()
2178 cp.filter_dup = filter_dup; in hci_le_set_ext_scan_enable_sync()
2181 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_ext_scan_enable_sync()
2187 struct hci_cp_le_set_scan_enable cp; in hci_le_set_scan_enable_sync() local
2192 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_enable_sync()
2193 cp.enable = val; in hci_le_set_scan_enable_sync()
2196 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_scan_enable_sync()
2198 cp.filter_dup = filter_dup; in hci_le_set_scan_enable_sync()
2201 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_enable_sync()
2295 struct hci_cp_le_del_from_resolv_list cp; in hci_le_del_resolve_list_sync() local
2307 cp.bdaddr_type = bdaddr_type; in hci_le_del_resolve_list_sync()
2308 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_resolve_list_sync()
2311 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_resolve_list_sync()
2317 struct hci_cp_le_del_from_accept_list cp; in hci_le_del_accept_list_sync() local
2324 cp.bdaddr_type = bdaddr_type; in hci_le_del_accept_list_sync()
2325 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_accept_list_sync()
2330 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_del_accept_list_sync()
2333 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_accept_list_sync()
2339 bt_dev_dbg(hdev, "Remove %pMR (0x%x) from allow list", &cp.bdaddr, in hci_le_del_accept_list_sync()
2340 cp.bdaddr_type); in hci_le_del_accept_list_sync()
2358 struct hci_cp_le_add_to_resolv_list cp; in hci_le_add_resolve_list_sync() local
2373 hci_copy_identity_address(hdev, &cp.bdaddr, &cp.bdaddr_type); in hci_le_add_resolve_list_sync()
2374 memcpy(cp.peer_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2390 cp.bdaddr_type = params->addr_type; in hci_le_add_resolve_list_sync()
2391 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_resolve_list_sync()
2392 memcpy(cp.peer_irk, irk->val, 16); in hci_le_add_resolve_list_sync()
2409 memcpy(cp.local_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2411 memset(cp.local_irk, 0, 16); in hci_le_add_resolve_list_sync()
2414 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_resolve_list_sync()
2421 struct hci_cp_le_set_privacy_mode cp; in hci_le_set_privacy_mode_sync() local
2443 memset(&cp, 0, sizeof(cp)); in hci_le_set_privacy_mode_sync()
2444 cp.bdaddr_type = irk->addr_type; in hci_le_set_privacy_mode_sync()
2445 bacpy(&cp.bdaddr, &irk->bdaddr); in hci_le_set_privacy_mode_sync()
2446 cp.mode = HCI_DEVICE_PRIVACY; in hci_le_set_privacy_mode_sync()
2451 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_privacy_mode_sync()
2462 struct hci_cp_le_add_to_accept_list cp; in hci_le_add_accept_list_sync() local
2500 cp.bdaddr_type = params->addr_type; in hci_le_add_accept_list_sync()
2501 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_accept_list_sync()
2504 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_accept_list_sync()
2508 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_add_accept_list_sync()
2512 bt_dev_dbg(hdev, "Add %pMR (0x%x) to allow list", &cp.bdaddr, in hci_le_add_accept_list_sync()
2513 cp.bdaddr_type); in hci_le_add_accept_list_sync()
2897 static void hci_le_scan_phy_params(struct hci_cp_le_scan_phy_params *cp, in hci_le_scan_phy_params() argument
2900 cp->type = type; in hci_le_scan_phy_params()
2901 cp->interval = cpu_to_le16(interval); in hci_le_scan_phy_params()
2902 cp->window = cpu_to_le16(window); in hci_le_scan_phy_params()
2909 struct hci_cp_le_set_ext_scan_params *cp; in hci_le_set_ext_scan_param_sync() local
2911 u8 data[sizeof(*cp) + sizeof(*phy) * 2]; in hci_le_set_ext_scan_param_sync()
2914 cp = (void *)data; in hci_le_set_ext_scan_param_sync()
2915 phy = (void *)cp->data; in hci_le_set_ext_scan_param_sync()
2919 cp->own_addr_type = own_addr_type; in hci_le_set_ext_scan_param_sync()
2920 cp->filter_policy = filter_policy; in hci_le_set_ext_scan_param_sync()
2939 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2948 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2963 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2970 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2981 sizeof(*cp) + sizeof(*phy) * num_phy, in hci_le_set_ext_scan_param_sync()
2989 struct hci_cp_le_set_scan_param cp; in hci_le_set_scan_param_sync() local
2996 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_param_sync()
2997 cp.type = type; in hci_le_set_scan_param_sync()
2998 cp.interval = cpu_to_le16(interval); in hci_le_set_scan_param_sync()
2999 cp.window = cpu_to_le16(window); in hci_le_set_scan_param_sync()
3000 cp.own_address_type = own_addr_type; in hci_le_set_scan_param_sync()
3001 cp.filter_policy = filter_policy; in hci_le_set_scan_param_sync()
3004 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_param_sync()
3303 struct hci_cp_write_le_host_supported cp; in hci_write_le_host_supported_sync() local
3316 memset(&cp, 0, sizeof(cp)); in hci_write_le_host_supported_sync()
3318 cp.le = le; in hci_write_le_host_supported_sync()
3319 cp.simul = simul; in hci_write_le_host_supported_sync()
3322 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_le_host_supported_sync()
3385 struct hci_cp_write_page_scan_activity cp; in hci_write_fast_connectable_sync() local
3395 memset(&cp, 0, sizeof(cp)); in hci_write_fast_connectable_sync()
3401 cp.interval = cpu_to_le16(0x0100); in hci_write_fast_connectable_sync()
3404 cp.interval = cpu_to_le16(hdev->def_page_scan_int); in hci_write_fast_connectable_sync()
3407 cp.window = cpu_to_le16(hdev->def_page_scan_window); in hci_write_fast_connectable_sync()
3409 if (__cpu_to_le16(hdev->page_scan_interval) != cp.interval || in hci_write_fast_connectable_sync()
3410 __cpu_to_le16(hdev->page_scan_window) != cp.window) { in hci_write_fast_connectable_sync()
3413 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_fast_connectable_sync()
3486 struct hci_cp_write_local_name cp; in hci_update_name_sync() local
3488 memset(&cp, 0, sizeof(cp)); in hci_update_name_sync()
3490 memcpy(cp.name, hdev->dev_name, sizeof(cp.name)); in hci_update_name_sync()
3493 sizeof(cp), &cp, in hci_update_name_sync()
3793 struct hci_cp_set_event_filter cp; in hci_set_event_filter_sync() local
3801 memset(&cp, 0, sizeof(cp)); in hci_set_event_filter_sync()
3802 cp.flt_type = flt_type; in hci_set_event_filter_sync()
3805 cp.cond_type = cond_type; in hci_set_event_filter_sync()
3806 bacpy(&cp.addr_conn_flt.bdaddr, bdaddr); in hci_set_event_filter_sync()
3807 cp.addr_conn_flt.auto_accept = auto_accept; in hci_set_event_filter_sync()
3812 sizeof(cp.flt_type) : sizeof(cp), &cp, in hci_set_event_filter_sync()
3844 struct hci_cp_write_sync_flowctl cp; in hci_write_sync_flowctl_sync() local
3852 memset(&cp, 0, sizeof(cp)); in hci_write_sync_flowctl_sync()
3853 cp.enable = 0x01; in hci_write_sync_flowctl_sync()
3856 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_sync_flowctl_sync()
3907 struct hci_cp_write_eir cp; in hci_write_eir_sync() local
3913 memset(&cp, 0, sizeof(cp)); in hci_write_eir_sync()
3915 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_write_eir_sync()
3948 struct hci_cp_read_local_ext_features cp; in hci_read_local_ext_features_sync() local
3953 memset(&cp, 0, sizeof(cp)); in hci_read_local_ext_features_sync()
3954 cp.page = page; in hci_read_local_ext_features_sync()
3957 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_local_ext_features_sync()
4163 struct hci_cp_read_stored_link_key cp; in hci_read_stored_link_key_sync() local
4169 memset(&cp, 0, sizeof(cp)); in hci_read_stored_link_key_sync()
4170 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_read_stored_link_key_sync()
4171 cp.read_all = 0x01; in hci_read_stored_link_key_sync()
4174 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_stored_link_key_sync()
4179 struct hci_cp_write_def_link_policy cp; in hci_setup_link_policy_sync() local
4185 memset(&cp, 0, sizeof(cp)); in hci_setup_link_policy_sync()
4196 cp.policy = cpu_to_le16(link_policy); in hci_setup_link_policy_sync()
4199 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_link_policy_sync()
4509 struct hci_cp_write_le_host_supported cp; in hci_set_le_support_sync() local
4515 memset(&cp, 0, sizeof(cp)); in hci_set_le_support_sync()
4518 cp.le = 0x01; in hci_set_le_support_sync()
4519 cp.simul = 0x00; in hci_set_le_support_sync()
4522 if (cp.le == lmp_host_le_capable(hdev)) in hci_set_le_support_sync()
4526 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_le_support_sync()
4532 struct hci_cp_le_set_host_feature cp; in hci_le_set_host_feature_sync() local
4537 memset(&cp, 0, sizeof(cp)); in hci_le_set_host_feature_sync()
4540 cp.bit_number = 32; in hci_le_set_host_feature_sync()
4541 cp.bit_value = 1; in hci_le_set_host_feature_sync()
4544 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_host_feature_sync()
4596 struct hci_cp_delete_stored_link_key cp; in hci_delete_stored_link_key_sync() local
4615 memset(&cp, 0, sizeof(cp)); in hci_delete_stored_link_key_sync()
4616 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_delete_stored_link_key_sync()
4617 cp.delete_all = 0x01; in hci_delete_stored_link_key_sync()
4620 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_delete_stored_link_key_sync()
4733 struct hci_cp_write_def_err_data_reporting cp; in hci_set_err_data_report_sync() local
4744 memset(&cp, 0, sizeof(cp)); in hci_set_err_data_report_sync()
4745 cp.err_data_reporting = enabled ? ERR_DATA_REPORTING_ENABLED : in hci_set_err_data_report_sync()
4749 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_err_data_report_sync()
4775 struct hci_cp_le_write_def_data_len cp; in hci_le_set_write_def_data_len_sync() local
4780 memset(&cp, 0, sizeof(cp)); in hci_le_set_write_def_data_len_sync()
4781 cp.tx_len = cpu_to_le16(hdev->le_max_tx_len); in hci_le_set_write_def_data_len_sync()
4782 cp.tx_time = cpu_to_le16(hdev->le_max_tx_time); in hci_le_set_write_def_data_len_sync()
4785 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_write_def_data_len_sync()
4793 struct hci_cp_le_set_default_phy cp; in hci_le_set_default_phy_sync() local
4804 memset(&cp, 0, sizeof(cp)); in hci_le_set_default_phy_sync()
4805 cp.all_phys = 0x00; in hci_le_set_default_phy_sync()
4806 cp.tx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4807 cp.rx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4811 cp.tx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4812 cp.rx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4817 cp.tx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4818 cp.rx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4822 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_default_phy_sync()
5429 struct hci_cp_remote_name_req_cancel cp; in hci_remote_name_cancel_sync() local
5431 memset(&cp, 0, sizeof(cp)); in hci_remote_name_cancel_sync()
5432 bacpy(&cp.bdaddr, addr); in hci_remote_name_cancel_sync()
5435 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_remote_name_cancel_sync()
5494 struct hci_cp_disconnect cp; in hci_disconnect_sync() local
5507 memset(&cp, 0, sizeof(cp)); in hci_disconnect_sync()
5508 cp.handle = cpu_to_le16(conn->handle); in hci_disconnect_sync()
5509 cp.reason = reason; in hci_disconnect_sync()
5518 sizeof(cp), &cp, in hci_disconnect_sync()
5522 return __hci_cmd_sync_status(hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp, in hci_disconnect_sync()
5593 struct hci_cp_reject_sync_conn_req cp; in hci_reject_sco_sync() local
5595 memset(&cp, 0, sizeof(cp)); in hci_reject_sco_sync()
5596 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_sco_sync()
5597 cp.reason = reason; in hci_reject_sco_sync()
5603 cp.reason = HCI_ERROR_REJ_LIMITED_RESOURCES; in hci_reject_sco_sync()
5606 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_sco_sync()
5612 struct hci_cp_le_reject_cis cp; in hci_le_reject_cis_sync() local
5614 memset(&cp, 0, sizeof(cp)); in hci_le_reject_cis_sync()
5615 cp.handle = cpu_to_le16(conn->handle); in hci_le_reject_cis_sync()
5616 cp.reason = reason; in hci_le_reject_cis_sync()
5619 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_reject_cis_sync()
5625 struct hci_cp_reject_conn_req cp; in hci_reject_conn_sync() local
5636 memset(&cp, 0, sizeof(cp)); in hci_reject_conn_sync()
5637 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_conn_sync()
5638 cp.reason = reason; in hci_reject_conn_sync()
5641 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_conn_sync()
5775 struct hci_cp_write_current_iac_lap cp; in hci_write_iac_sync() local
5780 memset(&cp, 0, sizeof(cp)); in hci_write_iac_sync()
5784 cp.num_iac = min_t(u8, hdev->num_iac, 2); in hci_write_iac_sync()
5785 cp.iac_lap[0] = 0x00; /* LIAC */ in hci_write_iac_sync()
5786 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5787 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5788 cp.iac_lap[3] = 0x33; /* GIAC */ in hci_write_iac_sync()
5789 cp.iac_lap[4] = 0x8b; in hci_write_iac_sync()
5790 cp.iac_lap[5] = 0x9e; in hci_write_iac_sync()
5793 cp.num_iac = 1; in hci_write_iac_sync()
5794 cp.iac_lap[0] = 0x33; /* GIAC */ in hci_write_iac_sync()
5795 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5796 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5800 (cp.num_iac * 3) + 1, &cp, in hci_write_iac_sync()
5897 struct hci_cp_inquiry cp; in hci_inquiry_sync() local
5908 memset(&cp, 0, sizeof(cp)); in hci_inquiry_sync()
5911 memcpy(&cp.lap, liac, sizeof(cp.lap)); in hci_inquiry_sync()
5913 memcpy(&cp.lap, giac, sizeof(cp.lap)); in hci_inquiry_sync()
5915 cp.length = length; in hci_inquiry_sync()
5916 cp.num_rsp = num_rsp; in hci_inquiry_sync()
5919 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_inquiry_sync()
6322 struct hci_cp_le_set_ext_adv_params cp; in hci_le_ext_directed_advertising_sync() local
6341 memset(&cp, 0, sizeof(cp)); in hci_le_ext_directed_advertising_sync()
6343 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_le_ext_directed_advertising_sync()
6344 cp.channel_map = hdev->le_adv_channel_map; in hci_le_ext_directed_advertising_sync()
6345 cp.tx_power = HCI_TX_POWER_INVALID; in hci_le_ext_directed_advertising_sync()
6346 cp.primary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6347 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6348 cp.handle = 0x00; /* Use instance 0 for directed adv */ in hci_le_ext_directed_advertising_sync()
6349 cp.own_addr_type = own_addr_type; in hci_le_ext_directed_advertising_sync()
6350 cp.peer_addr_type = conn->dst_type; in hci_le_ext_directed_advertising_sync()
6351 bacpy(&cp.peer_addr, &conn->dst); in hci_le_ext_directed_advertising_sync()
6361 err = hci_remove_ext_adv_instance_sync(hdev, cp.handle, NULL); in hci_le_ext_directed_advertising_sync()
6365 err = hci_set_ext_adv_params_sync(hdev, NULL, &cp, &rp); in hci_le_ext_directed_advertising_sync()
6370 err = hci_set_ext_adv_data_sync(hdev, cp.handle); in hci_le_ext_directed_advertising_sync()
6390 struct hci_cp_le_set_adv_param cp; in hci_le_directed_advertising_sync() local
6413 memset(&cp, 0, sizeof(cp)); in hci_le_directed_advertising_sync()
6419 cp.min_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6420 cp.max_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6422 cp.type = LE_ADV_DIRECT_IND; in hci_le_directed_advertising_sync()
6423 cp.own_address_type = own_addr_type; in hci_le_directed_advertising_sync()
6424 cp.direct_addr_type = conn->dst_type; in hci_le_directed_advertising_sync()
6425 bacpy(&cp.direct_addr, &conn->dst); in hci_le_directed_advertising_sync()
6426 cp.channel_map = hdev->le_adv_channel_map; in hci_le_directed_advertising_sync()
6429 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_directed_advertising_sync()
6459 struct hci_cp_le_ext_create_conn *cp; in hci_le_ext_create_conn_sync() local
6461 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_le_ext_create_conn_sync()
6464 cp = (void *)data; in hci_le_ext_create_conn_sync()
6465 p = (void *)cp->data; in hci_le_ext_create_conn_sync()
6467 memset(cp, 0, sizeof(*cp)); in hci_le_ext_create_conn_sync()
6469 bacpy(&cp->peer_addr, &conn->dst); in hci_le_ext_create_conn_sync()
6470 cp->peer_addr_type = conn->dst_type; in hci_le_ext_create_conn_sync()
6471 cp->own_addr_type = own_addr_type; in hci_le_ext_create_conn_sync()
6473 plen = sizeof(*cp); in hci_le_ext_create_conn_sync()
6477 cp->phys |= LE_SCAN_PHY_1M; in hci_le_ext_create_conn_sync()
6486 cp->phys |= LE_SCAN_PHY_2M; in hci_le_ext_create_conn_sync()
6495 cp->phys |= LE_SCAN_PHY_CODED; in hci_le_ext_create_conn_sync()
6509 struct hci_cp_le_create_conn cp; in hci_le_create_conn_sync() local
6583 memset(&cp, 0, sizeof(cp)); in hci_le_create_conn_sync()
6585 cp.scan_interval = cpu_to_le16(hdev->le_scan_int_connect); in hci_le_create_conn_sync()
6586 cp.scan_window = cpu_to_le16(hdev->le_scan_window_connect); in hci_le_create_conn_sync()
6588 bacpy(&cp.peer_addr, &conn->dst); in hci_le_create_conn_sync()
6589 cp.peer_addr_type = conn->dst_type; in hci_le_create_conn_sync()
6590 cp.own_address_type = own_addr_type; in hci_le_create_conn_sync()
6591 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_le_create_conn_sync()
6592 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_le_create_conn_sync()
6593 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_le_create_conn_sync()
6594 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_le_create_conn_sync()
6595 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6596 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6605 sizeof(cp), &cp, in hci_le_create_conn_sync()
6719 struct hci_cp_le_remove_cig cp; in hci_le_remove_cig_sync() local
6721 memset(&cp, 0, sizeof(cp)); in hci_le_remove_cig_sync()
6722 cp.cig_id = handle; in hci_le_remove_cig_sync()
6724 return __hci_cmd_sync_status(hdev, HCI_OP_LE_REMOVE_CIG, sizeof(cp), in hci_le_remove_cig_sync()
6725 &cp, HCI_CMD_TIMEOUT); in hci_le_remove_cig_sync()
6730 struct hci_cp_le_big_term_sync cp; in hci_le_big_terminate_sync() local
6732 memset(&cp, 0, sizeof(cp)); in hci_le_big_terminate_sync()
6733 cp.handle = handle; in hci_le_big_terminate_sync()
6736 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_big_terminate_sync()
6741 struct hci_cp_le_pa_term_sync cp; in hci_le_pa_terminate_sync() local
6743 memset(&cp, 0, sizeof(cp)); in hci_le_pa_terminate_sync()
6744 cp.handle = cpu_to_le16(handle); in hci_le_pa_terminate_sync()
6747 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_pa_terminate_sync()
6840 struct hci_cp_create_conn cp; in hci_acl_create_conn_sync() local
6869 memset(&cp, 0, sizeof(cp)); in hci_acl_create_conn_sync()
6870 bacpy(&cp.bdaddr, &conn->dst); in hci_acl_create_conn_sync()
6871 cp.pscan_rep_mode = 0x02; in hci_acl_create_conn_sync()
6876 cp.pscan_rep_mode = ie->data.pscan_rep_mode; in hci_acl_create_conn_sync()
6877 cp.pscan_mode = ie->data.pscan_mode; in hci_acl_create_conn_sync()
6878 cp.clock_offset = ie->data.clock_offset | in hci_acl_create_conn_sync()
6885 cp.pkt_type = cpu_to_le16(conn->pkt_type); in hci_acl_create_conn_sync()
6887 cp.role_switch = 0x01; in hci_acl_create_conn_sync()
6889 cp.role_switch = 0x00; in hci_acl_create_conn_sync()
6892 sizeof(cp), &cp, in hci_acl_create_conn_sync()
6961 struct hci_cp_le_conn_update cp; in hci_le_conn_update_sync() local
6963 memset(&cp, 0, sizeof(cp)); in hci_le_conn_update_sync()
6964 cp.handle = cpu_to_le16(conn->handle); in hci_le_conn_update_sync()
6965 cp.conn_interval_min = cpu_to_le16(params->conn_min_interval); in hci_le_conn_update_sync()
6966 cp.conn_interval_max = cpu_to_le16(params->conn_max_interval); in hci_le_conn_update_sync()
6967 cp.conn_latency = cpu_to_le16(params->conn_latency); in hci_le_conn_update_sync()
6968 cp.supervision_timeout = cpu_to_le16(params->supervision_timeout); in hci_le_conn_update_sync()
6969 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update_sync()
6970 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_conn_update_sync()
6973 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_conn_update_sync()
7014 struct hci_cp_le_pa_create_sync cp; in hci_le_pa_create_sync() local
7055 memset(&cp, 0, sizeof(cp)); in hci_le_pa_create_sync()
7056 cp.options = qos->bcast.options; in hci_le_pa_create_sync()
7057 cp.sid = conn->sid; in hci_le_pa_create_sync()
7058 cp.addr_type = conn->dst_type; in hci_le_pa_create_sync()
7059 bacpy(&cp.addr, &conn->dst); in hci_le_pa_create_sync()
7060 cp.skip = cpu_to_le16(qos->bcast.skip); in hci_le_pa_create_sync()
7061 cp.sync_timeout = cpu_to_le16(qos->bcast.sync_timeout); in hci_le_pa_create_sync()
7062 cp.sync_cte_type = qos->bcast.sync_cte_type; in hci_le_pa_create_sync()
7076 sizeof(cp), &cp, in hci_le_pa_create_sync()
7107 DEFINE_FLEX(struct hci_cp_le_big_create_sync, cp, bis, num_bis, 0x11); in hci_le_big_create_sync()
7117 memset(cp, 0, sizeof(*cp)); in hci_le_big_create_sync()
7118 cp->handle = qos->bcast.big; in hci_le_big_create_sync()
7119 cp->sync_handle = cpu_to_le16(conn->sync_handle); in hci_le_big_create_sync()
7120 cp->encryption = qos->bcast.encryption; in hci_le_big_create_sync()
7121 memcpy(cp->bcode, qos->bcast.bcode, sizeof(cp->bcode)); in hci_le_big_create_sync()
7122 cp->mse = qos->bcast.mse; in hci_le_big_create_sync()
7123 cp->timeout = cpu_to_le16(qos->bcast.timeout); in hci_le_big_create_sync()
7124 cp->num_bis = conn->num_bis; in hci_le_big_create_sync()
7125 memcpy(cp->bis, conn->bis, conn->num_bis); in hci_le_big_create_sync()
7140 struct_size(cp, bis, cp->num_bis), cp, in hci_le_big_create_sync()
7144 hci_le_big_terminate_sync(hdev, cp->handle); in hci_le_big_create_sync()