Merge branch 'x86-hyperv-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / net / bluetooth / amp.h
CommitLineData
97fb5e8d 1/* SPDX-License-Identifier: GPL-2.0-only */
903e4541
AE
2/*
3 Copyright (c) 2011,2012 Intel Corp.
4
903e4541
AE
5*/
6
7#ifndef __AMP_H
8#define __AMP_H
9
52c0d6e5
AE
10struct amp_ctrl {
11 struct list_head list;
12 struct kref kref;
13 __u8 id;
14 __u16 assoc_len_so_far;
15 __u16 assoc_rem_len;
16 __u16 assoc_len;
17 __u8 *assoc;
18};
19
20int amp_ctrl_put(struct amp_ctrl *ctrl);
0b26ab9d 21void amp_ctrl_get(struct amp_ctrl *ctrl);
fa4ebc66 22struct amp_ctrl *amp_ctrl_add(struct amp_mgr *mgr, u8 id);
52c0d6e5
AE
23struct amp_ctrl *amp_ctrl_lookup(struct amp_mgr *mgr, u8 id);
24void amp_ctrl_list_flush(struct amp_mgr *mgr);
25
3161ae1c 26struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr,
a0c234fe 27 u8 remote_id, bool out);
3161ae1c 28
5a349186
AE
29int phylink_gen_key(struct hci_conn *hcon, u8 *data, u8 *len, u8 *type);
30
903e4541
AE
31void amp_read_loc_info(struct hci_dev *hdev, struct amp_mgr *mgr);
32void amp_read_loc_assoc_frag(struct hci_dev *hdev, u8 phy_handle);
33void amp_read_loc_assoc(struct hci_dev *hdev, struct amp_mgr *mgr);
9495b2ee
AE
34void amp_read_loc_assoc_final_data(struct hci_dev *hdev,
35 struct hci_conn *hcon);
a02226d6
AE
36void amp_create_phylink(struct hci_dev *hdev, struct amp_mgr *mgr,
37 struct hci_conn *hcon);
dffa3871
AE
38void amp_accept_phylink(struct hci_dev *hdev, struct amp_mgr *mgr,
39 struct hci_conn *hcon);
244bc377
AW
40
41#if IS_ENABLED(CONFIG_BT_HS)
42void amp_create_logical_link(struct l2cap_chan *chan);
43void amp_disconnect_logical_link(struct hci_chan *hchan);
44#else
45static inline void amp_create_logical_link(struct l2cap_chan *chan)
46{
47}
48
49static inline void amp_disconnect_logical_link(struct hci_chan *hchan)
50{
51}
52#endif
53
93c284ee
AE
54void amp_write_remote_assoc(struct hci_dev *hdev, u8 handle);
55void amp_write_rem_assoc_continue(struct hci_dev *hdev, u8 handle);
cf70ff22 56void amp_physical_cfm(struct hci_conn *bredr_hcon, struct hci_conn *hs_hcon);
5ce66b59 57void amp_create_logical_link(struct l2cap_chan *chan);
419e08c1 58void amp_disconnect_logical_link(struct hci_chan *hchan);
606e2a10 59void amp_destroy_logical_link(struct hci_chan *hchan, u8 reason);
903e4541
AE
60
61#endif /* __AMP_H */