Bluetooth: ATT: Handle Write response
This adds function handler for Write Response PDU which call the request callback: < ACL Data TX: Handle 3585 flags 0x00 dlen 8 ATT: Write Request (0x12) len 3 Handle: 0x0011 Data: 01 > ACL Data RX: Handle 3585 flags 0x02 dlen 5 ATT: Write Response (0x13) len 0 Change-Id: Iea323bc37044822de034f92c8f9ef1d43276ec86 Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
parent
08230f691c
commit
0b28dbfc19
1 changed files with 9 additions and 0 deletions
|
@ -1241,6 +1241,14 @@ static uint8_t att_handle_read_mult_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_write_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);
|
||||||
|
@ -1280,6 +1288,7 @@ static const struct {
|
||||||
sizeof(struct bt_att_read_group_req) },
|
sizeof(struct bt_att_read_group_req) },
|
||||||
{ BT_ATT_OP_WRITE_REQ, att_write_req,
|
{ BT_ATT_OP_WRITE_REQ, att_write_req,
|
||||||
sizeof(struct bt_att_write_req) },
|
sizeof(struct bt_att_write_req) },
|
||||||
|
{ BT_ATT_OP_WRITE_RSP, att_handle_write_rsp, 0 },
|
||||||
{ BT_ATT_OP_PREPARE_WRITE_REQ, att_prepare_write_req,
|
{ BT_ATT_OP_PREPARE_WRITE_REQ, att_prepare_write_req,
|
||||||
sizeof(struct bt_att_prepare_write_req) },
|
sizeof(struct bt_att_prepare_write_req) },
|
||||||
{ BT_ATT_OP_EXEC_WRITE_REQ, att_exec_write_req,
|
{ BT_ATT_OP_EXEC_WRITE_REQ, att_exec_write_req,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue