Lines Matching refs:hdev
112 struct hci_conn *phylink_add(struct hci_dev *hdev, struct amp_mgr *mgr, in phylink_add() argument
119 hcon = hci_conn_add(hdev, AMP_LINK, dst, role); in phylink_add()
177 struct hci_dev *hdev = conn->hdev; in phylink_gen_key() local
197 key = hci_find_link_key(hdev, &conn->dst); in phylink_gen_key()
224 static void read_local_amp_assoc_complete(struct hci_dev *hdev, u8 status, in read_local_amp_assoc_complete() argument
228 struct amp_assoc *assoc = &hdev->loc_assoc; in read_local_amp_assoc_complete()
231 BT_DBG("%s status 0x%2.2x", hdev->name, rp->status); in read_local_amp_assoc_complete()
246 amp_read_loc_assoc_frag(hdev, rp->phy_handle); in read_local_amp_assoc_complete()
257 a2mp_send_getampassoc_rsp(hdev, rp->status); in read_local_amp_assoc_complete()
258 a2mp_send_create_phy_link_req(hdev, rp->status); in read_local_amp_assoc_complete()
261 void amp_read_loc_assoc_frag(struct hci_dev *hdev, u8 phy_handle) in amp_read_loc_assoc_frag() argument
264 struct amp_assoc *loc_assoc = &hdev->loc_assoc; in amp_read_loc_assoc_frag()
268 BT_DBG("%s handle %d", hdev->name, phy_handle); in amp_read_loc_assoc_frag()
271 cp.max_len = cpu_to_le16(hdev->amp_assoc_size); in amp_read_loc_assoc_frag()
274 hci_req_init(&req, hdev); in amp_read_loc_assoc_frag()
278 a2mp_send_getampassoc_rsp(hdev, A2MP_STATUS_INVALID_CTRL_ID); in amp_read_loc_assoc_frag()
281 void amp_read_loc_assoc(struct hci_dev *hdev, struct amp_mgr *mgr) in amp_read_loc_assoc() argument
287 memset(&hdev->loc_assoc, 0, sizeof(struct amp_assoc)); in amp_read_loc_assoc()
290 cp.max_len = cpu_to_le16(hdev->amp_assoc_size); in amp_read_loc_assoc()
293 hci_req_init(&req, hdev); in amp_read_loc_assoc()
297 a2mp_send_getampassoc_rsp(hdev, A2MP_STATUS_INVALID_CTRL_ID); in amp_read_loc_assoc()
300 void amp_read_loc_assoc_final_data(struct hci_dev *hdev, in amp_read_loc_assoc_final_data() argument
310 cp.max_len = cpu_to_le16(hdev->amp_assoc_size); in amp_read_loc_assoc_final_data()
315 hci_req_init(&req, hdev); in amp_read_loc_assoc_final_data()
319 a2mp_send_getampassoc_rsp(hdev, A2MP_STATUS_INVALID_CTRL_ID); in amp_read_loc_assoc_final_data()
322 static void write_remote_amp_assoc_complete(struct hci_dev *hdev, u8 status, in write_remote_amp_assoc_complete() argument
328 hdev->name, rp->status, rp->phy_handle); in write_remote_amp_assoc_complete()
333 amp_write_rem_assoc_continue(hdev, rp->phy_handle); in write_remote_amp_assoc_complete()
337 static bool amp_write_rem_assoc_frag(struct hci_dev *hdev, in amp_write_rem_assoc_frag() argument
381 hci_req_init(&req, hdev); in amp_write_rem_assoc_frag()
390 void amp_write_rem_assoc_continue(struct hci_dev *hdev, u8 handle) in amp_write_rem_assoc_continue() argument
394 BT_DBG("%s phy handle 0x%2.2x", hdev->name, handle); in amp_write_rem_assoc_continue()
396 hcon = hci_conn_hash_lookup_handle(hdev, handle); in amp_write_rem_assoc_continue()
401 if (amp_write_rem_assoc_frag(hdev, hcon)) in amp_write_rem_assoc_continue()
402 a2mp_send_create_phy_link_rsp(hdev, 0); in amp_write_rem_assoc_continue()
405 void amp_write_remote_assoc(struct hci_dev *hdev, u8 handle) in amp_write_remote_assoc() argument
409 BT_DBG("%s phy handle 0x%2.2x", hdev->name, handle); in amp_write_remote_assoc()
411 hcon = hci_conn_hash_lookup_handle(hdev, handle); in amp_write_remote_assoc()
415 BT_DBG("%s phy handle 0x%2.2x hcon %p", hdev->name, handle, hcon); in amp_write_remote_assoc()
417 amp_write_rem_assoc_frag(hdev, hcon); in amp_write_remote_assoc()
420 static void create_phylink_complete(struct hci_dev *hdev, u8 status, in create_phylink_complete() argument
425 BT_DBG("%s status 0x%2.2x", hdev->name, status); in create_phylink_complete()
427 cp = hci_sent_cmd_data(hdev, HCI_OP_CREATE_PHY_LINK); in create_phylink_complete()
431 hci_dev_lock(hdev); in create_phylink_complete()
436 hcon = hci_conn_hash_lookup_handle(hdev, cp->phy_handle); in create_phylink_complete()
440 amp_write_remote_assoc(hdev, cp->phy_handle); in create_phylink_complete()
443 hci_dev_unlock(hdev); in create_phylink_complete()
446 void amp_create_phylink(struct hci_dev *hdev, struct amp_mgr *mgr, in amp_create_phylink() argument
454 BT_DBG("%s hcon %p phy handle 0x%2.2x", hdev->name, hcon, in amp_create_phylink()
463 hci_req_init(&req, hdev); in amp_create_phylink()
468 static void accept_phylink_complete(struct hci_dev *hdev, u8 status, in accept_phylink_complete() argument
473 BT_DBG("%s status 0x%2.2x", hdev->name, status); in accept_phylink_complete()
478 cp = hci_sent_cmd_data(hdev, HCI_OP_ACCEPT_PHY_LINK); in accept_phylink_complete()
482 amp_write_remote_assoc(hdev, cp->phy_handle); in accept_phylink_complete()
485 void amp_accept_phylink(struct hci_dev *hdev, struct amp_mgr *mgr, in amp_accept_phylink() argument
493 BT_DBG("%s hcon %p phy handle 0x%2.2x", hdev->name, hcon, in amp_accept_phylink()
502 hci_req_init(&req, hdev); in amp_accept_phylink()
509 struct hci_dev *bredr_hdev = hci_dev_hold(bredr_hcon->hdev); in amp_physical_cfm()
524 bredr_chan->local_amp_id = hs_hcon->hdev->id; in amp_physical_cfm()
526 bredr_chan->conn->mtu = hs_hcon->hdev->block_mtu; in amp_physical_cfm()
539 struct hci_dev *hdev; in amp_create_logical_link() local
547 hdev = hci_dev_hold(chan->hs_hcon->hdev); in amp_create_logical_link()
548 if (!hdev) in amp_create_logical_link()
568 hci_send_cmd(hdev, HCI_OP_CREATE_LOGICAL_LINK, sizeof(cp), in amp_create_logical_link()
571 hci_send_cmd(hdev, HCI_OP_ACCEPT_LOGICAL_LINK, sizeof(cp), in amp_create_logical_link()
574 hci_dev_put(hdev); in amp_create_logical_link()
588 hci_send_cmd(hcon->hdev, HCI_OP_DISCONN_LOGICAL_LINK, sizeof(cp), &cp); in amp_disconnect_logical_link()