Lines Matching refs:cp

712 	struct hci_cp_write_eir cp;  in hci_update_eir_sync()  local
728 memset(&cp, 0, sizeof(cp)); in hci_update_eir_sync()
730 eir_create(hdev, cp.data); in hci_update_eir_sync()
732 if (memcmp(cp.data, hdev->eir, sizeof(cp.data)) == 0) in hci_update_eir_sync()
735 memcpy(hdev->eir, cp.data, sizeof(cp.data)); in hci_update_eir_sync()
737 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_update_eir_sync()
958 struct hci_cp_le_set_ext_adv_enable *cp; in hci_disable_ext_adv_instance_sync() local
960 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_disable_ext_adv_instance_sync()
978 cp = (void *)data; in hci_disable_ext_adv_instance_sync()
979 set = (void *)cp->data; in hci_disable_ext_adv_instance_sync()
982 cp->num_of_sets = !!instance; in hci_disable_ext_adv_instance_sync()
983 cp->enable = 0x00; in hci_disable_ext_adv_instance_sync()
987 size = sizeof(*cp) + sizeof(*set) * cp->num_of_sets; in hci_disable_ext_adv_instance_sync()
996 struct hci_cp_le_set_adv_set_rand_addr cp; in hci_set_adv_set_random_addr_sync() local
1010 memset(&cp, 0, sizeof(cp)); in hci_set_adv_set_random_addr_sync()
1012 cp.handle = instance; in hci_set_adv_set_random_addr_sync()
1013 bacpy(&cp.bdaddr, random_addr); in hci_set_adv_set_random_addr_sync()
1016 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_set_random_addr_sync()
1021 struct hci_cp_le_set_ext_adv_params cp; in hci_setup_ext_adv_instance_sync() local
1069 memset(&cp, 0, sizeof(cp)); in hci_setup_ext_adv_instance_sync()
1072 hci_cpu_to_le24(adv->min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1073 hci_cpu_to_le24(adv->max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1074 cp.tx_power = adv->tx_power; in hci_setup_ext_adv_instance_sync()
1076 hci_cpu_to_le24(hdev->le_adv_min_interval, cp.min_interval); in hci_setup_ext_adv_instance_sync()
1077 hci_cpu_to_le24(hdev->le_adv_max_interval, cp.max_interval); in hci_setup_ext_adv_instance_sync()
1078 cp.tx_power = HCI_ADV_TX_POWER_NO_PREFERENCE; in hci_setup_ext_adv_instance_sync()
1085 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_CONN_IND); in hci_setup_ext_adv_instance_sync()
1087 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_IND); in hci_setup_ext_adv_instance_sync()
1091 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1093 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_SCAN_IND); in hci_setup_ext_adv_instance_sync()
1096 cp.evt_properties = cpu_to_le16(LE_EXT_ADV_NON_CONN_IND); in hci_setup_ext_adv_instance_sync()
1098 cp.evt_properties = cpu_to_le16(LE_LEGACY_NONCONN_IND); in hci_setup_ext_adv_instance_sync()
1109 hci_copy_identity_address(hdev, &cp.peer_addr, in hci_setup_ext_adv_instance_sync()
1110 &cp.peer_addr_type); in hci_setup_ext_adv_instance_sync()
1112 cp.own_addr_type = own_addr_type; in hci_setup_ext_adv_instance_sync()
1113 cp.channel_map = hdev->le_adv_channel_map; in hci_setup_ext_adv_instance_sync()
1114 cp.handle = instance; in hci_setup_ext_adv_instance_sync()
1117 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1118 cp.secondary_phy = HCI_ADV_PHY_2M; in hci_setup_ext_adv_instance_sync()
1120 cp.primary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1121 cp.secondary_phy = HCI_ADV_PHY_CODED; in hci_setup_ext_adv_instance_sync()
1124 cp.primary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1125 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_setup_ext_adv_instance_sync()
1129 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_ext_adv_instance_sync()
1155 struct hci_cp_le_set_ext_scan_rsp_data cp; in hci_set_ext_scan_rsp_data_sync() member
1172 pdu.cp.handle = instance; in hci_set_ext_scan_rsp_data_sync()
1173 pdu.cp.length = len; in hci_set_ext_scan_rsp_data_sync()
1174 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_ext_scan_rsp_data_sync()
1175 pdu.cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; in hci_set_ext_scan_rsp_data_sync()
1178 sizeof(pdu.cp) + len, &pdu.cp, in hci_set_ext_scan_rsp_data_sync()
1195 struct hci_cp_le_set_scan_rsp_data cp; in __hci_set_scan_rsp_data_sync() local
1198 memset(&cp, 0, sizeof(cp)); in __hci_set_scan_rsp_data_sync()
1200 len = eir_create_scan_rsp(hdev, instance, cp.data); in __hci_set_scan_rsp_data_sync()
1203 !memcmp(cp.data, hdev->scan_rsp_data, len)) in __hci_set_scan_rsp_data_sync()
1206 memcpy(hdev->scan_rsp_data, cp.data, sizeof(cp.data)); in __hci_set_scan_rsp_data_sync()
1209 cp.length = len; in __hci_set_scan_rsp_data_sync()
1212 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in __hci_set_scan_rsp_data_sync()
1228 struct hci_cp_le_set_ext_adv_enable *cp; in hci_enable_ext_advertising_sync() local
1230 u8 data[sizeof(*cp) + sizeof(*set) * 1]; in hci_enable_ext_advertising_sync()
1244 cp = (void *)data; in hci_enable_ext_advertising_sync()
1245 set = (void *)cp->data; in hci_enable_ext_advertising_sync()
1247 memset(cp, 0, sizeof(*cp)); in hci_enable_ext_advertising_sync()
1249 cp->enable = 0x01; in hci_enable_ext_advertising_sync()
1250 cp->num_of_sets = 0x01; in hci_enable_ext_advertising_sync()
1267 sizeof(*cp) + in hci_enable_ext_advertising_sync()
1268 sizeof(*set) * cp->num_of_sets, in hci_enable_ext_advertising_sync()
1289 struct hci_cp_le_set_per_adv_enable cp; in hci_disable_per_advertising_sync() local
1295 memset(&cp, 0, sizeof(cp)); in hci_disable_per_advertising_sync()
1297 cp.enable = 0x00; in hci_disable_per_advertising_sync()
1298 cp.handle = instance; in hci_disable_per_advertising_sync()
1301 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disable_per_advertising_sync()
1307 struct hci_cp_le_set_per_adv_params cp; in hci_set_per_adv_params_sync() local
1309 memset(&cp, 0, sizeof(cp)); in hci_set_per_adv_params_sync()
1317 cp.handle = instance; in hci_set_per_adv_params_sync()
1318 cp.min_interval = cpu_to_le16(min_interval); in hci_set_per_adv_params_sync()
1319 cp.max_interval = cpu_to_le16(max_interval); in hci_set_per_adv_params_sync()
1320 cp.periodic_properties = 0x0000; in hci_set_per_adv_params_sync()
1323 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_per_adv_params_sync()
1329 struct hci_cp_le_set_per_adv_data cp; in hci_set_per_adv_data_sync() member
1345 pdu.cp.length = len; in hci_set_per_adv_data_sync()
1346 pdu.cp.handle = instance; in hci_set_per_adv_data_sync()
1347 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_per_adv_data_sync()
1350 sizeof(pdu.cp) + len, &pdu, in hci_set_per_adv_data_sync()
1356 struct hci_cp_le_set_per_adv_enable cp; in hci_enable_per_advertising_sync() local
1362 memset(&cp, 0, sizeof(cp)); in hci_enable_per_advertising_sync()
1364 cp.enable = 0x01; in hci_enable_per_advertising_sync()
1365 cp.handle = instance; in hci_enable_per_advertising_sync()
1368 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_per_advertising_sync()
1489 struct hci_cp_le_set_adv_param cp; in hci_enable_advertising_sync() local
1533 memset(&cp, 0, sizeof(cp)); in hci_enable_advertising_sync()
1544 cp.type = LE_ADV_IND; in hci_enable_advertising_sync()
1547 cp.type = LE_ADV_SCAN_IND; in hci_enable_advertising_sync()
1549 cp.type = LE_ADV_NONCONN_IND; in hci_enable_advertising_sync()
1558 cp.min_interval = cpu_to_le16(adv_min_interval); in hci_enable_advertising_sync()
1559 cp.max_interval = cpu_to_le16(adv_max_interval); in hci_enable_advertising_sync()
1560 cp.own_address_type = own_addr_type; in hci_enable_advertising_sync()
1561 cp.channel_map = hdev->le_adv_channel_map; in hci_enable_advertising_sync()
1564 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_enable_advertising_sync()
1633 struct hci_cp_le_term_big cp; in hci_le_terminate_big_sync() local
1635 memset(&cp, 0, sizeof(cp)); in hci_le_terminate_big_sync()
1636 cp.handle = handle; in hci_le_terminate_big_sync()
1637 cp.reason = reason; in hci_le_terminate_big_sync()
1640 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_terminate_big_sync()
1646 struct hci_cp_le_set_ext_adv_data cp; in hci_set_ext_adv_data_sync() member
1663 pdu.cp.length = len; in hci_set_ext_adv_data_sync()
1664 pdu.cp.handle = instance; in hci_set_ext_adv_data_sync()
1665 pdu.cp.operation = LE_SET_ADV_DATA_OP_COMPLETE; in hci_set_ext_adv_data_sync()
1666 pdu.cp.frag_pref = LE_SET_ADV_DATA_NO_FRAG; in hci_set_ext_adv_data_sync()
1669 sizeof(pdu.cp) + len, &pdu.cp, in hci_set_ext_adv_data_sync()
1687 struct hci_cp_le_set_adv_data cp; in hci_set_adv_data_sync() local
1690 memset(&cp, 0, sizeof(cp)); in hci_set_adv_data_sync()
1692 len = eir_create_adv_data(hdev, instance, cp.data); in hci_set_adv_data_sync()
1696 memcmp(cp.data, hdev->adv_data, len) == 0) in hci_set_adv_data_sync()
1699 memcpy(hdev->adv_data, cp.data, sizeof(cp.data)); in hci_set_adv_data_sync()
1702 cp.length = len; in hci_set_adv_data_sync()
1705 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_adv_data_sync()
1907 struct hci_cp_read_rssi cp; in hci_read_rssi_sync() local
1909 cp.handle = handle; in hci_read_rssi_sync()
1911 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_rssi_sync()
1914 int hci_read_clock_sync(struct hci_dev *hdev, struct hci_cp_read_clock *cp) in hci_read_clock_sync() argument
1917 sizeof(*cp), cp, HCI_CMD_TIMEOUT); in hci_read_clock_sync()
1922 struct hci_cp_read_tx_power cp; in hci_read_tx_power_sync() local
1924 cp.handle = handle; in hci_read_tx_power_sync()
1925 cp.type = type; in hci_read_tx_power_sync()
1927 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_tx_power_sync()
1951 struct hci_cp_le_set_ext_scan_enable cp; in hci_le_set_ext_scan_enable_sync() local
1953 memset(&cp, 0, sizeof(cp)); in hci_le_set_ext_scan_enable_sync()
1954 cp.enable = val; in hci_le_set_ext_scan_enable_sync()
1957 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_ext_scan_enable_sync()
1959 cp.filter_dup = filter_dup; in hci_le_set_ext_scan_enable_sync()
1962 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_ext_scan_enable_sync()
1968 struct hci_cp_le_set_scan_enable cp; in hci_le_set_scan_enable_sync() local
1973 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_enable_sync()
1974 cp.enable = val; in hci_le_set_scan_enable_sync()
1977 cp.filter_dup = LE_SCAN_FILTER_DUP_DISABLE; in hci_le_set_scan_enable_sync()
1979 cp.filter_dup = filter_dup; in hci_le_set_scan_enable_sync()
1982 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_enable_sync()
2081 struct hci_cp_le_del_from_resolv_list cp; in hci_le_del_resolve_list_sync() local
2093 cp.bdaddr_type = bdaddr_type; in hci_le_del_resolve_list_sync()
2094 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_resolve_list_sync()
2097 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_resolve_list_sync()
2103 struct hci_cp_le_del_from_accept_list cp; in hci_le_del_accept_list_sync() local
2110 cp.bdaddr_type = bdaddr_type; in hci_le_del_accept_list_sync()
2111 bacpy(&cp.bdaddr, bdaddr); in hci_le_del_accept_list_sync()
2116 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_del_accept_list_sync()
2119 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_del_accept_list_sync()
2125 bt_dev_dbg(hdev, "Remove %pMR (0x%x) from allow list", &cp.bdaddr, in hci_le_del_accept_list_sync()
2126 cp.bdaddr_type); in hci_le_del_accept_list_sync()
2137 struct hci_cp_le_add_to_resolv_list cp; in hci_le_add_resolve_list_sync() local
2151 hci_copy_identity_address(hdev, &cp.bdaddr, &cp.bdaddr_type); in hci_le_add_resolve_list_sync()
2152 memcpy(cp.peer_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2167 cp.bdaddr_type = params->addr_type; in hci_le_add_resolve_list_sync()
2168 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_resolve_list_sync()
2169 memcpy(cp.peer_irk, irk->val, 16); in hci_le_add_resolve_list_sync()
2176 memcpy(cp.local_irk, hdev->irk, 16); in hci_le_add_resolve_list_sync()
2178 memset(cp.local_irk, 0, 16); in hci_le_add_resolve_list_sync()
2181 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_resolve_list_sync()
2188 struct hci_cp_le_set_privacy_mode cp; in hci_le_set_privacy_mode_sync() local
2206 memset(&cp, 0, sizeof(cp)); in hci_le_set_privacy_mode_sync()
2207 cp.bdaddr_type = irk->addr_type; in hci_le_set_privacy_mode_sync()
2208 bacpy(&cp.bdaddr, &irk->bdaddr); in hci_le_set_privacy_mode_sync()
2209 cp.mode = HCI_DEVICE_PRIVACY; in hci_le_set_privacy_mode_sync()
2212 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_privacy_mode_sync()
2223 struct hci_cp_le_add_to_accept_list cp; in hci_le_add_accept_list_sync() local
2263 cp.bdaddr_type = params->addr_type; in hci_le_add_accept_list_sync()
2264 bacpy(&cp.bdaddr, &params->addr); in hci_le_add_accept_list_sync()
2267 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_add_accept_list_sync()
2271 hci_le_del_resolve_list_sync(hdev, &cp.bdaddr, cp.bdaddr_type); in hci_le_add_accept_list_sync()
2275 bt_dev_dbg(hdev, "Add %pMR (0x%x) to allow list", &cp.bdaddr, in hci_le_add_accept_list_sync()
2276 cp.bdaddr_type); in hci_le_add_accept_list_sync()
2532 struct hci_cp_le_set_ext_scan_params *cp; in hci_le_set_ext_scan_param_sync() local
2534 u8 data[sizeof(*cp) + sizeof(*phy) * 2]; in hci_le_set_ext_scan_param_sync()
2537 cp = (void *)data; in hci_le_set_ext_scan_param_sync()
2538 phy = (void *)cp->data; in hci_le_set_ext_scan_param_sync()
2542 cp->own_addr_type = own_addr_type; in hci_le_set_ext_scan_param_sync()
2543 cp->filter_policy = filter_policy; in hci_le_set_ext_scan_param_sync()
2546 cp->scanning_phys |= LE_SCAN_PHY_1M; in hci_le_set_ext_scan_param_sync()
2557 cp->scanning_phys |= LE_SCAN_PHY_CODED; in hci_le_set_ext_scan_param_sync()
2568 sizeof(*cp) + sizeof(*phy) * num_phy, in hci_le_set_ext_scan_param_sync()
2576 struct hci_cp_le_set_scan_param cp; in hci_le_set_scan_param_sync() local
2583 memset(&cp, 0, sizeof(cp)); in hci_le_set_scan_param_sync()
2584 cp.type = type; in hci_le_set_scan_param_sync()
2585 cp.interval = cpu_to_le16(interval); in hci_le_set_scan_param_sync()
2586 cp.window = cpu_to_le16(window); in hci_le_set_scan_param_sync()
2587 cp.own_address_type = own_addr_type; in hci_le_set_scan_param_sync()
2588 cp.filter_policy = filter_policy; in hci_le_set_scan_param_sync()
2591 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_scan_param_sync()
2854 struct hci_cp_write_le_host_supported cp; in hci_write_le_host_supported_sync() local
2867 memset(&cp, 0, sizeof(cp)); in hci_write_le_host_supported_sync()
2869 cp.le = le; in hci_write_le_host_supported_sync()
2870 cp.simul = simul; in hci_write_le_host_supported_sync()
2873 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_le_host_supported_sync()
2936 struct hci_cp_write_page_scan_activity cp; in hci_write_fast_connectable_sync() local
2946 memset(&cp, 0, sizeof(cp)); in hci_write_fast_connectable_sync()
2952 cp.interval = cpu_to_le16(0x0100); in hci_write_fast_connectable_sync()
2955 cp.interval = cpu_to_le16(hdev->def_page_scan_int); in hci_write_fast_connectable_sync()
2958 cp.window = cpu_to_le16(hdev->def_page_scan_window); in hci_write_fast_connectable_sync()
2960 if (__cpu_to_le16(hdev->page_scan_interval) != cp.interval || in hci_write_fast_connectable_sync()
2961 __cpu_to_le16(hdev->page_scan_window) != cp.window) { in hci_write_fast_connectable_sync()
2964 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_write_fast_connectable_sync()
3037 struct hci_cp_write_local_name cp; in hci_update_name_sync() local
3039 memset(&cp, 0, sizeof(cp)); in hci_update_name_sync()
3041 memcpy(cp.name, hdev->dev_name, sizeof(cp.name)); in hci_update_name_sync()
3044 sizeof(cp), &cp, in hci_update_name_sync()
3404 struct hci_cp_set_event_filter cp; in hci_set_event_filter_sync() local
3412 memset(&cp, 0, sizeof(cp)); in hci_set_event_filter_sync()
3413 cp.flt_type = flt_type; in hci_set_event_filter_sync()
3416 cp.cond_type = cond_type; in hci_set_event_filter_sync()
3417 bacpy(&cp.addr_conn_flt.bdaddr, bdaddr); in hci_set_event_filter_sync()
3418 cp.addr_conn_flt.auto_accept = auto_accept; in hci_set_event_filter_sync()
3423 sizeof(cp.flt_type) : sizeof(cp), &cp, in hci_set_event_filter_sync()
3494 struct hci_cp_write_eir cp; in hci_write_eir_sync() local
3500 memset(&cp, 0, sizeof(cp)); in hci_write_eir_sync()
3502 return __hci_cmd_sync_status(hdev, HCI_OP_WRITE_EIR, sizeof(cp), &cp, in hci_write_eir_sync()
3535 struct hci_cp_read_local_ext_features cp; in hci_read_local_ext_features_sync() local
3540 memset(&cp, 0, sizeof(cp)); in hci_read_local_ext_features_sync()
3541 cp.page = page; in hci_read_local_ext_features_sync()
3544 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_local_ext_features_sync()
3751 struct hci_cp_read_stored_link_key cp; in hci_read_stored_link_key_sync() local
3757 memset(&cp, 0, sizeof(cp)); in hci_read_stored_link_key_sync()
3758 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_read_stored_link_key_sync()
3759 cp.read_all = 0x01; in hci_read_stored_link_key_sync()
3762 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_read_stored_link_key_sync()
3767 struct hci_cp_write_def_link_policy cp; in hci_setup_link_policy_sync() local
3773 memset(&cp, 0, sizeof(cp)); in hci_setup_link_policy_sync()
3784 cp.policy = cpu_to_le16(link_policy); in hci_setup_link_policy_sync()
3787 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_setup_link_policy_sync()
4094 struct hci_cp_write_le_host_supported cp; in hci_set_le_support_sync() local
4100 memset(&cp, 0, sizeof(cp)); in hci_set_le_support_sync()
4103 cp.le = 0x01; in hci_set_le_support_sync()
4104 cp.simul = 0x00; in hci_set_le_support_sync()
4107 if (cp.le == lmp_host_le_capable(hdev)) in hci_set_le_support_sync()
4111 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_le_support_sync()
4117 struct hci_cp_le_set_host_feature cp; in hci_le_set_host_feature_sync() local
4122 memset(&cp, 0, sizeof(cp)); in hci_le_set_host_feature_sync()
4125 cp.bit_number = 32; in hci_le_set_host_feature_sync()
4126 cp.bit_value = 1; in hci_le_set_host_feature_sync()
4129 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_host_feature_sync()
4181 struct hci_cp_delete_stored_link_key cp; in hci_delete_stored_link_key_sync() local
4200 memset(&cp, 0, sizeof(cp)); in hci_delete_stored_link_key_sync()
4201 bacpy(&cp.bdaddr, BDADDR_ANY); in hci_delete_stored_link_key_sync()
4202 cp.delete_all = 0x01; in hci_delete_stored_link_key_sync()
4205 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_delete_stored_link_key_sync()
4318 struct hci_cp_write_def_err_data_reporting cp; in hci_set_err_data_report_sync() local
4329 memset(&cp, 0, sizeof(cp)); in hci_set_err_data_report_sync()
4330 cp.err_data_reporting = enabled ? ERR_DATA_REPORTING_ENABLED : in hci_set_err_data_report_sync()
4334 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_set_err_data_report_sync()
4360 struct hci_cp_le_write_def_data_len cp; in hci_le_set_write_def_data_len_sync() local
4365 memset(&cp, 0, sizeof(cp)); in hci_le_set_write_def_data_len_sync()
4366 cp.tx_len = cpu_to_le16(hdev->le_max_tx_len); in hci_le_set_write_def_data_len_sync()
4367 cp.tx_time = cpu_to_le16(hdev->le_max_tx_time); in hci_le_set_write_def_data_len_sync()
4370 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_write_def_data_len_sync()
4376 struct hci_cp_le_set_default_phy cp; in hci_le_set_default_phy_sync() local
4381 memset(&cp, 0, sizeof(cp)); in hci_le_set_default_phy_sync()
4382 cp.all_phys = 0x00; in hci_le_set_default_phy_sync()
4383 cp.tx_phys = hdev->le_tx_def_phys; in hci_le_set_default_phy_sync()
4384 cp.rx_phys = hdev->le_rx_def_phys; in hci_le_set_default_phy_sync()
4387 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_set_default_phy_sync()
4982 struct hci_cp_remote_name_req_cancel cp; in hci_remote_name_cancel_sync() local
4984 memset(&cp, 0, sizeof(cp)); in hci_remote_name_cancel_sync()
4985 bacpy(&cp.bdaddr, addr); in hci_remote_name_cancel_sync()
4988 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_remote_name_cancel_sync()
5045 struct hci_cp_disconn_phy_link cp; in hci_disconnect_phy_link_sync() local
5047 memset(&cp, 0, sizeof(cp)); in hci_disconnect_phy_link_sync()
5048 cp.phy_handle = HCI_PHY_HANDLE(handle); in hci_disconnect_phy_link_sync()
5049 cp.reason = reason; in hci_disconnect_phy_link_sync()
5052 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_disconnect_phy_link_sync()
5058 struct hci_cp_disconnect cp; in hci_disconnect_sync() local
5063 memset(&cp, 0, sizeof(cp)); in hci_disconnect_sync()
5064 cp.handle = cpu_to_le16(conn->handle); in hci_disconnect_sync()
5065 cp.reason = reason; in hci_disconnect_sync()
5072 sizeof(cp), &cp, in hci_disconnect_sync()
5076 return __hci_cmd_sync_status(hdev, HCI_OP_DISCONNECT, sizeof(cp), &cp, in hci_disconnect_sync()
5105 struct hci_cp_reject_sync_conn_req cp; in hci_reject_sco_sync() local
5107 memset(&cp, 0, sizeof(cp)); in hci_reject_sco_sync()
5108 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_sco_sync()
5109 cp.reason = reason; in hci_reject_sco_sync()
5115 cp.reason = HCI_ERROR_REJ_LIMITED_RESOURCES; in hci_reject_sco_sync()
5118 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_sco_sync()
5124 struct hci_cp_reject_conn_req cp; in hci_reject_conn_sync() local
5129 memset(&cp, 0, sizeof(cp)); in hci_reject_conn_sync()
5130 bacpy(&cp.bdaddr, &conn->dst); in hci_reject_conn_sync()
5131 cp.reason = reason; in hci_reject_conn_sync()
5134 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_reject_conn_sync()
5228 struct hci_cp_write_current_iac_lap cp; in hci_write_iac_sync() local
5233 memset(&cp, 0, sizeof(cp)); in hci_write_iac_sync()
5237 cp.num_iac = min_t(u8, hdev->num_iac, 2); in hci_write_iac_sync()
5238 cp.iac_lap[0] = 0x00; /* LIAC */ in hci_write_iac_sync()
5239 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5240 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5241 cp.iac_lap[3] = 0x33; /* GIAC */ in hci_write_iac_sync()
5242 cp.iac_lap[4] = 0x8b; in hci_write_iac_sync()
5243 cp.iac_lap[5] = 0x9e; in hci_write_iac_sync()
5246 cp.num_iac = 1; in hci_write_iac_sync()
5247 cp.iac_lap[0] = 0x33; /* GIAC */ in hci_write_iac_sync()
5248 cp.iac_lap[1] = 0x8b; in hci_write_iac_sync()
5249 cp.iac_lap[2] = 0x9e; in hci_write_iac_sync()
5253 (cp.num_iac * 3) + 1, &cp, in hci_write_iac_sync()
5350 struct hci_cp_inquiry cp; in hci_inquiry_sync() local
5361 memset(&cp, 0, sizeof(cp)); in hci_inquiry_sync()
5364 memcpy(&cp.lap, liac, sizeof(cp.lap)); in hci_inquiry_sync()
5366 memcpy(&cp.lap, giac, sizeof(cp.lap)); in hci_inquiry_sync()
5368 cp.length = length; in hci_inquiry_sync()
5371 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_inquiry_sync()
5803 struct hci_cp_le_set_ext_adv_params cp; in hci_le_ext_directed_advertising_sync() local
5821 memset(&cp, 0, sizeof(cp)); in hci_le_ext_directed_advertising_sync()
5823 cp.evt_properties = cpu_to_le16(LE_LEGACY_ADV_DIRECT_IND); in hci_le_ext_directed_advertising_sync()
5824 cp.own_addr_type = own_addr_type; in hci_le_ext_directed_advertising_sync()
5825 cp.channel_map = hdev->le_adv_channel_map; in hci_le_ext_directed_advertising_sync()
5826 cp.tx_power = HCI_TX_POWER_INVALID; in hci_le_ext_directed_advertising_sync()
5827 cp.primary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
5828 cp.secondary_phy = HCI_ADV_PHY_1M; in hci_le_ext_directed_advertising_sync()
5829 cp.handle = 0x00; /* Use instance 0 for directed adv */ in hci_le_ext_directed_advertising_sync()
5830 cp.own_addr_type = own_addr_type; in hci_le_ext_directed_advertising_sync()
5831 cp.peer_addr_type = conn->dst_type; in hci_le_ext_directed_advertising_sync()
5832 bacpy(&cp.peer_addr, &conn->dst); in hci_le_ext_directed_advertising_sync()
5842 err = hci_remove_ext_adv_instance_sync(hdev, cp.handle, NULL); in hci_le_ext_directed_advertising_sync()
5847 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_ext_directed_advertising_sync()
5867 struct hci_cp_le_set_adv_param cp; in hci_le_directed_advertising_sync() local
5890 memset(&cp, 0, sizeof(cp)); in hci_le_directed_advertising_sync()
5896 cp.min_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
5897 cp.max_interval = cpu_to_le16(0x0020); in hci_le_directed_advertising_sync()
5899 cp.type = LE_ADV_DIRECT_IND; in hci_le_directed_advertising_sync()
5900 cp.own_address_type = own_addr_type; in hci_le_directed_advertising_sync()
5901 cp.direct_addr_type = conn->dst_type; in hci_le_directed_advertising_sync()
5902 bacpy(&cp.direct_addr, &conn->dst); in hci_le_directed_advertising_sync()
5903 cp.channel_map = hdev->le_adv_channel_map; in hci_le_directed_advertising_sync()
5906 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_directed_advertising_sync()
5936 struct hci_cp_le_ext_create_conn *cp; in hci_le_ext_create_conn_sync() local
5938 u8 data[sizeof(*cp) + sizeof(*p) * 3]; in hci_le_ext_create_conn_sync()
5941 cp = (void *)data; in hci_le_ext_create_conn_sync()
5942 p = (void *)cp->data; in hci_le_ext_create_conn_sync()
5944 memset(cp, 0, sizeof(*cp)); in hci_le_ext_create_conn_sync()
5946 bacpy(&cp->peer_addr, &conn->dst); in hci_le_ext_create_conn_sync()
5947 cp->peer_addr_type = conn->dst_type; in hci_le_ext_create_conn_sync()
5948 cp->own_addr_type = own_addr_type; in hci_le_ext_create_conn_sync()
5950 plen = sizeof(*cp); in hci_le_ext_create_conn_sync()
5953 cp->phys |= LE_SCAN_PHY_1M; in hci_le_ext_create_conn_sync()
5961 cp->phys |= LE_SCAN_PHY_2M; in hci_le_ext_create_conn_sync()
5969 cp->phys |= LE_SCAN_PHY_CODED; in hci_le_ext_create_conn_sync()
5983 struct hci_cp_le_create_conn cp; in hci_le_create_conn_sync() local
6048 memset(&cp, 0, sizeof(cp)); in hci_le_create_conn_sync()
6050 cp.scan_interval = cpu_to_le16(hdev->le_scan_int_connect); in hci_le_create_conn_sync()
6051 cp.scan_window = cpu_to_le16(hdev->le_scan_window_connect); in hci_le_create_conn_sync()
6053 bacpy(&cp.peer_addr, &conn->dst); in hci_le_create_conn_sync()
6054 cp.peer_addr_type = conn->dst_type; in hci_le_create_conn_sync()
6055 cp.own_address_type = own_addr_type; in hci_le_create_conn_sync()
6056 cp.conn_interval_min = cpu_to_le16(conn->le_conn_min_interval); in hci_le_create_conn_sync()
6057 cp.conn_interval_max = cpu_to_le16(conn->le_conn_max_interval); in hci_le_create_conn_sync()
6058 cp.conn_latency = cpu_to_le16(conn->le_conn_latency); in hci_le_create_conn_sync()
6059 cp.supervision_timeout = cpu_to_le16(conn->le_supv_timeout); in hci_le_create_conn_sync()
6060 cp.min_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6061 cp.max_ce_len = cpu_to_le16(0x0000); in hci_le_create_conn_sync()
6070 sizeof(cp), &cp, in hci_le_create_conn_sync()
6084 struct hci_cp_le_remove_cig cp; in hci_le_remove_cig_sync() local
6086 memset(&cp, 0, sizeof(cp)); in hci_le_remove_cig_sync()
6087 cp.cig_id = handle; in hci_le_remove_cig_sync()
6089 return __hci_cmd_sync_status(hdev, HCI_OP_LE_REMOVE_CIG, sizeof(cp), in hci_le_remove_cig_sync()
6090 &cp, HCI_CMD_TIMEOUT); in hci_le_remove_cig_sync()
6095 struct hci_cp_le_big_term_sync cp; in hci_le_big_terminate_sync() local
6097 memset(&cp, 0, sizeof(cp)); in hci_le_big_terminate_sync()
6098 cp.handle = handle; in hci_le_big_terminate_sync()
6101 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_big_terminate_sync()
6106 struct hci_cp_le_pa_term_sync cp; in hci_le_pa_terminate_sync() local
6108 memset(&cp, 0, sizeof(cp)); in hci_le_pa_terminate_sync()
6109 cp.handle = cpu_to_le16(handle); in hci_le_pa_terminate_sync()
6112 sizeof(cp), &cp, HCI_CMD_TIMEOUT); in hci_le_pa_terminate_sync()