Lines Matching full:cp

740 	struct hci_cp_write_eir cp;  in hci_update_eir_sync()  local
756 memset(&cp, 0, sizeof(cp)); in hci_update_eir_sync()
758 eir_create(hdev, cp.data); in hci_update_eir_sync()
760 if (memcmp(cp.data, hdev->eir, sizeof(cp.data)) == 0) in hci_update_eir_sync()
763 memcpy(hdev->eir, cp.data, sizeof(cp.data)); in hci_update_eir_sync()
765 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_update_eir_sync()
986 struct hci_cp_le_set_ext_adv_enable *cp; in hci_disable_ext_adv_instance_sync() local
988 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_disable_ext_adv_instance_sync()
1006 cp = (void *)data; in hci_disable_ext_adv_instance_sync()
1007 set = (void *)cp->data; in hci_disable_ext_adv_instance_sync()
1010 cp->num_of_sets = !!instance; in hci_disable_ext_adv_instance_sync()
1011 cp->enable = 0x00; in hci_disable_ext_adv_instance_sync()
1015 size = sizeof(*cp) + sizeof(*set) * cp->num_of_sets; in hci_disable_ext_adv_instance_sync()
1024 struct hci_cp_le_set_adv_set_rand_addr cp; in hci_set_adv_set_random_addr_sync() local
1038 memset(&cp, 0, sizeof(cp)); in hci_set_adv_set_random_addr_sync()
1040 cp.handle = instance; in hci_set_adv_set_random_addr_sync()
1041 bacpy(&cp.bdaddr, random_addr); in hci_set_adv_set_random_addr_sync()
1044 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_set_random_addr_sync()
1049 struct hci_cp_le_set_ext_adv_params cp; in hci_setup_ext_adv_instance_sync() local
1097 memset(&cp, 0, sizeof(cp)); in hci_setup_ext_adv_instance_sync()
1100 hci_cpu_to_le24(adv->min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1101 hci_cpu_to_le24(adv->max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1102 cp.tx_power = adv->tx_power; in hci_setup_ext_adv_instance_sync()
1104 hci_cpu_to_le24(hdev->le_adv_min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1105 hci_cpu_to_le24(hdev->le_adv_max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1106 cp.tx_power = HCI_ADV_TX_POWER_NO_PREFERENCE; in hci_setup_ext_adv_instance_sync()
1113 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_CONN_IND); in hci_setup_ext_adv_instance_sync()
1115 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_IND); in hci_setup_ext_adv_instance_sync()
1119 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1121 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1124 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_NON_CONN_IND); in hci_setup_ext_adv_instance_sync()
1126 cp.evt_properties = cpu_to_le16(LE_LEGACY_NONCONN_IND); in hci_setup_ext_adv_instance_sync()
1137 hci_copy_identity_address(hdev, &cp.peer_addr, in hci_setup_ext_adv_instance_sync()
1138 &cp.peer_addr_type); in hci_setup_ext_adv_instance_sync()
1140 cp.own_addr_type = own_addr_type; in hci_setup_ext_adv_instance_sync()
1141 cp.channel_map = hdev->le_adv_channel_map; in hci_setup_ext_adv_instance_sync()
1142 cp.handle = instance; in hci_setup_ext_adv_instance_sync()
1145 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1146 cp.secondary_phy = HCI_ADV_PHY_2M; in hci_setup_ext_adv_instance_sync()
1148 cp.primary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1149 cp.secondary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1152 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1153 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1157 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_ext_adv_instance_sync()
1183 struct hci_cp_le_set_ext_scan_rsp_data cp; in hci_set_ext_scan_rsp_data_sync() member
1200 pdu.cp.handle = instance; in hci_set_ext_scan_rsp_data_sync()
1201 pdu.cp.length = len; in hci_set_ext_scan_rsp_data_sync()
1202 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_ext_scan_rsp_data_sync()
1203 pdu.cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; in hci_set_ext_scan_rsp_data_sync()
1206 sizeof(pdu.cp) + len, &pdu.cp, in hci_set_ext_scan_rsp_data_sync()
1223 struct hci_cp_le_set_scan_rsp_data cp; in __hci_set_scan_rsp_data_sync() local
1226 memset(&cp, 0, sizeof(cp)); in __hci_set_scan_rsp_data_sync()
1228 len = eir_create_scan_rsp(hdev, instance, cp.data); in __hci_set_scan_rsp_data_sync()
1231 !memcmp(cp.data, hdev->scan_rsp_data, len)) in __hci_set_scan_rsp_data_sync()
1234 memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data)); in __hci_set_scan_rsp_data_sync()
1237 cp.length = len; in __hci_set_scan_rsp_data_sync()
1240 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in __hci_set_scan_rsp_data_sync()
1256 struct hci_cp_le_set_ext_adv_enable *cp; in hci_enable_ext_advertising_sync() local
1258 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_enable_ext_advertising_sync()
1272 cp = (void *)data; in hci_enable_ext_advertising_sync()
1273 set = (void *)cp->data; in hci_enable_ext_advertising_sync()
1275 memset(cp, 0, sizeof(*cp)); in hci_enable_ext_advertising_sync()
1277 cp->enable = 0x01; in hci_enable_ext_advertising_sync()
1278 cp->num_of_sets = 0x01; in hci_enable_ext_advertising_sync()
1295 sizeof(*cp) + in hci_enable_ext_advertising_sync()
1296 sizeof(*set) * cp->num_of_sets, in hci_enable_ext_advertising_sync()
1317 struct hci_cp_le_set_per_adv_enable cp; in hci_disable_per_advertising_sync() local
1325 memset(&cp, 0, sizeof(cp)); in hci_disable_per_advertising_sync()
1327 cp.enable = 0x00; in hci_disable_per_advertising_sync()
1328 cp.handle = instance; in hci_disable_per_advertising_sync()
1331 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disable_per_advertising_sync()
1337 struct hci_cp_le_set_per_adv_params cp; in hci_set_per_adv_params_sync() local
1339 memset(&cp, 0, sizeof(cp)); in hci_set_per_adv_params_sync()
1347 cp.handle = instance; in hci_set_per_adv_params_sync()
1348 cp.min_interval = cpu_to_le16(min_interval); in hci_set_per_adv_params_sync()
1349 cp.max_interval = cpu_to_le16(max_interval); in hci_set_per_adv_params_sync()
1350 cp.periodic_properties = 0x0000; in hci_set_per_adv_params_sync()
1353 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_per_adv_params_sync()
1359 struct hci_cp_le_set_per_adv_data cp; in hci_set_per_adv_data_sync() member
1375 pdu.cp.length = len; in hci_set_per_adv_data_sync()
1376 pdu.cp.handle = instance; in hci_set_per_adv_data_sync()
1377 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_per_adv_data_sync()
1380 sizeof(pdu.cp) + len, &pdu, in hci_set_per_adv_data_sync()
1386 struct hci_cp_le_set_per_adv_enable cp; in hci_enable_per_advertising_sync() local
1394 memset(&cp, 0, sizeof(cp)); in hci_enable_per_advertising_sync()
1396 cp.enable = 0x01; in hci_enable_per_advertising_sync()
1397 cp.handle = instance; in hci_enable_per_advertising_sync()
1400 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_per_advertising_sync()
1518 struct hci_cp_le_set_adv_param cp; in hci_enable_advertising_sync() local
1562 memset(&cp, 0, sizeof(cp)); in hci_enable_advertising_sync()
1573 cp.type = LE_ADV_IND; in hci_enable_advertising_sync()
1576 cp.type = LE_ADV_SCAN_IND; in hci_enable_advertising_sync()
1578 cp.type = LE_ADV_NONCONN_IND; in hci_enable_advertising_sync()
1587 cp.min_interval = cpu_to_le16(adv_min_interval); in hci_enable_advertising_sync()
1588 cp.max_interval = cpu_to_le16(adv_max_interval); in hci_enable_advertising_sync()
1589 cp.own_address_type = own_addr_type; in hci_enable_advertising_sync()
1590 cp.channel_map = hdev->le_adv_channel_map; in hci_enable_advertising_sync()
1593 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_advertising_sync()
1662 struct hci_cp_le_term_big cp; in hci_le_terminate_big_sync() local
1664 memset(&cp, 0, sizeof(cp)); in hci_le_terminate_big_sync()
1665 cp.handle = handle; in hci_le_terminate_big_sync()
1666 cp.reason = reason; in hci_le_terminate_big_sync()
1669 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_terminate_big_sync()
1675 struct hci_cp_le_set_ext_adv_data cp; in hci_set_ext_adv_data_sync() member
1692 pdu.cp.length = len; in hci_set_ext_adv_data_sync()
1693 pdu.cp.handle = instance; in hci_set_ext_adv_data_sync()
1694 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_ext_adv_data_sync()
1695 pdu.cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; in hci_set_ext_adv_data_sync()
1698 sizeof(pdu.cp) + len, &pdu.cp, in hci_set_ext_adv_data_sync()
1716 struct hci_cp_le_set_adv_data cp; in hci_set_adv_data_sync() local
1719 memset(&cp, 0, sizeof(cp)); in hci_set_adv_data_sync()
1721 len = eir_create_adv_data(hdev, instance, cp.data); in hci_set_adv_data_sync()
1725 memcmp(cp.data, hdev->adv_data, len) == 0) in hci_set_adv_data_sync()
1728 memcpy(hdev->adv_data, cp.data, sizeof(cp.data)); in hci_set_adv_data_sync()
1731 cp.length = len; in hci_set_adv_data_sync()
1734 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_data_sync()
1936 struct hci_cp_read_rssi cp; in hci_read_rssi_sync() local
1938 cp.handle = handle; in hci_read_rssi_sync()
1940 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_rssi_sync()
1943 int hci_read_clock_sync(struct hci_dev *hdev, struct hci_cp_read_clock *cp) in hci_read_clock_sync() argument
1946 sizeof(*cp), cp, HCI_CMD_TIMEOUT); in hci_read_clock_sync()
1951 struct hci_cp_read_tx_power cp; in hci_read_tx_power_sync() local
1953 cp.handle = handle; in hci_read_tx_power_sync()
1954 cp.type = type; in hci_read_tx_power_sync()
1956 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_tx_power_sync()
1980 struct hci_cp_le_set_ext_scan_enable cp; in hci_le_set_ext_scan_enable_sync() local
1982 memset(&cp, 0, sizeof(cp)); in hci_le_set_ext_scan_enable_sync()
1983 cp.enable = val; in hci_le_set_ext_scan_enable_sync()
1986 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_ext_scan_enable_sync()
1988 cp.filter_dup = filter_dup; in hci_le_set_ext_scan_enable_sync()
1991 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_ext_scan_enable_sync()
1997 struct hci_cp_le_set_scan_enable cp; in hci_le_set_scan_enable_sync() local
2002 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_enable_sync()
2003 cp.enable = val; in hci_le_set_scan_enable_sync()
2006 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_scan_enable_sync()
2008 cp.filter_dup = filter_dup; in hci_le_set_scan_enable_sync()
2011 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_enable_sync()
2110 struct hci_cp_le_del_from_resolv_list cp; in hci_le_del_resolve_list_sync() local
2122 cp.bdaddr_type = bdaddr_type; in hci_le_del_resolve_list_sync()
2123 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_resolve_list_sync()
2126 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_resolve_list_sync()
2132 struct hci_cp_le_del_from_accept_list cp; in hci_le_del_accept_list_sync() local
2139 cp.bdaddr_type = bdaddr_type; in hci_le_del_accept_list_sync()
2140 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_accept_list_sync()
2145 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_del_accept_list_sync()
2148 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_accept_list_sync()
2154 bt_dev_dbg(hdev, "Remove %pMR (0x%x) from allow list", &cp.bdaddr, in hci_le_del_accept_list_sync()
2155 cp.bdaddr_type); in hci_le_del_accept_list_sync()
2173 struct hci_cp_le_add_to_resolv_list cp; in hci_le_add_resolve_list_sync() local
2188 hci_copy_identity_address(hdev, &cp.bdaddr, &cp.bdaddr_type); in hci_le_add_resolve_list_sync()
2189 memcpy(cp.peer_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2204 cp.bdaddr_type = params->addr_type; in hci_le_add_resolve_list_sync()
2205 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_resolve_list_sync()
2206 memcpy(cp.peer_irk, irk->val, 16); in hci_le_add_resolve_list_sync()
2223 memcpy(cp.local_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2225 memset(cp.local_irk, 0, 16); in hci_le_add_resolve_list_sync()
2228 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_resolve_list_sync()
2235 struct hci_cp_le_set_privacy_mode cp; in hci_le_set_privacy_mode_sync() local
2253 memset(&cp, 0, sizeof(cp)); in hci_le_set_privacy_mode_sync()
2254 cp.bdaddr_type = irk->addr_type; in hci_le_set_privacy_mode_sync()
2255 bacpy(&cp.bdaddr, &irk->bdaddr); in hci_le_set_privacy_mode_sync()
2256 cp.mode = HCI_DEVICE_PRIVACY; in hci_le_set_privacy_mode_sync()
2261 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_privacy_mode_sync()
2272 struct hci_cp_le_add_to_accept_list cp; in hci_le_add_accept_list_sync() local
2312 cp.bdaddr_type = params->addr_type; in hci_le_add_accept_list_sync()
2313 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_accept_list_sync()
2316 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_accept_list_sync()
2320 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_add_accept_list_sync()
2324 bt_dev_dbg(hdev, "Add %pMR (0x%x) to allow list", &cp.bdaddr, in hci_le_add_accept_list_sync()
2325 cp.bdaddr_type); in hci_le_add_accept_list_sync()
2674 struct hci_cp_le_set_ext_scan_params *cp; in hci_le_set_ext_scan_param_sync() local
2676 u8 data[sizeof(*cp) + sizeof(*phy) * 2]; in hci_le_set_ext_scan_param_sync()
2679 cp = (void *)data; in hci_le_set_ext_scan_param_sync()
2680 phy = (void *)cp->data; in hci_le_set_ext_scan_param_sync()
2684 cp->own_addr_type = own_addr_type; in hci_le_set_ext_scan_param_sync()
2685 cp->filter_policy = filter_policy; in hci_le_set_ext_scan_param_sync()
2688 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2699 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2710 sizeof(*cp) + sizeof(*phy) * num_phy, in hci_le_set_ext_scan_param_sync()
2718 struct hci_cp_le_set_scan_param cp; in hci_le_set_scan_param_sync() local
2725 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_param_sync()
2726 cp.type = type; in hci_le_set_scan_param_sync()
2727 cp.interval = cpu_to_le16(interval); in hci_le_set_scan_param_sync()
2728 cp.window = cpu_to_le16(window); in hci_le_set_scan_param_sync()
2729 cp.own_address_type = own_addr_type; in hci_le_set_scan_param_sync()
2730 cp.filter_policy = filter_policy; in hci_le_set_scan_param_sync()
2733 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_param_sync()
2996 struct hci_cp_write_le_host_supported cp; in hci_write_le_host_supported_sync() local
3009 memset(&cp, 0, sizeof(cp)); in hci_write_le_host_supported_sync()
3011 cp.le = le; in hci_write_le_host_supported_sync()
3012 cp.simul = simul; in hci_write_le_host_supported_sync()
3015 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_le_host_supported_sync()
3078 struct hci_cp_write_page_scan_activity cp; in hci_write_fast_connectable_sync() local
3088 memset(&cp, 0, sizeof(cp)); in hci_write_fast_connectable_sync()
3094 cp.interval = cpu_to_le16(0x0100); in hci_write_fast_connectable_sync()
3097 cp.interval = cpu_to_le16(hdev->def_page_scan_int); in hci_write_fast_connectable_sync()
3100 cp.window = cpu_to_le16(hdev->def_page_scan_window); in hci_write_fast_connectable_sync()
3102 if (__cpu_to_le16(hdev->page_scan_interval) != cp.interval || in hci_write_fast_connectable_sync()
3103 __cpu_to_le16(hdev->page_scan_window) != cp.window) { in hci_write_fast_connectable_sync()
3106 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_fast_connectable_sync()
3179 struct hci_cp_write_local_name cp; in hci_update_name_sync() local
3181 memset(&cp, 0, sizeof(cp)); in hci_update_name_sync()
3183 memcpy(cp.name, hdev->dev_name, sizeof(cp.name)); in hci_update_name_sync()
3186 sizeof(cp), &cp, in hci_update_name_sync()
3548 struct hci_cp_set_event_filter cp; in hci_set_event_filter_sync() local
3556 memset(&cp, 0, sizeof(cp)); in hci_set_event_filter_sync()
3557 cp.flt_type = flt_type; in hci_set_event_filter_sync()
3560 cp.cond_type = cond_type; in hci_set_event_filter_sync()
3561 bacpy(&cp.addr_conn_flt.bdaddr, bdaddr); in hci_set_event_filter_sync()
3562 cp.addr_conn_flt.auto_accept = auto_accept; in hci_set_event_filter_sync()
3567 sizeof(cp.flt_type) : sizeof(cp), &cp, in hci_set_event_filter_sync()
3638 struct hci_cp_write_eir cp; in hci_write_eir_sync() local
3644 memset(&cp, 0, sizeof(cp)); in hci_write_eir_sync()
3646 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_write_eir_sync()
3679 struct hci_cp_read_local_ext_features cp; in hci_read_local_ext_features_sync() local
3684 memset(&cp, 0, sizeof(cp)); in hci_read_local_ext_features_sync()
3685 cp.page = page; in hci_read_local_ext_features_sync()
3688 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_local_ext_features_sync()
3895 struct hci_cp_read_stored_link_key cp; in hci_read_stored_link_key_sync() local
3901 memset(&cp, 0, sizeof(cp)); in hci_read_stored_link_key_sync()
3902 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_read_stored_link_key_sync()
3903 cp.read_all = 0x01; in hci_read_stored_link_key_sync()
3906 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_stored_link_key_sync()
3911 struct hci_cp_write_def_link_policy cp; in hci_setup_link_policy_sync() local
3917 memset(&cp, 0, sizeof(cp)); in hci_setup_link_policy_sync()
3928 cp.policy = cpu_to_le16(link_policy); in hci_setup_link_policy_sync()
3931 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_link_policy_sync()
4242 struct hci_cp_write_le_host_supported cp; in hci_set_le_support_sync() local
4248 memset(&cp, 0, sizeof(cp)); in hci_set_le_support_sync()
4251 cp.le = 0x01; in hci_set_le_support_sync()
4252 cp.simul = 0x00; in hci_set_le_support_sync()
4255 if (cp.le == lmp_host_le_capable(hdev)) in hci_set_le_support_sync()
4259 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_le_support_sync()
4265 struct hci_cp_le_set_host_feature cp; in hci_le_set_host_feature_sync() local
4270 memset(&cp, 0, sizeof(cp)); in hci_le_set_host_feature_sync()
4273 cp.bit_number = 32; in hci_le_set_host_feature_sync()
4274 cp.bit_value = 1; in hci_le_set_host_feature_sync()
4277 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_host_feature_sync()
4329 struct hci_cp_delete_stored_link_key cp; in hci_delete_stored_link_key_sync() local
4348 memset(&cp, 0, sizeof(cp)); in hci_delete_stored_link_key_sync()
4349 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_delete_stored_link_key_sync()
4350 cp.delete_all = 0x01; in hci_delete_stored_link_key_sync()
4353 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_delete_stored_link_key_sync()
4466 struct hci_cp_write_def_err_data_reporting cp; in hci_set_err_data_report_sync() local
4477 memset(&cp, 0, sizeof(cp)); in hci_set_err_data_report_sync()
4478 cp.err_data_reporting = enabled ? ERR_DATA_REPORTING_ENABLED : in hci_set_err_data_report_sync()
4482 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_err_data_report_sync()
4508 struct hci_cp_le_write_def_data_len cp; in hci_le_set_write_def_data_len_sync() local
4513 memset(&cp, 0, sizeof(cp)); in hci_le_set_write_def_data_len_sync()
4514 cp.tx_len = cpu_to_le16(hdev->le_max_tx_len); in hci_le_set_write_def_data_len_sync()
4515 cp.tx_time = cpu_to_le16(hdev->le_max_tx_time); in hci_le_set_write_def_data_len_sync()
4518 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_write_def_data_len_sync()
4526 struct hci_cp_le_set_default_phy cp; in hci_le_set_default_phy_sync() local
4537 memset(&cp, 0, sizeof(cp)); in hci_le_set_default_phy_sync()
4538 cp.all_phys = 0x00; in hci_le_set_default_phy_sync()
4539 cp.tx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4540 cp.rx_phys = HCI_LE_SET_PHY_1M; in hci_le_set_default_phy_sync()
4544 cp.tx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4545 cp.rx_phys |= HCI_LE_SET_PHY_2M; in hci_le_set_default_phy_sync()
4550 cp.tx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4551 cp.rx_phys |= HCI_LE_SET_PHY_CODED; in hci_le_set_default_phy_sync()
4555 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_default_phy_sync()
5154 struct hci_cp_remote_name_req_cancel cp; in hci_remote_name_cancel_sync() local
5156 memset(&cp, 0, sizeof(cp)); in hci_remote_name_cancel_sync()
5157 bacpy(&cp.bdaddr, addr); in hci_remote_name_cancel_sync()
5160 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_remote_name_cancel_sync()
5217 struct hci_cp_disconn_phy_link cp; in hci_disconnect_phy_link_sync() local
5219 memset(&cp, 0, sizeof(cp)); in hci_disconnect_phy_link_sync()
5220 cp.phy_handle = HCI_PHY_HANDLE(handle); in hci_disconnect_phy_link_sync()
5221 cp.reason = reason; in hci_disconnect_phy_link_sync()
5224 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disconnect_phy_link_sync()
5230 struct hci_cp_disconnect cp; in hci_disconnect_sync() local
5235 memset(&cp, 0, sizeof(cp)); in hci_disconnect_sync()
5236 cp.handle = cpu_to_le16(conn->handle); in hci_disconnect_sync()
5237 cp.reason = reason; in hci_disconnect_sync()
5246 sizeof(cp), &cp, in hci_disconnect_sync()
5250 return __hci_cmd_sync_status(hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp, in hci_disconnect_sync()
5320 struct hci_cp_reject_sync_conn_req cp; in hci_reject_sco_sync() local
5322 memset(&cp, 0, sizeof(cp)); in hci_reject_sco_sync()
5323 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_sco_sync()
5324 cp.reason = reason; in hci_reject_sco_sync()
5330 cp.reason = HCI_ERROR_REJ_LIMITED_RESOURCES; in hci_reject_sco_sync()
5333 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_sco_sync()
5339 struct hci_cp_le_reject_cis cp; in hci_le_reject_cis_sync() local
5341 memset(&cp, 0, sizeof(cp)); in hci_le_reject_cis_sync()
5342 cp.handle = cpu_to_le16(conn->handle); in hci_le_reject_cis_sync()
5343 cp.reason = reason; in hci_le_reject_cis_sync()
5346 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_reject_cis_sync()
5352 struct hci_cp_reject_conn_req cp; in hci_reject_conn_sync() local
5360 memset(&cp, 0, sizeof(cp)); in hci_reject_conn_sync()
5361 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_conn_sync()
5362 cp.reason = reason; in hci_reject_conn_sync()
5365 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_conn_sync()
5508 struct hci_cp_write_current_iac_lap cp; in hci_write_iac_sync() local
5513 memset(&cp, 0, sizeof(cp)); in hci_write_iac_sync()
5517 cp.num_iac = min_t(u8, hdev->num_iac, 2); in hci_write_iac_sync()
5518 cp.iac_lap[0] = 0x00; /* LIAC */ in hci_write_iac_sync()
5519 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5520 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5521 cp.iac_lap[3] = 0x33; /* GIAC */ in hci_write_iac_sync()
5522 cp.iac_lap[4] = 0x8b; in hci_write_iac_sync()
5523 cp.iac_lap[5] = 0x9e; in hci_write_iac_sync()
5526 cp.num_iac = 1; in hci_write_iac_sync()
5527 cp.iac_lap[0] = 0x33; /* GIAC */ in hci_write_iac_sync()
5528 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5529 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5533 (cp.num_iac * 3) + 1, &cp, in hci_write_iac_sync()
5630 struct hci_cp_inquiry cp; in hci_inquiry_sync() local
5641 memset(&cp, 0, sizeof(cp)); in hci_inquiry_sync()
5644 memcpy(&cp.lap, liac, sizeof(cp.lap)); in hci_inquiry_sync()
5646 memcpy(&cp.lap, giac, sizeof(cp.lap)); in hci_inquiry_sync()
5648 cp.length = length; in hci_inquiry_sync()
5651 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_inquiry_sync()
6068 struct hci_cp_le_set_ext_adv_params cp; in hci_le_ext_directed_advertising_sync() local
6086 memset(&cp, 0, sizeof(cp)); in hci_le_ext_directed_advertising_sync()
6088 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_le_ext_directed_advertising_sync()
6089 cp.channel_map = hdev->le_adv_channel_map; in hci_le_ext_directed_advertising_sync()
6090 cp.tx_power = HCI_TX_POWER_INVALID; in hci_le_ext_directed_advertising_sync()
6091 cp.primary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6092 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
6093 cp.handle = 0x00; /* Use instance 0 for directed adv */ in hci_le_ext_directed_advertising_sync()
6094 cp.own_addr_type = own_addr_type; in hci_le_ext_directed_advertising_sync()
6095 cp.peer_addr_type = conn->dst_type; in hci_le_ext_directed_advertising_sync()
6096 bacpy(&cp.peer_addr, &conn->dst); in hci_le_ext_directed_advertising_sync()
6106 err = hci_remove_ext_adv_instance_sync(hdev, cp.handle, NULL); in hci_le_ext_directed_advertising_sync()
6111 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_ext_directed_advertising_sync()
6131 struct hci_cp_le_set_adv_param cp; in hci_le_directed_advertising_sync() local
6154 memset(&cp, 0, sizeof(cp)); in hci_le_directed_advertising_sync()
6160 cp.min_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6161 cp.max_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
6163 cp.type = LE_ADV_DIRECT_IND; in hci_le_directed_advertising_sync()
6164 cp.own_address_type = own_addr_type; in hci_le_directed_advertising_sync()
6165 cp.direct_addr_type = conn->dst_type; in hci_le_directed_advertising_sync()
6166 bacpy(&cp.direct_addr, &conn->dst); in hci_le_directed_advertising_sync()
6167 cp.channel_map = hdev->le_adv_channel_map; in hci_le_directed_advertising_sync()
6170 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_directed_advertising_sync()
6200 struct hci_cp_le_ext_create_conn *cp; in hci_le_ext_create_conn_sync() local
6202 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_le_ext_create_conn_sync()
6205 cp = (void *)data; in hci_le_ext_create_conn_sync()
6206 p = (void *)cp->data; in hci_le_ext_create_conn_sync()
6208 memset(cp, 0, sizeof(*cp)); in hci_le_ext_create_conn_sync()
6210 bacpy(&cp->peer_addr, &conn->dst); in hci_le_ext_create_conn_sync()
6211 cp->peer_addr_type = conn->dst_type; in hci_le_ext_create_conn_sync()
6212 cp->own_addr_type = own_addr_type; in hci_le_ext_create_conn_sync()
6214 plen = sizeof(*cp); in hci_le_ext_create_conn_sync()
6217 cp->phys |= LE_SCAN_PHY_1M; in hci_le_ext_create_conn_sync()
6225 cp->phys |= LE_SCAN_PHY_2M; in hci_le_ext_create_conn_sync()
6233 cp->phys |= LE_SCAN_PHY_CODED; in hci_le_ext_create_conn_sync()
6247 struct hci_cp_le_create_conn cp; in hci_le_create_conn_sync() local
6312 memset(&cp, 0, sizeof(cp)); in hci_le_create_conn_sync()
6314 cp.scan_interval = cpu_to_le16(hdev->le_scan_int_connect); in hci_le_create_conn_sync()
6315 cp.scan_window = cpu_to_le16(hdev->le_scan_window_connect); in hci_le_create_conn_sync()
6317 bacpy(&cp.peer_addr, &conn->dst); in hci_le_create_conn_sync()
6318 cp.peer_addr_type = conn->dst_type; in hci_le_create_conn_sync()
6319 cp.own_address_type = own_addr_type; in hci_le_create_conn_sync()
6320 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_le_create_conn_sync()
6321 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_le_create_conn_sync()
6322 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_le_create_conn_sync()
6323 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_le_create_conn_sync()
6324 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6325 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6334 sizeof(cp), &cp, in hci_le_create_conn_sync()
6352 struct hci_cp_le_create_cis cp; in hci_le_create_cis_sync() member
6419 struct hci_cis *cis = &cmd.cis[cmd.cp.num_cis]; in hci_le_create_cis_sync()
6428 cmd.cp.num_cis++; in hci_le_create_cis_sync()
6430 if (cmd.cp.num_cis >= ARRAY_SIZE(cmd.cis)) in hci_le_create_cis_sync()
6439 if (!cmd.cp.num_cis) in hci_le_create_cis_sync()
6444 sizeof(cmd.cp) + sizeof(cmd.cis[0]) * in hci_le_create_cis_sync()
6445 cmd.cp.num_cis, &cmd, in hci_le_create_cis_sync()
6452 struct hci_cp_le_remove_cig cp; in hci_le_remove_cig_sync() local
6454 memset(&cp, 0, sizeof(cp)); in hci_le_remove_cig_sync()
6455 cp.cig_id = handle; in hci_le_remove_cig_sync()
6457 return __hci_cmd_sync_status(hdev, HCI_OP_LE_REMOVE_CIG, sizeof(cp), in hci_le_remove_cig_sync()
6458 &cp, HCI_CMD_TIMEOUT); in hci_le_remove_cig_sync()
6463 struct hci_cp_le_big_term_sync cp; in hci_le_big_terminate_sync() local
6465 memset(&cp, 0, sizeof(cp)); in hci_le_big_terminate_sync()
6466 cp.handle = handle; in hci_le_big_terminate_sync()
6469 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_big_terminate_sync()
6474 struct hci_cp_le_pa_term_sync cp; in hci_le_pa_terminate_sync() local
6476 memset(&cp, 0, sizeof(cp)); in hci_le_pa_terminate_sync()
6477 cp.handle = cpu_to_le16(handle); in hci_le_pa_terminate_sync()
6480 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_pa_terminate_sync()