Lines Matching refs:cp

749 	struct hci_cp_write_eir cp;  in hci_update_eir_sync()  local
765 memset(&cp, 0, sizeof(cp)); in hci_update_eir_sync()
767 eir_create(hdev, cp.data); in hci_update_eir_sync()
769 if (memcmp(cp.data, hdev->eir, sizeof(cp.data)) == 0) in hci_update_eir_sync()
772 memcpy(hdev->eir, cp.data, sizeof(cp.data)); in hci_update_eir_sync()
774 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_update_eir_sync()
995 struct hci_cp_le_set_ext_adv_enable *cp; in hci_disable_ext_adv_instance_sync() local
997 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_disable_ext_adv_instance_sync()
1015 cp = (void *)data; in hci_disable_ext_adv_instance_sync()
1016 set = (void *)cp->data; in hci_disable_ext_adv_instance_sync()
1019 cp->num_of_sets = !!instance; in hci_disable_ext_adv_instance_sync()
1020 cp->enable = 0x00; in hci_disable_ext_adv_instance_sync()
1024 size = sizeof(*cp) + sizeof(*set) * cp->num_of_sets; in hci_disable_ext_adv_instance_sync()
1033 struct hci_cp_le_set_adv_set_rand_addr cp; in hci_set_adv_set_random_addr_sync() local
1047 memset(&cp, 0, sizeof(cp)); in hci_set_adv_set_random_addr_sync()
1049 cp.handle = instance; in hci_set_adv_set_random_addr_sync()
1050 bacpy(&cp.bdaddr, random_addr); in hci_set_adv_set_random_addr_sync()
1053 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_set_random_addr_sync()
1058 struct hci_cp_le_set_ext_adv_params cp; in hci_setup_ext_adv_instance_sync() local
1106 memset(&cp, 0, sizeof(cp)); in hci_setup_ext_adv_instance_sync()
1109 hci_cpu_to_le24(adv->min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1110 hci_cpu_to_le24(adv->max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1111 cp.tx_power = adv->tx_power; in hci_setup_ext_adv_instance_sync()
1113 hci_cpu_to_le24(hdev->le_adv_min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1114 hci_cpu_to_le24(hdev->le_adv_max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1115 cp.tx_power = HCI_ADV_TX_POWER_NO_PREFERENCE; in hci_setup_ext_adv_instance_sync()
1122 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_CONN_IND); in hci_setup_ext_adv_instance_sync()
1124 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_IND); in hci_setup_ext_adv_instance_sync()
1128 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1130 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1133 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_NON_CONN_IND); in hci_setup_ext_adv_instance_sync()
1135 cp.evt_properties = cpu_to_le16(LE_LEGACY_NONCONN_IND); in hci_setup_ext_adv_instance_sync()
1146 hci_copy_identity_address(hdev, &cp.peer_addr, in hci_setup_ext_adv_instance_sync()
1147 &cp.peer_addr_type); in hci_setup_ext_adv_instance_sync()
1149 cp.own_addr_type = own_addr_type; in hci_setup_ext_adv_instance_sync()
1150 cp.channel_map = hdev->le_adv_channel_map; in hci_setup_ext_adv_instance_sync()
1151 cp.handle = instance; in hci_setup_ext_adv_instance_sync()
1154 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1155 cp.secondary_phy = HCI_ADV_PHY_2M; in hci_setup_ext_adv_instance_sync()
1157 cp.primary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1158 cp.secondary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1161 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1162 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1166 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_ext_adv_instance_sync()
1192 struct hci_cp_le_set_ext_scan_rsp_data cp; in hci_set_ext_scan_rsp_data_sync() member
1209 pdu.cp.handle = instance; in hci_set_ext_scan_rsp_data_sync()
1210 pdu.cp.length = len; in hci_set_ext_scan_rsp_data_sync()
1211 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_ext_scan_rsp_data_sync()
1212 pdu.cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; in hci_set_ext_scan_rsp_data_sync()
1215 sizeof(pdu.cp) + len, &pdu.cp, in hci_set_ext_scan_rsp_data_sync()
1232 struct hci_cp_le_set_scan_rsp_data cp; in __hci_set_scan_rsp_data_sync() local
1235 memset(&cp, 0, sizeof(cp)); in __hci_set_scan_rsp_data_sync()
1237 len = eir_create_scan_rsp(hdev, instance, cp.data); in __hci_set_scan_rsp_data_sync()
1240 !memcmp(cp.data, hdev->scan_rsp_data, len)) in __hci_set_scan_rsp_data_sync()
1243 memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data)); in __hci_set_scan_rsp_data_sync()
1246 cp.length = len; in __hci_set_scan_rsp_data_sync()
1249 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in __hci_set_scan_rsp_data_sync()
1265 struct hci_cp_le_set_ext_adv_enable *cp; in hci_enable_ext_advertising_sync() local
1267 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_enable_ext_advertising_sync()
1281 cp = (void *)data; in hci_enable_ext_advertising_sync()
1282 set = (void *)cp->data; in hci_enable_ext_advertising_sync()
1284 memset(cp, 0, sizeof(*cp)); in hci_enable_ext_advertising_sync()
1286 cp->enable = 0x01; in hci_enable_ext_advertising_sync()
1287 cp->num_of_sets = 0x01; in hci_enable_ext_advertising_sync()
1304 sizeof(*cp) + in hci_enable_ext_advertising_sync()
1305 sizeof(*set) * cp->num_of_sets, in hci_enable_ext_advertising_sync()
1326 struct hci_cp_le_set_per_adv_enable cp; in hci_disable_per_advertising_sync() local
1334 memset(&cp, 0, sizeof(cp)); in hci_disable_per_advertising_sync()
1336 cp.enable = 0x00; in hci_disable_per_advertising_sync()
1337 cp.handle = instance; in hci_disable_per_advertising_sync()
1340 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disable_per_advertising_sync()
1346 struct hci_cp_le_set_per_adv_params cp; in hci_set_per_adv_params_sync() local
1348 memset(&cp, 0, sizeof(cp)); in hci_set_per_adv_params_sync()
1356 cp.handle = instance; in hci_set_per_adv_params_sync()
1357 cp.min_interval = cpu_to_le16(min_interval); in hci_set_per_adv_params_sync()
1358 cp.max_interval = cpu_to_le16(max_interval); in hci_set_per_adv_params_sync()
1359 cp.periodic_properties = 0x0000; in hci_set_per_adv_params_sync()
1362 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_per_adv_params_sync()
1368 struct hci_cp_le_set_per_adv_data cp; in hci_set_per_adv_data_sync() member
1384 pdu.cp.length = len; in hci_set_per_adv_data_sync()
1385 pdu.cp.handle = instance; in hci_set_per_adv_data_sync()
1386 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_per_adv_data_sync()
1389 sizeof(pdu.cp) + len, &pdu, in hci_set_per_adv_data_sync()
1395 struct hci_cp_le_set_per_adv_enable cp; in hci_enable_per_advertising_sync() local
1403 memset(&cp, 0, sizeof(cp)); in hci_enable_per_advertising_sync()
1405 cp.enable = 0x01; in hci_enable_per_advertising_sync()
1406 cp.handle = instance; in hci_enable_per_advertising_sync()
1409 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_per_advertising_sync()
1527 struct hci_cp_le_set_adv_param cp; in hci_enable_advertising_sync() local
1571 memset(&cp, 0, sizeof(cp)); in hci_enable_advertising_sync()
1582 cp.type = LE_ADV_IND; in hci_enable_advertising_sync()
1585 cp.type = LE_ADV_SCAN_IND; in hci_enable_advertising_sync()
1587 cp.type = LE_ADV_NONCONN_IND; in hci_enable_advertising_sync()
1596 cp.min_interval = cpu_to_le16(adv_min_interval); in hci_enable_advertising_sync()
1597 cp.max_interval = cpu_to_le16(adv_max_interval); in hci_enable_advertising_sync()
1598 cp.own_address_type = own_addr_type; in hci_enable_advertising_sync()
1599 cp.channel_map = hdev->le_adv_channel_map; in hci_enable_advertising_sync()
1602 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_advertising_sync()
1671 struct hci_cp_le_term_big cp; in hci_le_terminate_big_sync() local
1673 memset(&cp, 0, sizeof(cp)); in hci_le_terminate_big_sync()
1674 cp.handle = handle; in hci_le_terminate_big_sync()
1675 cp.reason = reason; in hci_le_terminate_big_sync()
1678 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_terminate_big_sync()
1684 struct hci_cp_le_set_ext_adv_data cp; in hci_set_ext_adv_data_sync() member
1701 pdu.cp.length = len; in hci_set_ext_adv_data_sync()
1702 pdu.cp.handle = instance; in hci_set_ext_adv_data_sync()
1703 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_ext_adv_data_sync()
1704 pdu.cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; in hci_set_ext_adv_data_sync()
1707 sizeof(pdu.cp) + len, &pdu.cp, in hci_set_ext_adv_data_sync()
1725 struct hci_cp_le_set_adv_data cp; in hci_set_adv_data_sync() local
1728 memset(&cp, 0, sizeof(cp)); in hci_set_adv_data_sync()
1730 len = eir_create_adv_data(hdev, instance, cp.data); in hci_set_adv_data_sync()
1734 memcmp(cp.data, hdev->adv_data, len) == 0) in hci_set_adv_data_sync()
1737 memcpy(hdev->adv_data, cp.data, sizeof(cp.data)); in hci_set_adv_data_sync()
1740 cp.length = len; in hci_set_adv_data_sync()
1743 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_data_sync()
1945 struct hci_cp_read_rssi cp; in hci_read_rssi_sync() local
1947 cp.handle = handle; in hci_read_rssi_sync()
1949 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_rssi_sync()
1952 int hci_read_clock_sync(struct hci_dev *hdev, struct hci_cp_read_clock *cp) in hci_read_clock_sync() argument
1955 sizeof(*cp), cp, HCI_CMD_TIMEOUT); in hci_read_clock_sync()
1960 struct hci_cp_read_tx_power cp; in hci_read_tx_power_sync() local
1962 cp.handle = handle; in hci_read_tx_power_sync()
1963 cp.type = type; in hci_read_tx_power_sync()
1965 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_tx_power_sync()
1989 struct hci_cp_le_set_ext_scan_enable cp; in hci_le_set_ext_scan_enable_sync() local
1991 memset(&cp, 0, sizeof(cp)); in hci_le_set_ext_scan_enable_sync()
1992 cp.enable = val; in hci_le_set_ext_scan_enable_sync()
1995 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_ext_scan_enable_sync()
1997 cp.filter_dup = filter_dup; in hci_le_set_ext_scan_enable_sync()
2000 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_ext_scan_enable_sync()
2006 struct hci_cp_le_set_scan_enable cp; in hci_le_set_scan_enable_sync() local
2011 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_enable_sync()
2012 cp.enable = val; in hci_le_set_scan_enable_sync()
2015 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_scan_enable_sync()
2017 cp.filter_dup = filter_dup; in hci_le_set_scan_enable_sync()
2020 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_enable_sync()
2119 struct hci_cp_le_del_from_resolv_list cp; in hci_le_del_resolve_list_sync() local
2131 cp.bdaddr_type = bdaddr_type; in hci_le_del_resolve_list_sync()
2132 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_resolve_list_sync()
2135 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_resolve_list_sync()
2141 struct hci_cp_le_del_from_accept_list cp; in hci_le_del_accept_list_sync() local
2148 cp.bdaddr_type = bdaddr_type; in hci_le_del_accept_list_sync()
2149 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_accept_list_sync()
2154 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_del_accept_list_sync()
2157 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_accept_list_sync()
2163 bt_dev_dbg(hdev, "Remove %pMR (0x%x) from allow list", &cp.bdaddr, in hci_le_del_accept_list_sync()
2164 cp.bdaddr_type); in hci_le_del_accept_list_sync()
2182 struct hci_cp_le_add_to_resolv_list cp; in hci_le_add_resolve_list_sync() local
2197 hci_copy_identity_address(hdev, &cp.bdaddr, &cp.bdaddr_type); in hci_le_add_resolve_list_sync()
2198 memcpy(cp.peer_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2213 cp.bdaddr_type = params->addr_type; in hci_le_add_resolve_list_sync()
2214 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_resolve_list_sync()
2215 memcpy(cp.peer_irk, irk->val, 16); in hci_le_add_resolve_list_sync()
2232 memcpy(cp.local_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2234 memset(cp.local_irk, 0, 16); in hci_le_add_resolve_list_sync()
2237 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_resolve_list_sync()
2244 struct hci_cp_le_set_privacy_mode cp; in hci_le_set_privacy_mode_sync() local
2262 memset(&cp, 0, sizeof(cp)); in hci_le_set_privacy_mode_sync()
2263 cp.bdaddr_type = irk->addr_type; in hci_le_set_privacy_mode_sync()
2264 bacpy(&cp.bdaddr, &irk->bdaddr); in hci_le_set_privacy_mode_sync()
2265 cp.mode = HCI_DEVICE_PRIVACY; in hci_le_set_privacy_mode_sync()
2270 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_privacy_mode_sync()
2281 struct hci_cp_le_add_to_accept_list cp; in hci_le_add_accept_list_sync() local
2324 cp.bdaddr_type = params->addr_type; in hci_le_add_accept_list_sync()
2325 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_accept_list_sync()
2328 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_accept_list_sync()
2332 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_add_accept_list_sync()
2336 bt_dev_dbg(hdev, "Add %pMR (0x%x) to allow list", &cp.bdaddr, in hci_le_add_accept_list_sync()
2337 cp.bdaddr_type); in hci_le_add_accept_list_sync()
2682 static void hci_le_scan_phy_params(struct hci_cp_le_scan_phy_params *cp, in hci_le_scan_phy_params() argument
2685 cp->type = type; in hci_le_scan_phy_params()
2686 cp->interval = cpu_to_le16(interval); in hci_le_scan_phy_params()
2687 cp->window = cpu_to_le16(window); in hci_le_scan_phy_params()
2694 struct hci_cp_le_set_ext_scan_params *cp; in hci_le_set_ext_scan_param_sync() local
2696 u8 data[sizeof(*cp) + sizeof(*phy) * 2]; in hci_le_set_ext_scan_param_sync()
2699 cp = (void *)data; in hci_le_set_ext_scan_param_sync()
2700 phy = (void *)cp->data; in hci_le_set_ext_scan_param_sync()
2704 cp->own_addr_type = own_addr_type; in hci_le_set_ext_scan_param_sync()
2705 cp->filter_policy = filter_policy; in hci_le_set_ext_scan_param_sync()
2724 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2733 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2748 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2755 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2766 sizeof(*cp) + sizeof(*phy) * num_phy, in hci_le_set_ext_scan_param_sync()
2774 struct hci_cp_le_set_scan_param cp; in hci_le_set_scan_param_sync() local
2781 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_param_sync()
2782 cp.type = type; in hci_le_set_scan_param_sync()
2783 cp.interval = cpu_to_le16(interval); in hci_le_set_scan_param_sync()
2784 cp.window = cpu_to_le16(window); in hci_le_set_scan_param_sync()
2785 cp.own_address_type = own_addr_type; in hci_le_set_scan_param_sync()
2786 cp.filter_policy = filter_policy; in hci_le_set_scan_param_sync()
2789 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_param_sync()
3052 struct hci_cp_write_le_host_supported cp; in hci_write_le_host_supported_sync() local
3065 memset(&cp, 0, sizeof(cp)); in hci_write_le_host_supported_sync()
3067 cp.le = le; in hci_write_le_host_supported_sync()
3068 cp.simul = simul; in hci_write_le_host_supported_sync()
3071 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_le_host_supported_sync()
3134 struct hci_cp_write_page_scan_activity cp; in hci_write_fast_connectable_sync() local
3144 memset(&cp, 0, sizeof(cp)); in hci_write_fast_connectable_sync()
3150 cp.interval = cpu_to_le16(0x0100); in hci_write_fast_connectable_sync()
3153 cp.interval = cpu_to_le16(hdev->def_page_scan_int); in hci_write_fast_connectable_sync()
3156 cp.window = cpu_to_le16(hdev->def_page_scan_window); in hci_write_fast_connectable_sync()
3158 if (__cpu_to_le16(hdev->page_scan_interval) != cp.interval || in hci_write_fast_connectable_sync()
3159 __cpu_to_le16(hdev->page_scan_window) != cp.window) { in hci_write_fast_connectable_sync()
3162 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_fast_connectable_sync()
3235 struct hci_cp_write_local_name cp; in hci_update_name_sync() local
3237 memset(&cp, 0, sizeof(cp)); in hci_update_name_sync()
3239 memcpy(cp.name, hdev->dev_name, sizeof(cp.name)); in hci_update_name_sync()
3242 sizeof(cp), &cp, in hci_update_name_sync()
3539 struct hci_cp_set_event_filter cp; in hci_set_event_filter_sync() local
3547 memset(&cp, 0, sizeof(cp)); in hci_set_event_filter_sync()
3548 cp.flt_type = flt_type; in hci_set_event_filter_sync()
3551 cp.cond_type = cond_type; in hci_set_event_filter_sync()
3552 bacpy(&cp.addr_conn_flt.bdaddr, bdaddr); in hci_set_event_filter_sync()
3553 cp.addr_conn_flt.auto_accept = auto_accept; in hci_set_event_filter_sync()
3558 sizeof(cp.flt_type) : sizeof(cp), &cp, in hci_set_event_filter_sync()
3629 struct hci_cp_write_eir cp; in hci_write_eir_sync() local
3635 memset(&cp, 0, sizeof(cp)); in hci_write_eir_sync()
3637 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_write_eir_sync()
3670 struct hci_cp_read_local_ext_features cp; in hci_read_local_ext_features_sync() local
3675 memset(&cp, 0, sizeof(cp)); in hci_read_local_ext_features_sync()
3676 cp.page = page; in hci_read_local_ext_features_sync()
3679 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_local_ext_features_sync()
3885 struct hci_cp_read_stored_link_key cp; in hci_read_stored_link_key_sync() local
3891 memset(&cp, 0, sizeof(cp)); in hci_read_stored_link_key_sync()
3892 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_read_stored_link_key_sync()
3893 cp.read_all = 0x01; in hci_read_stored_link_key_sync()
3896 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_stored_link_key_sync()
3901 struct hci_cp_write_def_link_policy cp; in hci_setup_link_policy_sync() local
3907 memset(&cp, 0, sizeof(cp)); in hci_setup_link_policy_sync()
3918 cp.policy = cpu_to_le16(link_policy); in hci_setup_link_policy_sync()
3921 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_link_policy_sync()
4232 struct hci_cp_write_le_host_supported cp; in hci_set_le_support_sync() local
4238 memset(&cp, 0, sizeof(cp)); in hci_set_le_support_sync()
4241 cp.le = 0x01; in hci_set_le_support_sync()
4242 cp.simul = 0x00; in hci_set_le_support_sync()
4245 if (cp.le == lmp_host_le_capable(hdev)) in hci_set_le_support_sync()
4249 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_le_support_sync()
4255 struct hci_cp_le_set_host_feature cp; in hci_le_set_host_feature_sync() local
4260 memset(&cp, 0, sizeof(cp)); in hci_le_set_host_feature_sync()
4263 cp.bit_number = 32; in hci_le_set_host_feature_sync()
4264 cp.bit_value = 1; in hci_le_set_host_feature_sync()
4267 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_host_feature_sync()
4319 struct hci_cp_delete_stored_link_key cp; in hci_delete_stored_link_key_sync() local
4338 memset(&cp, 0, sizeof(cp)); in hci_delete_stored_link_key_sync()
4339 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_delete_stored_link_key_sync()
4340 cp.delete_all = 0x01; in hci_delete_stored_link_key_sync()
4343 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_delete_stored_link_key_sync()
4456 struct hci_cp_write_def_err_data_reporting cp; in hci_set_err_data_report_sync() local
4467 memset(&cp, 0, sizeof(cp)); in hci_set_err_data_report_sync()
4468 cp.err_data_reporting = enabled ? ERR_DATA_REPORTING_ENABLED : in hci_set_err_data_report_sync()
4472 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_err_data_report_sync()
4498 struct hci_cp_le_write_def_data_len cp; in hci_le_set_write_def_data_len_sync() local
4503 memset(&cp, 0, sizeof(cp)); in hci_le_set_write_def_data_len_sync()
4504 cp.tx_len = cpu_to_le16(hdev->le_max_tx_len); in hci_le_set_write_def_data_len_sync()
4505 cp.tx_time = cpu_to_le16(hdev->le_max_tx_time); in hci_le_set_write_def_data_len_sync()
4508 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_write_def_data_len_sync()
4516 struct hci_cp_le_set_default_phy cp; in hci_le_set_default_phy_sync() local
4527 memset(&cp, 0, sizeof(cp)); in hci_le_set_default_phy_sync()
4528 cp.all_phys = 0x00; in hci_le_set_default_phy_sync()
4529 cp.tx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4530 cp.rx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4534 cp.tx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4535 cp.rx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4540 cp.tx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4541 cp.rx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4545 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_default_phy_sync()
5138 struct hci_cp_remote_name_req_cancel cp; in hci_remote_name_cancel_sync() local
5140 memset(&cp, 0, sizeof(cp)); in hci_remote_name_cancel_sync()
5141 bacpy(&cp.bdaddr, addr); in hci_remote_name_cancel_sync()
5144 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_remote_name_cancel_sync()
5201 struct hci_cp_disconnect cp; in hci_disconnect_sync() local
5214 memset(&cp, 0, sizeof(cp)); in hci_disconnect_sync()
5215 cp.handle = cpu_to_le16(conn->handle); in hci_disconnect_sync()
5216 cp.reason = reason; in hci_disconnect_sync()
5225 sizeof(cp), &cp, in hci_disconnect_sync()
5229 return __hci_cmd_sync_status(hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp, in hci_disconnect_sync()
5299 struct hci_cp_reject_sync_conn_req cp; in hci_reject_sco_sync() local
5301 memset(&cp, 0, sizeof(cp)); in hci_reject_sco_sync()
5302 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_sco_sync()
5303 cp.reason = reason; in hci_reject_sco_sync()
5309 cp.reason = HCI_ERROR_REJ_LIMITED_RESOURCES; in hci_reject_sco_sync()
5312 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_sco_sync()
5318 struct hci_cp_le_reject_cis cp; in hci_le_reject_cis_sync() local
5320 memset(&cp, 0, sizeof(cp)); in hci_le_reject_cis_sync()
5321 cp.handle = cpu_to_le16(conn->handle); in hci_le_reject_cis_sync()
5322 cp.reason = reason; in hci_le_reject_cis_sync()
5325 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_reject_cis_sync()
5331 struct hci_cp_reject_conn_req cp; in hci_reject_conn_sync() local
5339 memset(&cp, 0, sizeof(cp)); in hci_reject_conn_sync()
5340 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_conn_sync()
5341 cp.reason = reason; in hci_reject_conn_sync()
5344 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_conn_sync()
5472 struct hci_cp_write_current_iac_lap cp; in hci_write_iac_sync() local
5477 memset(&cp, 0, sizeof(cp)); in hci_write_iac_sync()
5481 cp.num_iac = min_t(u8, hdev->num_iac, 2); in hci_write_iac_sync()
5482 cp.iac_lap[0] = 0x00; /* LIAC */ in hci_write_iac_sync()
5483 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5484 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5485 cp.iac_lap[3] = 0x33; /* GIAC */ in hci_write_iac_sync()
5486 cp.iac_lap[4] = 0x8b; in hci_write_iac_sync()
5487 cp.iac_lap[5] = 0x9e; in hci_write_iac_sync()
5490 cp.num_iac = 1; in hci_write_iac_sync()
5491 cp.iac_lap[0] = 0x33; /* GIAC */ in hci_write_iac_sync()
5492 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5493 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5497 (cp.num_iac * 3) + 1, &cp, in hci_write_iac_sync()
5594 struct hci_cp_inquiry cp; in hci_inquiry_sync() local
5605 memset(&cp, 0, sizeof(cp)); in hci_inquiry_sync()
5608 memcpy(&cp.lap, liac, sizeof(cp.lap)); in hci_inquiry_sync()
5610 memcpy(&cp.lap, giac, sizeof(cp.lap)); in hci_inquiry_sync()
5612 cp.length = length; in hci_inquiry_sync()
5615 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_inquiry_sync()
6032 struct hci_cp_le_set_ext_adv_params cp; in hci_le_ext_directed_advertising_sync() local
6050 memset(&cp, 0, sizeof(cp)); in hci_le_ext_directed_advertising_sync()
6052 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_le_ext_directed_advertising_sync()
6053 cp.channel_map = hdev->le_adv_channel_map; in hci_le_ext_directed_advertising_sync()
6054 cp.tx_power = HCI_TX_POWER_INVALID; in hci_le_ext_directed_advertising_sync()
6055 cp.primary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6056 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6057 cp.handle = 0x00; /* Use instance 0 for directed adv */ in hci_le_ext_directed_advertising_sync()
6058 cp.own_addr_type = own_addr_type; in hci_le_ext_directed_advertising_sync()
6059 cp.peer_addr_type = conn->dst_type; in hci_le_ext_directed_advertising_sync()
6060 bacpy(&cp.peer_addr, &conn->dst); in hci_le_ext_directed_advertising_sync()
6070 err = hci_remove_ext_adv_instance_sync(hdev, cp.handle, NULL); in hci_le_ext_directed_advertising_sync()
6075 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_ext_directed_advertising_sync()
6095 struct hci_cp_le_set_adv_param cp; in hci_le_directed_advertising_sync() local
6118 memset(&cp, 0, sizeof(cp)); in hci_le_directed_advertising_sync()
6124 cp.min_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6125 cp.max_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6127 cp.type = LE_ADV_DIRECT_IND; in hci_le_directed_advertising_sync()
6128 cp.own_address_type = own_addr_type; in hci_le_directed_advertising_sync()
6129 cp.direct_addr_type = conn->dst_type; in hci_le_directed_advertising_sync()
6130 bacpy(&cp.direct_addr, &conn->dst); in hci_le_directed_advertising_sync()
6131 cp.channel_map = hdev->le_adv_channel_map; in hci_le_directed_advertising_sync()
6134 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_directed_advertising_sync()
6164 struct hci_cp_le_ext_create_conn *cp; in hci_le_ext_create_conn_sync() local
6166 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_le_ext_create_conn_sync()
6169 cp = (void *)data; in hci_le_ext_create_conn_sync()
6170 p = (void *)cp->data; in hci_le_ext_create_conn_sync()
6172 memset(cp, 0, sizeof(*cp)); in hci_le_ext_create_conn_sync()
6174 bacpy(&cp->peer_addr, &conn->dst); in hci_le_ext_create_conn_sync()
6175 cp->peer_addr_type = conn->dst_type; in hci_le_ext_create_conn_sync()
6176 cp->own_addr_type = own_addr_type; in hci_le_ext_create_conn_sync()
6178 plen = sizeof(*cp); in hci_le_ext_create_conn_sync()
6181 cp->phys |= LE_SCAN_PHY_1M; in hci_le_ext_create_conn_sync()
6189 cp->phys |= LE_SCAN_PHY_2M; in hci_le_ext_create_conn_sync()
6197 cp->phys |= LE_SCAN_PHY_CODED; in hci_le_ext_create_conn_sync()
6211 struct hci_cp_le_create_conn cp; in hci_le_create_conn_sync() local
6276 memset(&cp, 0, sizeof(cp)); in hci_le_create_conn_sync()
6278 cp.scan_interval = cpu_to_le16(hdev->le_scan_int_connect); in hci_le_create_conn_sync()
6279 cp.scan_window = cpu_to_le16(hdev->le_scan_window_connect); in hci_le_create_conn_sync()
6281 bacpy(&cp.peer_addr, &conn->dst); in hci_le_create_conn_sync()
6282 cp.peer_addr_type = conn->dst_type; in hci_le_create_conn_sync()
6283 cp.own_address_type = own_addr_type; in hci_le_create_conn_sync()
6284 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_le_create_conn_sync()
6285 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_le_create_conn_sync()
6286 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_le_create_conn_sync()
6287 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_le_create_conn_sync()
6288 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6289 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6298 sizeof(cp), &cp, in hci_le_create_conn_sync()
6316 struct hci_cp_le_create_cis cp; in hci_le_create_cis_sync() member
6383 struct hci_cis *cis = &cmd.cis[cmd.cp.num_cis]; in hci_le_create_cis_sync()
6392 cmd.cp.num_cis++; in hci_le_create_cis_sync()
6394 if (cmd.cp.num_cis >= ARRAY_SIZE(cmd.cis)) in hci_le_create_cis_sync()
6403 if (!cmd.cp.num_cis) in hci_le_create_cis_sync()
6408 sizeof(cmd.cp) + sizeof(cmd.cis[0]) * in hci_le_create_cis_sync()
6409 cmd.cp.num_cis, &cmd, in hci_le_create_cis_sync()
6416 struct hci_cp_le_remove_cig cp; in hci_le_remove_cig_sync() local
6418 memset(&cp, 0, sizeof(cp)); in hci_le_remove_cig_sync()
6419 cp.cig_id = handle; in hci_le_remove_cig_sync()
6421 return __hci_cmd_sync_status(hdev, HCI_OP_LE_REMOVE_CIG, sizeof(cp), in hci_le_remove_cig_sync()
6422 &cp, HCI_CMD_TIMEOUT); in hci_le_remove_cig_sync()
6427 struct hci_cp_le_big_term_sync cp; in hci_le_big_terminate_sync() local
6429 memset(&cp, 0, sizeof(cp)); in hci_le_big_terminate_sync()
6430 cp.handle = handle; in hci_le_big_terminate_sync()
6433 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_big_terminate_sync()
6438 struct hci_cp_le_pa_term_sync cp; in hci_le_pa_terminate_sync() local
6440 memset(&cp, 0, sizeof(cp)); in hci_le_pa_terminate_sync()
6441 cp.handle = cpu_to_le16(handle); in hci_le_pa_terminate_sync()
6444 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_pa_terminate_sync()