Lines Matching refs:rsp

135 	struct a2mp_discov_rsp *rsp;  in a2mp_discover_req()  local
170 len = struct_size(rsp, cl, num_ctrl); in a2mp_discover_req()
171 rsp = kmalloc(len, GFP_ATOMIC); in a2mp_discover_req()
172 if (!rsp) { in a2mp_discover_req()
177 rsp->mtu = cpu_to_le16(L2CAP_A2MP_DEFAULT_MTU); in a2mp_discover_req()
178 rsp->ext_feat = 0; in a2mp_discover_req()
180 __a2mp_add_cl(mgr, rsp->cl); in a2mp_discover_req()
184 a2mp_send(mgr, A2MP_DISCOVER_RSP, hdr->ident, len, rsp); in a2mp_discover_req()
186 kfree(rsp); in a2mp_discover_req()
193 struct a2mp_discov_rsp *rsp = (void *) skb->data; in a2mp_discover_rsp() local
199 if (len < sizeof(*rsp)) in a2mp_discover_rsp()
202 len -= sizeof(*rsp); in a2mp_discover_rsp()
203 skb_pull(skb, sizeof(*rsp)); in a2mp_discover_rsp()
205 ext_feat = le16_to_cpu(rsp->ext_feat); in a2mp_discover_rsp()
207 BT_DBG("mtu %d efm 0x%4.4x", le16_to_cpu(rsp->mtu), ext_feat); in a2mp_discover_rsp()
306 struct a2mp_info_rsp rsp; in a2mp_getinfo_req() local
308 rsp.id = req->id; in a2mp_getinfo_req()
309 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_getinfo_req()
311 a2mp_send(mgr, A2MP_GETINFO_RSP, hdr->ident, sizeof(rsp), in a2mp_getinfo_req()
312 &rsp); in a2mp_getinfo_req()
335 struct a2mp_info_rsp *rsp = (struct a2mp_info_rsp *) skb->data; in a2mp_getinfo_rsp() local
339 if (le16_to_cpu(hdr->len) < sizeof(*rsp)) in a2mp_getinfo_rsp()
342 BT_DBG("id %d status 0x%2.2x", rsp->id, rsp->status); in a2mp_getinfo_rsp()
344 if (rsp->status) in a2mp_getinfo_rsp()
347 ctrl = amp_ctrl_add(mgr, rsp->id); in a2mp_getinfo_rsp()
351 req.id = rsp->id; in a2mp_getinfo_rsp()
355 skb_pull(skb, sizeof(*rsp)); in a2mp_getinfo_rsp()
376 struct a2mp_amp_assoc_rsp rsp; in a2mp_getampassoc_req() local
377 rsp.id = req->id; in a2mp_getampassoc_req()
380 rsp.status = A2MP_STATUS_COLLISION_OCCURED; in a2mp_getampassoc_req()
383 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_getampassoc_req()
386 a2mp_send(mgr, A2MP_GETAMPASSOC_RSP, hdr->ident, sizeof(rsp), in a2mp_getampassoc_req()
387 &rsp); in a2mp_getampassoc_req()
405 struct a2mp_amp_assoc_rsp *rsp = (void *) skb->data; in a2mp_getampassoc_rsp() local
412 if (len < sizeof(*rsp)) in a2mp_getampassoc_rsp()
415 assoc_len = len - sizeof(*rsp); in a2mp_getampassoc_rsp()
417 BT_DBG("id %d status 0x%2.2x assoc len %zu", rsp->id, rsp->status, in a2mp_getampassoc_rsp()
420 if (rsp->status) in a2mp_getampassoc_rsp()
424 ctrl = amp_ctrl_lookup(mgr, rsp->id); in a2mp_getampassoc_rsp()
428 assoc = kmemdup(rsp->amp_assoc, assoc_len, GFP_KERNEL); in a2mp_getampassoc_rsp()
443 hdev = hci_dev_get(rsp->id); in a2mp_getampassoc_rsp()
447 hcon = phylink_add(hdev, mgr, rsp->id, true); in a2mp_getampassoc_rsp()
451 BT_DBG("Created hcon %p: loc:%d -> rem:%d", hcon, hdev->id, rsp->id); in a2mp_getampassoc_rsp()
453 mgr->bredr_chan->remote_amp_id = rsp->id; in a2mp_getampassoc_rsp()
468 struct a2mp_physlink_rsp rsp; in a2mp_createphyslink_req() local
478 rsp.local_id = req->remote_id; in a2mp_createphyslink_req()
479 rsp.remote_id = req->local_id; in a2mp_createphyslink_req()
483 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_createphyslink_req()
487 ctrl = amp_ctrl_lookup(mgr, rsp.remote_id); in a2mp_createphyslink_req()
489 ctrl = amp_ctrl_add(mgr, rsp.remote_id); in a2mp_createphyslink_req()
493 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_createphyslink_req()
519 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_createphyslink_req()
521 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_createphyslink_req()
531 if (rsp.status != A2MP_STATUS_SUCCESS) { in a2mp_createphyslink_req()
533 sizeof(rsp), &rsp); in a2mp_createphyslink_req()
547 struct a2mp_physlink_rsp rsp; in a2mp_discphyslink_req() local
556 rsp.local_id = req->remote_id; in a2mp_discphyslink_req()
557 rsp.remote_id = req->local_id; in a2mp_discphyslink_req()
558 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_discphyslink_req()
562 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_discphyslink_req()
570 rsp.status = A2MP_STATUS_NO_PHYSICAL_LINK_EXISTS; in a2mp_discphyslink_req()
580 a2mp_send(mgr, A2MP_DISCONNPHYSLINK_RSP, hdr->ident, sizeof(rsp), &rsp); in a2mp_discphyslink_req()
893 struct a2mp_info_rsp rsp; in a2mp_send_getinfo_rsp() local
901 rsp.id = hdev->id; in a2mp_send_getinfo_rsp()
902 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_send_getinfo_rsp()
905 rsp.status = 0; in a2mp_send_getinfo_rsp()
906 rsp.total_bw = cpu_to_le32(hdev->amp_total_bw); in a2mp_send_getinfo_rsp()
907 rsp.max_bw = cpu_to_le32(hdev->amp_max_bw); in a2mp_send_getinfo_rsp()
908 rsp.min_latency = cpu_to_le32(hdev->amp_min_latency); in a2mp_send_getinfo_rsp()
909 rsp.pal_cap = cpu_to_le16(hdev->amp_pal_cap); in a2mp_send_getinfo_rsp()
910 rsp.assoc_size = cpu_to_le16(hdev->amp_assoc_size); in a2mp_send_getinfo_rsp()
913 a2mp_send(mgr, A2MP_GETINFO_RSP, mgr->ident, sizeof(rsp), &rsp); in a2mp_send_getinfo_rsp()
921 struct a2mp_amp_assoc_rsp *rsp; in a2mp_send_getampassoc_rsp() local
931 rsp = kzalloc(len, GFP_KERNEL); in a2mp_send_getampassoc_rsp()
932 if (!rsp) { in a2mp_send_getampassoc_rsp()
937 rsp->id = hdev->id; in a2mp_send_getampassoc_rsp()
940 rsp->status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_send_getampassoc_rsp()
942 rsp->status = A2MP_STATUS_SUCCESS; in a2mp_send_getampassoc_rsp()
943 memcpy(rsp->amp_assoc, loc_assoc->data, loc_assoc->len); in a2mp_send_getampassoc_rsp()
946 a2mp_send(mgr, A2MP_GETAMPASSOC_RSP, mgr->ident, len, rsp); in a2mp_send_getampassoc_rsp()
948 kfree(rsp); in a2mp_send_getampassoc_rsp()
991 struct a2mp_physlink_rsp rsp; in a2mp_send_create_phy_link_rsp() local
1000 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_send_create_phy_link_rsp()
1002 rsp.remote_id = hs_hcon->remote_id; in a2mp_send_create_phy_link_rsp()
1003 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_send_create_phy_link_rsp()
1009 rsp.local_id = hdev->id; in a2mp_send_create_phy_link_rsp()
1010 a2mp_send(mgr, A2MP_CREATEPHYSLINK_RSP, mgr->ident, sizeof(rsp), &rsp); in a2mp_send_create_phy_link_rsp()