Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ v2 1/2] lib: add iso_data_* macros to hci.h
@ 2026-07-10 18:12 Pauli Virtanen
  2026-07-10 18:12 ` [PATCH BlueZ v2 2/2] monitor: fix parsing of ISO packet data header and slen check Pauli Virtanen
  2026-07-10 19:42 ` [BlueZ,v2,1/2] lib: add iso_data_* macros to hci.h bluez.test.bot
  0 siblings, 2 replies; 4+ messages in thread
From: Pauli Virtanen @ 2026-07-10 18:12 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Pauli Virtanen

Add macros for parsing ISO Data Packet header items.
---

Notes:
    v2:
    - no change

 lib/bluetooth/hci.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/bluetooth/hci.h b/lib/bluetooth/hci.h
index 732477ec4..2e4aa394e 100644
--- a/lib/bluetooth/hci.h
+++ b/lib/bluetooth/hci.h
@@ -2335,6 +2335,12 @@ typedef struct {
 #define iso_flags_ts(f)		((f >> 2) & 0x0001)
 #define iso_flags_pack(pb, ts)	((pb & 0x03) | ((ts & 0x01) << 2))
 
+/* ISO data length and flags pack/unpack */
+#define iso_data_len_pack(h, f)	((__u16) (((h) & 0x0fff) | \
+						  (((f) & 0x3) << 14)))
+#define iso_data_len(h)		((h) & 0x0fff)
+#define iso_data_flags(h)	((h) >> 14)
+
 #endif /* _NO_HCI_DEFS */
 
 /* HCI Socket options */
-- 
2.55.0


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

end of thread, other threads:[~2026-07-10 19:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 18:12 [PATCH BlueZ v2 1/2] lib: add iso_data_* macros to hci.h Pauli Virtanen
2026-07-10 18:12 ` [PATCH BlueZ v2 2/2] monitor: fix parsing of ISO packet data header and slen check Pauli Virtanen
2026-07-10 19:25   ` Luiz Augusto von Dentz
2026-07-10 19:42 ` [BlueZ,v2,1/2] lib: add iso_data_* macros to hci.h 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