Bluetooth: ATT: Handle Read response
This adds function handler for Read Response PDU which call the request callback: < ACL Data TX: Handle 3585 flags 0x00 dlen 7 ATT: Read Request (0x0a) len 2 Handle: 0x0010 > ACL Data RX: Handle 3585 flags 0x02 dlen 10 ATT: Read Response (0x0b) len 5 Value: 081100392a Change-Id: I68de7c7bcd62e5697669b9ddb9403e8ccd1b470c Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
776196d879
commit
a02df0f64a
1 changed files with 10 additions and 0 deletions
|
@ -1217,6 +1217,14 @@ static uint8_t att_handle_read_type_rsp(struct bt_conn *conn,
|
||||||
return att_handle_rsp(conn, buf->data, buf->len, 0);
|
return att_handle_rsp(conn, buf->data, buf->len, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static uint8_t att_handle_read_rsp(struct bt_conn *conn,
|
||||||
|
struct bt_buf *buf)
|
||||||
|
{
|
||||||
|
BT_DBG("\n");
|
||||||
|
|
||||||
|
return att_handle_rsp(conn, buf->data, buf->len, 0);
|
||||||
|
}
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
uint8_t op;
|
uint8_t op;
|
||||||
uint8_t (*func)(struct bt_conn *conn, struct bt_buf *buf);
|
uint8_t (*func)(struct bt_conn *conn, struct bt_buf *buf);
|
||||||
|
@ -1242,6 +1250,8 @@ static const struct {
|
||||||
sizeof(struct bt_att_read_type_rsp) },
|
sizeof(struct bt_att_read_type_rsp) },
|
||||||
{ BT_ATT_OP_READ_REQ, att_read_req,
|
{ BT_ATT_OP_READ_REQ, att_read_req,
|
||||||
sizeof(struct bt_att_read_req) },
|
sizeof(struct bt_att_read_req) },
|
||||||
|
{ BT_ATT_OP_READ_RSP, att_handle_read_rsp,
|
||||||
|
sizeof(struct bt_att_read_rsp) },
|
||||||
{ BT_ATT_OP_READ_BLOB_REQ, att_read_blob_req,
|
{ BT_ATT_OP_READ_BLOB_REQ, att_read_blob_req,
|
||||||
sizeof(struct bt_att_read_blob_req) },
|
sizeof(struct bt_att_read_blob_req) },
|
||||||
{ BT_ATT_OP_READ_MULT_REQ, att_read_mult_req,
|
{ BT_ATT_OP_READ_MULT_REQ, att_read_mult_req,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue