Lines Matching refs:rsp

142 	struct a2mp_discov_rsp *rsp;  in a2mp_discover_req()  local
177 len = num_ctrl * sizeof(struct a2mp_cl) + sizeof(*rsp); in a2mp_discover_req()
178 rsp = kmalloc(len, GFP_ATOMIC); in a2mp_discover_req()
179 if (!rsp) { in a2mp_discover_req()
184 rsp->mtu = cpu_to_le16(L2CAP_A2MP_DEFAULT_MTU); in a2mp_discover_req()
185 rsp->ext_feat = 0; in a2mp_discover_req()
187 __a2mp_add_cl(mgr, rsp->cl); in a2mp_discover_req()
191 a2mp_send(mgr, A2MP_DISCOVER_RSP, hdr->ident, len, rsp); in a2mp_discover_req()
193 kfree(rsp); in a2mp_discover_req()
200 struct a2mp_discov_rsp *rsp = (void *) skb->data; in a2mp_discover_rsp() local
206 if (len < sizeof(*rsp)) in a2mp_discover_rsp()
209 len -= sizeof(*rsp); in a2mp_discover_rsp()
210 skb_pull(skb, sizeof(*rsp)); in a2mp_discover_rsp()
212 ext_feat = le16_to_cpu(rsp->ext_feat); in a2mp_discover_rsp()
214 BT_DBG("mtu %d efm 0x%4.4x", le16_to_cpu(rsp->mtu), ext_feat); in a2mp_discover_rsp()
313 struct a2mp_info_rsp rsp; in a2mp_getinfo_req() local
315 rsp.id = req->id; in a2mp_getinfo_req()
316 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_getinfo_req()
318 a2mp_send(mgr, A2MP_GETINFO_RSP, hdr->ident, sizeof(rsp), in a2mp_getinfo_req()
319 &rsp); in a2mp_getinfo_req()
342 struct a2mp_info_rsp *rsp = (struct a2mp_info_rsp *) skb->data; in a2mp_getinfo_rsp() local
346 if (le16_to_cpu(hdr->len) < sizeof(*rsp)) in a2mp_getinfo_rsp()
349 BT_DBG("id %d status 0x%2.2x", rsp->id, rsp->status); in a2mp_getinfo_rsp()
351 if (rsp->status) in a2mp_getinfo_rsp()
354 ctrl = amp_ctrl_add(mgr, rsp->id); in a2mp_getinfo_rsp()
358 req.id = rsp->id; in a2mp_getinfo_rsp()
362 skb_pull(skb, sizeof(*rsp)); in a2mp_getinfo_rsp()
383 struct a2mp_amp_assoc_rsp rsp; in a2mp_getampassoc_req() local
384 rsp.id = req->id; in a2mp_getampassoc_req()
387 rsp.status = A2MP_STATUS_COLLISION_OCCURED; in a2mp_getampassoc_req()
390 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_getampassoc_req()
393 a2mp_send(mgr, A2MP_GETAMPASSOC_RSP, hdr->ident, sizeof(rsp), in a2mp_getampassoc_req()
394 &rsp); in a2mp_getampassoc_req()
412 struct a2mp_amp_assoc_rsp *rsp = (void *) skb->data; in a2mp_getampassoc_rsp() local
419 if (len < sizeof(*rsp)) in a2mp_getampassoc_rsp()
422 assoc_len = len - sizeof(*rsp); in a2mp_getampassoc_rsp()
424 BT_DBG("id %d status 0x%2.2x assoc len %zu", rsp->id, rsp->status, in a2mp_getampassoc_rsp()
427 if (rsp->status) in a2mp_getampassoc_rsp()
431 ctrl = amp_ctrl_lookup(mgr, rsp->id); in a2mp_getampassoc_rsp()
435 assoc = kmemdup(rsp->amp_assoc, assoc_len, GFP_KERNEL); in a2mp_getampassoc_rsp()
450 hdev = hci_dev_get(rsp->id); in a2mp_getampassoc_rsp()
454 hcon = phylink_add(hdev, mgr, rsp->id, true); in a2mp_getampassoc_rsp()
458 BT_DBG("Created hcon %p: loc:%d -> rem:%d", hcon, hdev->id, rsp->id); in a2mp_getampassoc_rsp()
460 mgr->bredr_chan->remote_amp_id = rsp->id; in a2mp_getampassoc_rsp()
475 struct a2mp_physlink_rsp rsp; in a2mp_createphyslink_req() local
485 rsp.local_id = req->remote_id; in a2mp_createphyslink_req()
486 rsp.remote_id = req->local_id; in a2mp_createphyslink_req()
490 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_createphyslink_req()
494 ctrl = amp_ctrl_lookup(mgr, rsp.remote_id); in a2mp_createphyslink_req()
496 ctrl = amp_ctrl_add(mgr, rsp.remote_id); in a2mp_createphyslink_req()
500 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_createphyslink_req()
526 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_createphyslink_req()
528 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_createphyslink_req()
538 if (rsp.status != A2MP_STATUS_SUCCESS) { in a2mp_createphyslink_req()
540 sizeof(rsp), &rsp); in a2mp_createphyslink_req()
554 struct a2mp_physlink_rsp rsp; in a2mp_discphyslink_req() local
563 rsp.local_id = req->remote_id; in a2mp_discphyslink_req()
564 rsp.remote_id = req->local_id; in a2mp_discphyslink_req()
565 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_discphyslink_req()
569 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_discphyslink_req()
577 rsp.status = A2MP_STATUS_NO_PHYSICAL_LINK_EXISTS; in a2mp_discphyslink_req()
587 a2mp_send(mgr, A2MP_DISCONNPHYSLINK_RSP, hdr->ident, sizeof(rsp), &rsp); in a2mp_discphyslink_req()
900 struct a2mp_info_rsp rsp; in a2mp_send_getinfo_rsp() local
908 rsp.id = hdev->id; in a2mp_send_getinfo_rsp()
909 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_send_getinfo_rsp()
912 rsp.status = 0; in a2mp_send_getinfo_rsp()
913 rsp.total_bw = cpu_to_le32(hdev->amp_total_bw); in a2mp_send_getinfo_rsp()
914 rsp.max_bw = cpu_to_le32(hdev->amp_max_bw); in a2mp_send_getinfo_rsp()
915 rsp.min_latency = cpu_to_le32(hdev->amp_min_latency); in a2mp_send_getinfo_rsp()
916 rsp.pal_cap = cpu_to_le16(hdev->amp_pal_cap); in a2mp_send_getinfo_rsp()
917 rsp.assoc_size = cpu_to_le16(hdev->amp_assoc_size); in a2mp_send_getinfo_rsp()
920 a2mp_send(mgr, A2MP_GETINFO_RSP, mgr->ident, sizeof(rsp), &rsp); in a2mp_send_getinfo_rsp()
928 struct a2mp_amp_assoc_rsp *rsp; in a2mp_send_getampassoc_rsp() local
938 rsp = kzalloc(len, GFP_KERNEL); in a2mp_send_getampassoc_rsp()
939 if (!rsp) { in a2mp_send_getampassoc_rsp()
944 rsp->id = hdev->id; in a2mp_send_getampassoc_rsp()
947 rsp->status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_send_getampassoc_rsp()
949 rsp->status = A2MP_STATUS_SUCCESS; in a2mp_send_getampassoc_rsp()
950 memcpy(rsp->amp_assoc, loc_assoc->data, loc_assoc->len); in a2mp_send_getampassoc_rsp()
953 a2mp_send(mgr, A2MP_GETAMPASSOC_RSP, mgr->ident, len, rsp); in a2mp_send_getampassoc_rsp()
955 kfree(rsp); in a2mp_send_getampassoc_rsp()
998 struct a2mp_physlink_rsp rsp; in a2mp_send_create_phy_link_rsp() local
1007 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_send_create_phy_link_rsp()
1009 rsp.remote_id = hs_hcon->remote_id; in a2mp_send_create_phy_link_rsp()
1010 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_send_create_phy_link_rsp()
1016 rsp.local_id = hdev->id; in a2mp_send_create_phy_link_rsp()
1017 a2mp_send(mgr, A2MP_CREATEPHYSLINK_RSP, mgr->ident, sizeof(rsp), &rsp); in a2mp_send_create_phy_link_rsp()