From 0c56d482fd20c86d4a33cc91e117fc2af96ef570 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 15 Nov 2025 14:58:29 +0200 Subject: [PATCH] shared/bap: fix packet length comparison to ATT MTU in bap_queue_req() bap_queue_req() forgot to account for ATT command headers when comparing to MTU, and fail to send if packet too big. Fix the MTU comparison. --- src/shared/bap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index b779f6716..27321a3d1 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -1730,7 +1730,7 @@ static bool bap_queue_req(struct bt_bap *bap, struct bt_bap_req *req) struct queue *queue; struct bt_att *att = bt_bap_get_att(bap); uint16_t mtu = bt_att_get_mtu(att); - uint16_t len = 2 + bap_req_len(req); + uint16_t len = 3 + 2 + bap_req_len(req); if (len > mtu) { DBG(bap, "Unable to queue request: req len %u > %u mtu", len, -- 2.47.3