Lines Matching refs:mgr
43 struct amp_ctrl *amp_ctrl_add(struct amp_mgr *mgr, u8 id) in amp_ctrl_add() argument
54 mutex_lock(&mgr->amp_ctrls_lock); in amp_ctrl_add()
55 list_add(&ctrl->list, &mgr->amp_ctrls); in amp_ctrl_add()
56 mutex_unlock(&mgr->amp_ctrls_lock); in amp_ctrl_add()
58 BT_DBG("mgr %p ctrl %p", mgr, ctrl); in amp_ctrl_add()
63 void amp_ctrl_list_flush(struct amp_mgr *mgr) in amp_ctrl_list_flush() argument
67 BT_DBG("mgr %p", mgr); in amp_ctrl_list_flush()
69 mutex_lock(&mgr->amp_ctrls_lock); in amp_ctrl_list_flush()
70 list_for_each_entry_safe(ctrl, n, &mgr->amp_ctrls, list) { in amp_ctrl_list_flush()
74 mutex_unlock(&mgr->amp_ctrls_lock); in amp_ctrl_list_flush()
77 struct amp_ctrl *amp_ctrl_lookup(struct amp_mgr *mgr, u8 id) in amp_ctrl_lookup() argument
81 BT_DBG("mgr %p id %d", mgr, id); in amp_ctrl_lookup()
83 mutex_lock(&mgr->amp_ctrls_lock); in amp_ctrl_lookup()
84 list_for_each_entry(ctrl, &mgr->amp_ctrls, list) { in amp_ctrl_lookup()
87 mutex_unlock(&mgr->amp_ctrls_lock); in amp_ctrl_lookup()
91 mutex_unlock(&mgr->amp_ctrls_lock); in amp_ctrl_lookup()
97 static u8 __next_handle(struct amp_mgr *mgr) in __next_handle() argument
99 if (++mgr->handle == 0) in __next_handle()
100 mgr->handle = 1; in __next_handle()
102 return mgr->handle; in __next_handle()
105 struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr, in phylink_add() argument
108 bdaddr_t *dst = &mgr->l2cap_conn->hcon->dst; in phylink_add()
120 hcon->handle = __next_handle(mgr); in phylink_add()
122 hcon->amp_mgr = amp_mgr_get(mgr); in phylink_add()
273 void amp_read_loc_assoc(struct hci_dev *hdev, struct amp_mgr *mgr) in amp_read_loc_assoc() argument
284 set_bit(READ_LOC_AMP_ASSOC, &mgr->state); in amp_read_loc_assoc()
296 struct amp_mgr *mgr = hcon->amp_mgr; in amp_read_loc_assoc_final_data() local
300 if (!mgr) in amp_read_loc_assoc_final_data()
307 set_bit(READ_LOC_AMP_ASSOC_FINAL, &mgr->state); in amp_read_loc_assoc_final_data()
336 struct amp_mgr *mgr = hcon->amp_mgr; in amp_write_rem_assoc_frag() local
341 ctrl = amp_ctrl_lookup(mgr, hcon->remote_id); in amp_write_rem_assoc_frag()
441 void amp_create_phylink(struct hci_dev *hdev, struct amp_mgr *mgr, in amp_create_phylink() argument
452 if (phylink_gen_key(mgr->l2cap_conn->hcon, cp.key, &cp.key_len, in amp_create_phylink()
480 void amp_accept_phylink(struct hci_dev *hdev, struct amp_mgr *mgr, in amp_accept_phylink() argument
491 if (phylink_gen_key(mgr->l2cap_conn->hcon, cp.key, &cp.key_len, in amp_accept_phylink()
505 struct amp_mgr *mgr = hs_hcon->amp_mgr; in amp_physical_cfm() local
508 BT_DBG("bredr_hcon %p hs_hcon %p mgr %p", bredr_hcon, hs_hcon, mgr); in amp_physical_cfm()
510 if (!bredr_hdev || !mgr || !mgr->bredr_chan) in amp_physical_cfm()
513 bredr_chan = mgr->bredr_chan; in amp_physical_cfm()