Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003    Copyright (c) 2011,2012 Intel Corp.
0004 
0005 */
0006 
0007 #ifndef __AMP_H
0008 #define __AMP_H
0009 
0010 struct amp_ctrl {
0011     struct list_head    list;
0012     struct kref     kref;
0013     __u8            id;
0014     __u16           assoc_len_so_far;
0015     __u16           assoc_rem_len;
0016     __u16           assoc_len;
0017     __u8            *assoc;
0018 };
0019 
0020 int amp_ctrl_put(struct amp_ctrl *ctrl);
0021 void amp_ctrl_get(struct amp_ctrl *ctrl);
0022 struct amp_ctrl *amp_ctrl_add(struct amp_mgr *mgr, u8 id);
0023 struct amp_ctrl *amp_ctrl_lookup(struct amp_mgr *mgr, u8 id);
0024 void amp_ctrl_list_flush(struct amp_mgr *mgr);
0025 
0026 struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr,
0027                  u8 remote_id, bool out);
0028 
0029 int phylink_gen_key(struct hci_conn *hcon, u8 *data, u8 *len, u8 *type);
0030 
0031 void amp_read_loc_info(struct hci_dev *hdev, struct amp_mgr *mgr);
0032 void amp_read_loc_assoc_frag(struct hci_dev *hdev, u8 phy_handle);
0033 void amp_read_loc_assoc(struct hci_dev *hdev, struct amp_mgr *mgr);
0034 void amp_read_loc_assoc_final_data(struct hci_dev *hdev,
0035                    struct hci_conn *hcon);
0036 void amp_create_phylink(struct hci_dev *hdev, struct amp_mgr *mgr,
0037             struct hci_conn *hcon);
0038 void amp_accept_phylink(struct hci_dev *hdev, struct amp_mgr *mgr,
0039             struct hci_conn *hcon);
0040 
0041 #if IS_ENABLED(CONFIG_BT_HS)
0042 void amp_create_logical_link(struct l2cap_chan *chan);
0043 void amp_disconnect_logical_link(struct hci_chan *hchan);
0044 #else
0045 static inline void amp_create_logical_link(struct l2cap_chan *chan)
0046 {
0047 }
0048 
0049 static inline void amp_disconnect_logical_link(struct hci_chan *hchan)
0050 {
0051 }
0052 #endif
0053 
0054 void amp_write_remote_assoc(struct hci_dev *hdev, u8 handle);
0055 void amp_write_rem_assoc_continue(struct hci_dev *hdev, u8 handle);
0056 void amp_physical_cfm(struct hci_conn *bredr_hcon, struct hci_conn *hs_hcon);
0057 void amp_create_logical_link(struct l2cap_chan *chan);
0058 void amp_disconnect_logical_link(struct hci_chan *hchan);
0059 void amp_destroy_logical_link(struct hci_chan *hchan, u8 reason);
0060 
0061 #endif /* __AMP_H */