Lines Matching refs:rsp
141 struct a2mp_discov_rsp *rsp; in a2mp_discover_req() local
176 len = num_ctrl * sizeof(struct a2mp_cl) + sizeof(*rsp); in a2mp_discover_req()
177 rsp = kmalloc(len, GFP_ATOMIC); in a2mp_discover_req()
178 if (!rsp) { in a2mp_discover_req()
183 rsp->mtu = cpu_to_le16(L2CAP_A2MP_DEFAULT_MTU); in a2mp_discover_req()
184 rsp->ext_feat = 0; in a2mp_discover_req()
186 __a2mp_add_cl(mgr, rsp->cl); in a2mp_discover_req()
190 a2mp_send(mgr, A2MP_DISCOVER_RSP, hdr->ident, len, rsp); in a2mp_discover_req()
192 kfree(rsp); in a2mp_discover_req()
199 struct a2mp_discov_rsp *rsp = (void *) skb->data; in a2mp_discover_rsp() local
205 if (len < sizeof(*rsp)) in a2mp_discover_rsp()
208 len -= sizeof(*rsp); in a2mp_discover_rsp()
209 skb_pull(skb, sizeof(*rsp)); in a2mp_discover_rsp()
211 ext_feat = le16_to_cpu(rsp->ext_feat); in a2mp_discover_rsp()
213 BT_DBG("mtu %d efm 0x%4.4x", le16_to_cpu(rsp->mtu), ext_feat); in a2mp_discover_rsp()
302 struct a2mp_info_rsp rsp; in a2mp_getinfo_req() local
304 rsp.id = req->id; in a2mp_getinfo_req()
305 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_getinfo_req()
307 a2mp_send(mgr, A2MP_GETINFO_RSP, hdr->ident, sizeof(rsp), in a2mp_getinfo_req()
308 &rsp); in a2mp_getinfo_req()
327 struct a2mp_info_rsp *rsp = (struct a2mp_info_rsp *) skb->data; in a2mp_getinfo_rsp() local
331 if (le16_to_cpu(hdr->len) < sizeof(*rsp)) in a2mp_getinfo_rsp()
334 BT_DBG("id %d status 0x%2.2x", rsp->id, rsp->status); in a2mp_getinfo_rsp()
336 if (rsp->status) in a2mp_getinfo_rsp()
339 ctrl = amp_ctrl_add(mgr, rsp->id); in a2mp_getinfo_rsp()
343 req.id = rsp->id; in a2mp_getinfo_rsp()
347 skb_pull(skb, sizeof(*rsp)); in a2mp_getinfo_rsp()
368 struct a2mp_amp_assoc_rsp rsp; in a2mp_getampassoc_req() local
369 rsp.id = req->id; in a2mp_getampassoc_req()
372 rsp.status = A2MP_STATUS_COLLISION_OCCURED; in a2mp_getampassoc_req()
375 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_getampassoc_req()
378 a2mp_send(mgr, A2MP_GETAMPASSOC_RSP, hdr->ident, sizeof(rsp), in a2mp_getampassoc_req()
379 &rsp); in a2mp_getampassoc_req()
397 struct a2mp_amp_assoc_rsp *rsp = (void *) skb->data; in a2mp_getampassoc_rsp() local
404 if (len < sizeof(*rsp)) in a2mp_getampassoc_rsp()
407 assoc_len = len - sizeof(*rsp); in a2mp_getampassoc_rsp()
409 BT_DBG("id %d status 0x%2.2x assoc len %zu", rsp->id, rsp->status, in a2mp_getampassoc_rsp()
412 if (rsp->status) in a2mp_getampassoc_rsp()
416 ctrl = amp_ctrl_lookup(mgr, rsp->id); in a2mp_getampassoc_rsp()
420 assoc = kmemdup(rsp->amp_assoc, assoc_len, GFP_KERNEL); in a2mp_getampassoc_rsp()
435 hdev = hci_dev_get(rsp->id); in a2mp_getampassoc_rsp()
439 hcon = phylink_add(hdev, mgr, rsp->id, true); in a2mp_getampassoc_rsp()
443 BT_DBG("Created hcon %p: loc:%d -> rem:%d", hcon, hdev->id, rsp->id); in a2mp_getampassoc_rsp()
445 mgr->bredr_chan->remote_amp_id = rsp->id; in a2mp_getampassoc_rsp()
460 struct a2mp_physlink_rsp rsp; in a2mp_createphyslink_req() local
470 rsp.local_id = req->remote_id; in a2mp_createphyslink_req()
471 rsp.remote_id = req->local_id; in a2mp_createphyslink_req()
475 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_createphyslink_req()
479 ctrl = amp_ctrl_lookup(mgr, rsp.remote_id); in a2mp_createphyslink_req()
481 ctrl = amp_ctrl_add(mgr, rsp.remote_id); in a2mp_createphyslink_req()
485 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_createphyslink_req()
511 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_createphyslink_req()
513 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_createphyslink_req()
523 if (rsp.status != A2MP_STATUS_SUCCESS) { in a2mp_createphyslink_req()
525 sizeof(rsp), &rsp); in a2mp_createphyslink_req()
539 struct a2mp_physlink_rsp rsp; in a2mp_discphyslink_req() local
548 rsp.local_id = req->remote_id; in a2mp_discphyslink_req()
549 rsp.remote_id = req->local_id; in a2mp_discphyslink_req()
550 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_discphyslink_req()
554 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_discphyslink_req()
562 rsp.status = A2MP_STATUS_NO_PHYSICAL_LINK_EXISTS; in a2mp_discphyslink_req()
572 a2mp_send(mgr, A2MP_DISCONNPHYSLINK_RSP, hdr->ident, sizeof(rsp), &rsp); in a2mp_discphyslink_req()
885 struct a2mp_info_rsp rsp; in a2mp_send_getinfo_rsp() local
893 rsp.id = hdev->id; in a2mp_send_getinfo_rsp()
894 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_send_getinfo_rsp()
897 rsp.status = 0; in a2mp_send_getinfo_rsp()
898 rsp.total_bw = cpu_to_le32(hdev->amp_total_bw); in a2mp_send_getinfo_rsp()
899 rsp.max_bw = cpu_to_le32(hdev->amp_max_bw); in a2mp_send_getinfo_rsp()
900 rsp.min_latency = cpu_to_le32(hdev->amp_min_latency); in a2mp_send_getinfo_rsp()
901 rsp.pal_cap = cpu_to_le16(hdev->amp_pal_cap); in a2mp_send_getinfo_rsp()
902 rsp.assoc_size = cpu_to_le16(hdev->amp_assoc_size); in a2mp_send_getinfo_rsp()
905 a2mp_send(mgr, A2MP_GETINFO_RSP, mgr->ident, sizeof(rsp), &rsp); in a2mp_send_getinfo_rsp()
913 struct a2mp_amp_assoc_rsp *rsp; in a2mp_send_getampassoc_rsp() local
923 rsp = kzalloc(len, GFP_KERNEL); in a2mp_send_getampassoc_rsp()
924 if (!rsp) { in a2mp_send_getampassoc_rsp()
929 rsp->id = hdev->id; in a2mp_send_getampassoc_rsp()
932 rsp->status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_send_getampassoc_rsp()
934 rsp->status = A2MP_STATUS_SUCCESS; in a2mp_send_getampassoc_rsp()
935 memcpy(rsp->amp_assoc, loc_assoc->data, loc_assoc->len); in a2mp_send_getampassoc_rsp()
938 a2mp_send(mgr, A2MP_GETAMPASSOC_RSP, mgr->ident, len, rsp); in a2mp_send_getampassoc_rsp()
940 kfree(rsp); in a2mp_send_getampassoc_rsp()
983 struct a2mp_physlink_rsp rsp; in a2mp_send_create_phy_link_rsp() local
992 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_send_create_phy_link_rsp()
994 rsp.remote_id = hs_hcon->remote_id; in a2mp_send_create_phy_link_rsp()
995 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_send_create_phy_link_rsp()
1001 rsp.local_id = hdev->id; in a2mp_send_create_phy_link_rsp()
1002 a2mp_send(mgr, A2MP_CREATEPHYSLINK_RSP, mgr->ident, sizeof(rsp), &rsp); in a2mp_send_create_phy_link_rsp()