Lines Matching refs:rsp_buf
269 struct net_buf *rsp_buf; in avdtp_discover_handler() local
278 rsp_buf = in avdtp_discover_handler()
281 if (!rsp_buf) { in avdtp_discover_handler()
290 net_buf_add_u8(rsp_buf, error_code); in avdtp_discover_handler()
300 net_buf_add_mem(rsp_buf, &sep_data, sizeof(sep_data)); in avdtp_discover_handler()
304 err = bt_l2cap_chan_send(&session->br_chan.chan, rsp_buf); in avdtp_discover_handler()
306 net_buf_unref(rsp_buf); in avdtp_discover_handler()
360 struct net_buf *rsp_buf; in avdtp_get_capabilities_handler() local
368 rsp_buf = in avdtp_get_capabilities_handler()
371 if (!rsp_buf) { in avdtp_get_capabilities_handler()
374 err = session->ops->get_capabilities_ind(session, sep, rsp_buf, in avdtp_get_capabilities_handler()
377 net_buf_unref(rsp_buf); in avdtp_get_capabilities_handler()
382 rsp_buf = in avdtp_get_capabilities_handler()
385 if (!rsp_buf) { in avdtp_get_capabilities_handler()
393 net_buf_add_u8(rsp_buf, error_code); in avdtp_get_capabilities_handler()
396 err = bt_l2cap_chan_send(&session->br_chan.chan, rsp_buf); in avdtp_get_capabilities_handler()
398 net_buf_unref(rsp_buf); in avdtp_get_capabilities_handler()
429 struct net_buf *rsp_buf; in avdtp_process_configuration() local
472 rsp_buf = avdtp_create_reply_pdu( in avdtp_process_configuration()
475 if (!rsp_buf) { in avdtp_process_configuration()
486 net_buf_add_u8(rsp_buf, BT_AVDTP_SERVICE_MEDIA_CODEC); in avdtp_process_configuration()
488 net_buf_add_u8(rsp_buf, 0); in avdtp_process_configuration()
490 net_buf_add_u8(rsp_buf, error_code); in avdtp_process_configuration()
493 ret = bt_l2cap_chan_send(&session->br_chan.chan, rsp_buf); in avdtp_process_configuration()
495 net_buf_unref(rsp_buf); in avdtp_process_configuration()
539 struct net_buf *rsp_buf; in avdtp_get_configuration_handler() local
542 rsp_buf = avdtp_create_reply_pdu(BT_AVDTP_REJECT, BT_AVDTP_PACKET_TYPE_SINGLE, in avdtp_get_configuration_handler()
544 if (!rsp_buf) { in avdtp_get_configuration_handler()
549 err = bt_l2cap_chan_send(&session->br_chan.chan, rsp_buf); in avdtp_get_configuration_handler()
551 net_buf_unref(rsp_buf); in avdtp_get_configuration_handler()
570 struct net_buf *rsp_buf; in avdtp_open_handler() local
586 rsp_buf = avdtp_create_reply_pdu(err ? BT_AVDTP_REJECT : BT_AVDTP_ACCEPT, in avdtp_open_handler()
588 if (!rsp_buf) { in avdtp_open_handler()
598 net_buf_add_u8(rsp_buf, error_code); in avdtp_open_handler()
603 ret = bt_l2cap_chan_send(&session->br_chan.chan, rsp_buf); in avdtp_open_handler()
605 net_buf_unref(rsp_buf); in avdtp_open_handler()
644 struct net_buf *rsp_buf; in avdtp_start_handler() local
660 rsp_buf = avdtp_create_reply_pdu(err ? BT_AVDTP_REJECT : BT_AVDTP_ACCEPT, in avdtp_start_handler()
662 if (!rsp_buf) { in avdtp_start_handler()
672 net_buf_add_u8(rsp_buf, error_code); in avdtp_start_handler()
675 ret = bt_l2cap_chan_send(&session->br_chan.chan, rsp_buf); in avdtp_start_handler()
677 net_buf_unref(rsp_buf); in avdtp_start_handler()
718 struct net_buf *rsp_buf; in avdtp_close_handler() local
734 rsp_buf = avdtp_create_reply_pdu(err ? BT_AVDTP_REJECT : BT_AVDTP_ACCEPT, in avdtp_close_handler()
736 if (!rsp_buf) { in avdtp_close_handler()
746 net_buf_add_u8(rsp_buf, error_code); in avdtp_close_handler()
751 ret = bt_l2cap_chan_send(&session->br_chan.chan, rsp_buf); in avdtp_close_handler()
753 net_buf_unref(rsp_buf); in avdtp_close_handler()
788 struct net_buf *rsp_buf; in avdtp_suspend_handler() local
804 rsp_buf = in avdtp_suspend_handler()
807 if (!rsp_buf) { in avdtp_suspend_handler()
817 net_buf_add_u8(rsp_buf, error_code); in avdtp_suspend_handler()
820 ret = bt_l2cap_chan_send(&session->br_chan.chan, rsp_buf); in avdtp_suspend_handler()
822 net_buf_unref(rsp_buf); in avdtp_suspend_handler()
863 struct net_buf *rsp_buf; in avdtp_abort_handler() local
875 rsp_buf = avdtp_create_reply_pdu(err ? BT_AVDTP_REJECT : BT_AVDTP_ACCEPT, in avdtp_abort_handler()
877 if (!rsp_buf) { in avdtp_abort_handler()
887 net_buf_add_u8(rsp_buf, error_code); in avdtp_abort_handler()
890 ret = bt_l2cap_chan_send(&session->br_chan.chan, rsp_buf); in avdtp_abort_handler()
892 net_buf_unref(rsp_buf); in avdtp_abort_handler()
1103 struct net_buf *rsp_buf; in bt_avdtp_l2cap_recv() local
1110 rsp_buf = avdtp_create_reply_pdu(BT_AVDTP_REJECT, in bt_avdtp_l2cap_recv()
1112 if (!rsp_buf) { in bt_avdtp_l2cap_recv()
1116 err = bt_l2cap_chan_send(&session->br_chan.chan, rsp_buf); in bt_avdtp_l2cap_recv()
1118 net_buf_unref(rsp_buf); in bt_avdtp_l2cap_recv()