Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
fork
Configure Feed
Select the types of activity you want to include in your feed.
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * BlueZ - Bluetooth protocol stack for Linux
4 *
5 * Copyright (C) 2021 Intel Corporation
6 */
7
8typedef int (*hci_cmd_sync_work_func_t)(struct hci_dev *hdev, void *data);
9typedef void (*hci_cmd_sync_work_destroy_t)(struct hci_dev *hdev, void *data,
10 int err);
11
12struct hci_cmd_sync_work_entry {
13 struct list_head list;
14 hci_cmd_sync_work_func_t func;
15 void *data;
16 hci_cmd_sync_work_destroy_t destroy;
17};
18
19struct adv_info;
20/* Function with sync suffix shall not be called with hdev->lock held as they
21 * wait the command to complete and in the meantime an event could be received
22 * which could attempt to acquire hdev->lock causing a deadlock.
23 */
24struct sk_buff *__hci_cmd_sync(struct hci_dev *hdev, u16 opcode, u32 plen,
25 const void *param, u32 timeout);
26struct sk_buff *hci_cmd_sync(struct hci_dev *hdev, u16 opcode, u32 plen,
27 const void *param, u32 timeout);
28struct sk_buff *__hci_cmd_sync_ev(struct hci_dev *hdev, u16 opcode, u32 plen,
29 const void *param, u8 event, u32 timeout);
30struct sk_buff *__hci_cmd_sync_sk(struct hci_dev *hdev, u16 opcode, u32 plen,
31 const void *param, u8 event, u32 timeout,
32 struct sock *sk);
33int __hci_cmd_sync_status(struct hci_dev *hdev, u16 opcode, u32 plen,
34 const void *param, u32 timeout);
35int __hci_cmd_sync_status_sk(struct hci_dev *hdev, u16 opcode, u32 plen,
36 const void *param, u8 event, u32 timeout,
37 struct sock *sk);
38
39void hci_cmd_sync_init(struct hci_dev *hdev);
40void hci_cmd_sync_clear(struct hci_dev *hdev);
41void hci_cmd_sync_cancel(struct hci_dev *hdev, int err);
42void __hci_cmd_sync_cancel(struct hci_dev *hdev, int err);
43
44int hci_cmd_sync_submit(struct hci_dev *hdev, hci_cmd_sync_work_func_t func,
45 void *data, hci_cmd_sync_work_destroy_t destroy);
46int hci_cmd_sync_queue(struct hci_dev *hdev, hci_cmd_sync_work_func_t func,
47 void *data, hci_cmd_sync_work_destroy_t destroy);
48
49int hci_update_eir_sync(struct hci_dev *hdev);
50int hci_update_class_sync(struct hci_dev *hdev);
51
52int hci_update_eir_sync(struct hci_dev *hdev);
53int hci_update_class_sync(struct hci_dev *hdev);
54int hci_update_name_sync(struct hci_dev *hdev);
55int hci_write_ssp_mode_sync(struct hci_dev *hdev, u8 mode);
56
57int hci_get_random_address(struct hci_dev *hdev, bool require_privacy,
58 bool use_rpa, struct adv_info *adv_instance,
59 u8 *own_addr_type, bdaddr_t *rand_addr);
60
61int hci_update_random_address_sync(struct hci_dev *hdev, bool require_privacy,
62 bool rpa, u8 *own_addr_type);
63
64int hci_update_scan_rsp_data_sync(struct hci_dev *hdev, u8 instance);
65int hci_update_adv_data_sync(struct hci_dev *hdev, u8 instance);
66int hci_update_adv_data(struct hci_dev *hdev, u8 instance);
67int hci_schedule_adv_instance_sync(struct hci_dev *hdev, u8 instance,
68 bool force);
69
70int hci_setup_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance);
71int hci_start_ext_adv_sync(struct hci_dev *hdev, u8 instance);
72int hci_enable_ext_advertising_sync(struct hci_dev *hdev, u8 instance);
73int hci_enable_advertising_sync(struct hci_dev *hdev);
74int hci_enable_advertising(struct hci_dev *hdev);
75
76int hci_start_per_adv_sync(struct hci_dev *hdev, u8 instance, u8 data_len,
77 u8 *data, u32 flags, u16 min_interval,
78 u16 max_interval, u16 sync_interval);
79
80int hci_remove_advertising_sync(struct hci_dev *hdev, struct sock *sk,
81 u8 instance, bool force);
82int hci_disable_advertising_sync(struct hci_dev *hdev);
83int hci_clear_adv_instance_sync(struct hci_dev *hdev, struct sock *sk,
84 u8 instance, bool force);
85int hci_update_passive_scan_sync(struct hci_dev *hdev);
86int hci_update_passive_scan(struct hci_dev *hdev);
87int hci_read_rssi_sync(struct hci_dev *hdev, __le16 handle);
88int hci_read_tx_power_sync(struct hci_dev *hdev, __le16 handle, u8 type);
89int hci_write_sc_support_sync(struct hci_dev *hdev, u8 val);
90int hci_read_clock_sync(struct hci_dev *hdev, struct hci_cp_read_clock *cp);
91
92int hci_write_fast_connectable_sync(struct hci_dev *hdev, bool enable);
93int hci_update_scan_sync(struct hci_dev *hdev);
94int hci_update_scan(struct hci_dev *hdev);
95
96int hci_write_le_host_supported_sync(struct hci_dev *hdev, u8 le, u8 simul);
97int hci_remove_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance,
98 struct sock *sk);
99int hci_remove_ext_adv_instance(struct hci_dev *hdev, u8 instance);
100struct sk_buff *hci_read_local_oob_data_sync(struct hci_dev *hdev, bool ext,
101 struct sock *sk);
102
103int hci_reset_sync(struct hci_dev *hdev);
104int hci_dev_open_sync(struct hci_dev *hdev);
105int hci_dev_close_sync(struct hci_dev *hdev);
106
107int hci_powered_update_sync(struct hci_dev *hdev);
108int hci_set_powered_sync(struct hci_dev *hdev, u8 val);
109
110int hci_update_discoverable_sync(struct hci_dev *hdev);
111int hci_update_discoverable(struct hci_dev *hdev);
112
113int hci_update_connectable_sync(struct hci_dev *hdev);
114
115int hci_start_discovery_sync(struct hci_dev *hdev);
116int hci_stop_discovery_sync(struct hci_dev *hdev);
117
118int hci_suspend_sync(struct hci_dev *hdev);
119int hci_resume_sync(struct hci_dev *hdev);
120
121struct hci_conn;
122
123int hci_abort_conn_sync(struct hci_dev *hdev, struct hci_conn *conn, u8 reason);
124
125int hci_le_create_conn_sync(struct hci_dev *hdev, struct hci_conn *conn);
126
127int hci_le_create_cis_sync(struct hci_dev *hdev, struct hci_conn *conn);
128
129int hci_le_remove_cig_sync(struct hci_dev *hdev, u8 handle);
130
131int hci_le_terminate_big_sync(struct hci_dev *hdev, u8 handle, u8 reason);
132
133int hci_le_big_terminate_sync(struct hci_dev *hdev, u8 handle);
134
135int hci_le_pa_terminate_sync(struct hci_dev *hdev, u16 handle);