Lines Matching refs:rsp
788 struct bt_att_error_rsp *rsp; in send_err_rsp() local
796 buf = bt_att_chan_create_pdu(chan, BT_ATT_OP_ERROR_RSP, sizeof(*rsp)); in send_err_rsp()
801 rsp = net_buf_add(buf, sizeof(*rsp)); in send_err_rsp()
802 rsp->request = req; in send_err_rsp()
803 rsp->handle = sys_cpu_to_le16(handle); in send_err_rsp()
804 rsp->error = err; in send_err_rsp()
812 struct bt_att_exchange_mtu_rsp *rsp; in att_mtu_req() local
843 rsp = net_buf_add(pdu, sizeof(*rsp)); in att_mtu_req()
844 rsp->mtu = sys_cpu_to_le16(mtu_server); in att_mtu_req()
964 struct bt_att_exchange_mtu_rsp *rsp; in att_mtu_rsp() local
967 rsp = (void *)buf->data; in att_mtu_rsp()
969 mtu = sys_le16_to_cpu(rsp->mtu); in att_mtu_rsp()
992 return att_handle_rsp(chan, rsp, buf->len, 0); in att_mtu_rsp()
1020 struct bt_att_find_info_rsp *rsp; member
1036 if (!data->rsp) { in find_info_cb()
1037 data->rsp = net_buf_add(data->buf, sizeof(*data->rsp)); in find_info_cb()
1038 data->rsp->format = (attr->uuid->type == BT_UUID_TYPE_16) ? in find_info_cb()
1042 switch (data->rsp->format) { in find_info_cb()
1094 if (!data.rsp) { in att_find_info_rsp()
1320 struct bt_att_read_type_rsp *rsp; member
1347 if (!data->rsp->len) { in attr_read_type_cb()
1349 data->rsp->len = read + sizeof(*data->item); in attr_read_type_cb()
1350 } else if (data->rsp->len != read + sizeof(*data->item)) { in attr_read_type_cb()
1445 if (data->rsp->len) { in read_type_cb()
1480 data->rsp->len ? BT_GATT_ITER_CONTINUE : BT_GATT_ITER_STOP; in read_type_cb()
1497 data.rsp = net_buf_add(data.buf, sizeof(*data.rsp)); in att_read_type_rsp()
1498 data.rsp->len = 0U; in att_read_type_rsp()
1623 static uint8_t att_read_rsp(struct bt_att_chan *chan, uint8_t op, uint8_t rsp, in att_read_rsp() argument
1642 data.buf = bt_att_create_rsp_pdu(chan, rsp); in att_read_rsp()
1761 struct bt_att_read_mult_vl_rsp *rsp; in read_vl_cb() local
1791 rsp = net_buf_add(data->buf, sizeof(*rsp)); in read_vl_cb()
1799 rsp->len = read; in read_vl_cb()
1858 struct bt_att_read_group_rsp *rsp; member
1867 if (!data->rsp->len) { in attr_read_group_cb()
1869 data->rsp->len = read + sizeof(*data->group); in attr_read_group_cb()
1870 } else if (data->rsp->len != read + sizeof(*data->group)) { in attr_read_group_cb()
1906 if (data->rsp->len && in read_group_cb()
1907 bt_att_mtu(chan) - data->buf->len < data->rsp->len) { in read_group_cb()
1948 data.rsp = net_buf_add(data.buf, sizeof(*data.rsp)); in att_read_group_rsp()
1949 data.rsp->len = 0U; in att_read_group_rsp()
1954 if (!data.rsp->len) { in att_read_group_rsp()
2084 static uint8_t att_write_rsp(struct bt_att_chan *chan, uint8_t req, uint8_t rsp, in att_write_rsp() argument
2105 if (rsp) { in att_write_rsp()
2106 data.buf = bt_att_chan_create_pdu(chan, rsp, 0); in att_write_rsp()
2123 if (rsp) { in att_write_rsp()
2218 struct bt_att_prepare_write_rsp *rsp; in att_prep_write_rsp() local
2260 rsp = net_buf_add(data.buf, sizeof(*rsp)); in att_prep_write_rsp()
2261 rsp->handle = sys_cpu_to_le16(handle); in att_prep_write_rsp()
2262 rsp->offset = sys_cpu_to_le16(offset); in att_prep_write_rsp()
2264 memcpy(rsp->value, value, len); in att_prep_write_rsp()
2545 struct bt_att_error_rsp *rsp; in att_error_rsp() local
2548 rsp = (void *)buf->data; in att_error_rsp()
2550 LOG_DBG("request 0x%02x handle 0x%04x error 0x%02x", rsp->request, in att_error_rsp()
2551 sys_le16_to_cpu(rsp->handle), rsp->error); in att_error_rsp()
2564 if (!chan->req || chan->req == &cancel || !rsp->error) { in att_error_rsp()
2569 err = rsp->error; in att_error_rsp()