amp.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. Copyright (c) 2011,2012 Intel Corp.
  4. */
  5. #ifndef __AMP_H
  6. #define __AMP_H
  7. struct amp_ctrl {
  8. struct list_head list;
  9. struct kref kref;
  10. __u8 id;
  11. __u16 assoc_len_so_far;
  12. __u16 assoc_rem_len;
  13. __u16 assoc_len;
  14. __u8 *assoc;
  15. };
  16. int amp_ctrl_put(struct amp_ctrl *ctrl);
  17. void amp_ctrl_get(struct amp_ctrl *ctrl);
  18. struct amp_ctrl *amp_ctrl_add(struct amp_mgr *mgr, u8 id);
  19. struct amp_ctrl *amp_ctrl_lookup(struct amp_mgr *mgr, u8 id);
  20. void amp_ctrl_list_flush(struct amp_mgr *mgr);
  21. struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr,
  22. u8 remote_id, bool out);
  23. int phylink_gen_key(struct hci_conn *hcon, u8 *data, u8 *len, u8 *type);
  24. void amp_read_loc_info(struct hci_dev *hdev, struct amp_mgr *mgr);
  25. void amp_read_loc_assoc_frag(struct hci_dev *hdev, u8 phy_handle);
  26. void amp_read_loc_assoc(struct hci_dev *hdev, struct amp_mgr *mgr);
  27. void amp_read_loc_assoc_final_data(struct hci_dev *hdev,
  28. struct hci_conn *hcon);
  29. void amp_create_phylink(struct hci_dev *hdev, struct amp_mgr *mgr,
  30. struct hci_conn *hcon);
  31. void amp_accept_phylink(struct hci_dev *hdev, struct amp_mgr *mgr,
  32. struct hci_conn *hcon);
  33. #if IS_ENABLED(CONFIG_BT_HS)
  34. void amp_create_logical_link(struct l2cap_chan *chan);
  35. void amp_disconnect_logical_link(struct hci_chan *hchan);
  36. #else
  37. static inline void amp_create_logical_link(struct l2cap_chan *chan)
  38. {
  39. }
  40. static inline void amp_disconnect_logical_link(struct hci_chan *hchan)
  41. {
  42. }
  43. #endif
  44. void amp_write_remote_assoc(struct hci_dev *hdev, u8 handle);
  45. void amp_write_rem_assoc_continue(struct hci_dev *hdev, u8 handle);
  46. void amp_physical_cfm(struct hci_conn *bredr_hcon, struct hci_conn *hs_hcon);
  47. void amp_create_logical_link(struct l2cap_chan *chan);
  48. void amp_disconnect_logical_link(struct hci_chan *hchan);
  49. void amp_destroy_logical_link(struct hci_chan *hchan, u8 reason);
  50. #endif /* __AMP_H */