Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/2] shared/bap: Don't fail an ASE CP write with an unknown opcode
@ 2026-11-24 13:31 Simon Mikuda
  2026-11-24 13:31 ` [PATCH BlueZ 2/2] unit/test-bap: Add test for an unknown ASE CP opcode Simon Mikuda
  2026-11-24 20:38 ` [BlueZ,1/2] shared/bap: Don't fail an ASE CP write with an unknown opcode bluez.test.bot
  0 siblings, 2 replies; 3+ messages in thread
From: Simon Mikuda @ 2026-11-24 13:31 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Simon Mikuda

A write of an unknown opcode to the ASE Control Point is answered with
an Unsupported Opcode notification, but the write itself still fails
with Request Not Supported, as ret keeps its initial value. The other
Control Point errors, such as a truncated or zero ASEs write, are only
reported in the notification and the write succeeds, so do the same
for an unknown opcode.

Fixes: b798cec4ca62 ("shared/bap: Add initial code for handling BAP")
Assisted-by: Claude:claude-opus-5-5
---
 src/shared/bap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/shared/bap.c b/src/shared/bap.c
index 8fc28de52..e17e9cb60 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -4171,6 +4171,7 @@ static void ascs_ase_cp_write(struct gatt_db_attribute *attrib,
 	} else {
 		DBG(bap, "Unknown opcode 0x%02x", hdr->op);
 		ascs_ase_rsp_add_errno(rsp, 0x00, -ENOTSUP);
+		ret = 0;
 	}
 
 respond:

base-commit: 1608f836188610aabeff5a3164169ebe0360e443
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-24 20:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-24 13:31 [PATCH BlueZ 1/2] shared/bap: Don't fail an ASE CP write with an unknown opcode Simon Mikuda
2026-11-24 13:31 ` [PATCH BlueZ 2/2] unit/test-bap: Add test for an unknown ASE CP opcode Simon Mikuda
2026-11-24 20:38 ` [BlueZ,1/2] shared/bap: Don't fail an ASE CP write with an unknown opcode bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox