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()
309 struct a2mp_info_rsp rsp; in a2mp_getinfo_req() local
311 memset(&rsp, 0, sizeof(rsp)); in a2mp_getinfo_req()
313 rsp.id = req->id; in a2mp_getinfo_req()
314 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_getinfo_req()
316 a2mp_send(mgr, A2MP_GETINFO_RSP, hdr->ident, sizeof(rsp), in a2mp_getinfo_req()
317 &rsp); in a2mp_getinfo_req()
340 struct a2mp_info_rsp *rsp = (struct a2mp_info_rsp *) skb->data; in a2mp_getinfo_rsp() local
344 if (le16_to_cpu(hdr->len) < sizeof(*rsp)) in a2mp_getinfo_rsp()
347 BT_DBG("id %d status 0x%2.2x", rsp->id, rsp->status); in a2mp_getinfo_rsp()
349 if (rsp->status) in a2mp_getinfo_rsp()
352 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
385 memset(&rsp, 0, sizeof(rsp)); in a2mp_getampassoc_req()
386 rsp.id = req->id; in a2mp_getampassoc_req()
389 rsp.status = A2MP_STATUS_COLLISION_OCCURED; in a2mp_getampassoc_req()
392 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_getampassoc_req()
395 a2mp_send(mgr, A2MP_GETAMPASSOC_RSP, hdr->ident, sizeof(rsp), in a2mp_getampassoc_req()
396 &rsp); in a2mp_getampassoc_req()
414 struct a2mp_amp_assoc_rsp *rsp = (void *) skb->data; in a2mp_getampassoc_rsp() local
421 if (len < sizeof(*rsp)) in a2mp_getampassoc_rsp()
424 assoc_len = len - sizeof(*rsp); in a2mp_getampassoc_rsp()
426 BT_DBG("id %d status 0x%2.2x assoc len %zu", rsp->id, rsp->status, in a2mp_getampassoc_rsp()
429 if (rsp->status) in a2mp_getampassoc_rsp()
433 ctrl = amp_ctrl_lookup(mgr, rsp->id); in a2mp_getampassoc_rsp()
437 assoc = kmemdup(rsp->amp_assoc, assoc_len, GFP_KERNEL); in a2mp_getampassoc_rsp()
452 hdev = hci_dev_get(rsp->id); in a2mp_getampassoc_rsp()
456 hcon = phylink_add(hdev, mgr, rsp->id, true); in a2mp_getampassoc_rsp()
460 BT_DBG("Created hcon %p: loc:%d -> rem:%d", hcon, hdev->id, rsp->id); in a2mp_getampassoc_rsp()
462 mgr->bredr_chan->remote_amp_id = rsp->id; in a2mp_getampassoc_rsp()
476 struct a2mp_physlink_rsp rsp; in a2mp_createphyslink_req() local
486 memset(&rsp, 0, sizeof(rsp)); in a2mp_createphyslink_req()
488 rsp.local_id = req->remote_id; in a2mp_createphyslink_req()
489 rsp.remote_id = req->local_id; in a2mp_createphyslink_req()
493 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_createphyslink_req()
497 ctrl = amp_ctrl_lookup(mgr, rsp.remote_id); in a2mp_createphyslink_req()
499 ctrl = amp_ctrl_add(mgr, rsp.remote_id); in a2mp_createphyslink_req()
503 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_createphyslink_req()
530 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_createphyslink_req()
532 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_createphyslink_req()
542 if (rsp.status != A2MP_STATUS_SUCCESS) { in a2mp_createphyslink_req()
544 sizeof(rsp), &rsp); in a2mp_createphyslink_req()
558 struct a2mp_physlink_rsp rsp; in a2mp_discphyslink_req() local
567 memset(&rsp, 0, sizeof(rsp)); in a2mp_discphyslink_req()
569 rsp.local_id = req->remote_id; in a2mp_discphyslink_req()
570 rsp.remote_id = req->local_id; in a2mp_discphyslink_req()
571 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_discphyslink_req()
575 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_discphyslink_req()
583 rsp.status = A2MP_STATUS_NO_PHYSICAL_LINK_EXISTS; in a2mp_discphyslink_req()
593 a2mp_send(mgr, A2MP_DISCONNPHYSLINK_RSP, hdr->ident, sizeof(rsp), &rsp); in a2mp_discphyslink_req()
908 struct a2mp_info_rsp rsp; in a2mp_send_getinfo_rsp() local
916 memset(&rsp, 0, sizeof(rsp)); in a2mp_send_getinfo_rsp()
918 rsp.id = hdev->id; in a2mp_send_getinfo_rsp()
919 rsp.status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_send_getinfo_rsp()
922 rsp.status = 0; in a2mp_send_getinfo_rsp()
923 rsp.total_bw = cpu_to_le32(hdev->amp_total_bw); in a2mp_send_getinfo_rsp()
924 rsp.max_bw = cpu_to_le32(hdev->amp_max_bw); in a2mp_send_getinfo_rsp()
925 rsp.min_latency = cpu_to_le32(hdev->amp_min_latency); in a2mp_send_getinfo_rsp()
926 rsp.pal_cap = cpu_to_le16(hdev->amp_pal_cap); in a2mp_send_getinfo_rsp()
927 rsp.assoc_size = cpu_to_le16(hdev->amp_assoc_size); in a2mp_send_getinfo_rsp()
930 a2mp_send(mgr, A2MP_GETINFO_RSP, mgr->ident, sizeof(rsp), &rsp); in a2mp_send_getinfo_rsp()
938 struct a2mp_amp_assoc_rsp *rsp; in a2mp_send_getampassoc_rsp() local
948 rsp = kzalloc(len, GFP_KERNEL); in a2mp_send_getampassoc_rsp()
949 if (!rsp) { in a2mp_send_getampassoc_rsp()
954 rsp->id = hdev->id; in a2mp_send_getampassoc_rsp()
957 rsp->status = A2MP_STATUS_INVALID_CTRL_ID; in a2mp_send_getampassoc_rsp()
959 rsp->status = A2MP_STATUS_SUCCESS; in a2mp_send_getampassoc_rsp()
960 memcpy(rsp->amp_assoc, loc_assoc->data, loc_assoc->len); in a2mp_send_getampassoc_rsp()
963 a2mp_send(mgr, A2MP_GETAMPASSOC_RSP, mgr->ident, len, rsp); in a2mp_send_getampassoc_rsp()
965 kfree(rsp); in a2mp_send_getampassoc_rsp()
1008 struct a2mp_physlink_rsp rsp; in a2mp_send_create_phy_link_rsp() local
1015 memset(&rsp, 0, sizeof(rsp)); in a2mp_send_create_phy_link_rsp()
1019 rsp.status = A2MP_STATUS_UNABLE_START_LINK_CREATION; in a2mp_send_create_phy_link_rsp()
1021 rsp.remote_id = hs_hcon->remote_id; in a2mp_send_create_phy_link_rsp()
1022 rsp.status = A2MP_STATUS_SUCCESS; in a2mp_send_create_phy_link_rsp()
1028 rsp.local_id = hdev->id; in a2mp_send_create_phy_link_rsp()
1029 a2mp_send(mgr, A2MP_CREATEPHYSLINK_RSP, mgr->ident, sizeof(rsp), &rsp); in a2mp_send_create_phy_link_rsp()