Diff between 809db88e92767272ba1999e6e7e81e0a219627fc and e6f2ce8a05a76538cadc8e7477f400fce03d095a

Changed Files

File Additions Deletions Status
src/shared/att.c +8 -1 modified

Full Patch

diff --git a/src/shared/att.c b/src/shared/att.c
index 665d7f4..3294977 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -411,10 +411,17 @@ static struct att_send_op *pick_next_send_op(struct bt_att_chan *chan)
 	 */
 	if (!chan->pending_req) {
 		op = queue_peek_head(att->req_queue);
-		if (op && op->len <= chan->mtu)
+		if (op && op->len <= chan->mtu) {
+			/* Don't send Exchange MTU over EATT */
+			if (op->opcode == BT_ATT_OP_MTU_REQ &&
+					chan->type == BT_ATT_EATT)
+				goto indicate;
+
 			return queue_pop_head(att->req_queue);
+		}
 	}
 
+indicate:
 	/* There is either a request pending or no requests queued. If there is
 	 * no pending indication, pick an operation from the indication queue.
 	 */