From 2ee7df52f44d2c64b20f9430cda5b1c1538fa036 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 31 Jul 2015 14:25:21 +0300 Subject: [PATCH] Bluetooth: ATT: Handle Execute Write response This adds the callback necessary to parse Execute Write response PDU: < ACL Data TX: Handle 3585 flags 0x00 dlen 6 ATT: Execute Write Request (0x18) len 1 Flags: Immediately write all pending values (0x01) > ACL Data RX: Handle 3585 flags 0x02 dlen 5 ATT: Execute Write Response (0x19) len 0 Change-Id: Ida1f73021097628bd5e60faa007441db9b92a38d Signed-off-by: Luiz Augusto von Dentz --- net/bluetooth/att.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/net/bluetooth/att.c b/net/bluetooth/att.c index 89b9913fed1..baab6534f0a 100644 --- a/net/bluetooth/att.c +++ b/net/bluetooth/att.c @@ -1258,6 +1258,14 @@ static uint8_t att_handle_prepare_write_rsp(struct bt_conn *conn, return att_handle_rsp(conn, buf->data, buf->len, 0); } +static uint8_t att_handle_exec_write_rsp(struct bt_conn *conn, + struct bt_buf *buf) +{ + BT_DBG("\n"); + + return att_handle_rsp(conn, buf->data, buf->len, 0); +} + static uint8_t att_notify(struct bt_conn *conn, struct bt_buf *buf) { uint16_t handle; @@ -1317,6 +1325,7 @@ static const struct { sizeof(struct bt_att_prepare_write_rsp) }, { BT_ATT_OP_EXEC_WRITE_REQ, att_exec_write_req, sizeof(struct bt_att_exec_write_req) }, + { BT_ATT_OP_EXEC_WRITE_RSP, att_handle_exec_write_rsp, 0 }, { BT_ATT_OP_NOTIFY, att_notify, sizeof(struct bt_att_notify) }, { BT_ATT_OP_WRITE_CMD, att_write_cmd,