1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef __AMP_H
15#define __AMP_H
16
17struct amp_ctrl {
18 struct list_head list;
19 struct kref kref;
20 __u8 id;
21 __u16 assoc_len_so_far;
22 __u16 assoc_rem_len;
23 __u16 assoc_len;
24 __u8 *assoc;
25};
26
27int amp_ctrl_put(struct amp_ctrl *ctrl);
28void amp_ctrl_get(struct amp_ctrl *ctrl);
29struct amp_ctrl *amp_ctrl_add(struct amp_mgr *mgr, u8 id);
30struct amp_ctrl *amp_ctrl_lookup(struct amp_mgr *mgr, u8 id);
31void amp_ctrl_list_flush(struct amp_mgr *mgr);
32
33struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr,
34 u8 remote_id, bool out);
35
36int phylink_gen_key(struct hci_conn *hcon, u8 *data, u8 *len, u8 *type);
37
38void amp_read_loc_info(struct hci_dev *hdev, struct amp_mgr *mgr);
39void amp_read_loc_assoc_frag(struct hci_dev *hdev, u8 phy_handle);
40void amp_read_loc_assoc(struct hci_dev *hdev, struct amp_mgr *mgr);
41void amp_read_loc_assoc_final_data(struct hci_dev *hdev,
42 struct hci_conn *hcon);
43void amp_create_phylink(struct hci_dev *hdev, struct amp_mgr *mgr,
44 struct hci_conn *hcon);
45void amp_accept_phylink(struct hci_dev *hdev, struct amp_mgr *mgr,
46 struct hci_conn *hcon);
47
48#if IS_ENABLED(CONFIG_BT_HS)
49void amp_create_logical_link(struct l2cap_chan *chan);
50void amp_disconnect_logical_link(struct hci_chan *hchan);
51#else
52static inline void amp_create_logical_link(struct l2cap_chan *chan)
53{
54}
55
56static inline void amp_disconnect_logical_link(struct hci_chan *hchan)
57{
58}
59#endif
60
61void amp_write_remote_assoc(struct hci_dev *hdev, u8 handle);
62void amp_write_rem_assoc_continue(struct hci_dev *hdev, u8 handle);
63void amp_physical_cfm(struct hci_conn *bredr_hcon, struct hci_conn *hs_hcon);
64void amp_create_logical_link(struct l2cap_chan *chan);
65void amp_disconnect_logical_link(struct hci_chan *hchan);
66void amp_destroy_logical_link(struct hci_chan *hchan, u8 reason);
67
68#endif
69