Thread (5 messages) 5 messages, 3 authors, 2012-01-05

[PATCH] Correct structures for AMP Assoc Read

flat view
STALE5411d

From: Emeltchenko Andrei <hidden>
Date: 2011-12-15 09:48:03
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

From: Andrei Emeltchenko <redacted>

Make struct names similar to kernel and remove static array since
fragment length can be other size than HCI_MAX_NAME_LENGTH, which
is for totally different purpose.
---
 lib/hci.h |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/lib/hci.h b/lib/hci.h
index 51184ee..48692fa 100644
--- a/lib/hci.h
+++ b/lib/hci.h
@@ -1382,17 +1382,16 @@ typedef struct {
 #define OCF_READ_LOCAL_AMP_ASSOC	0x000A
 typedef struct {
 	uint8_t		handle;
-	uint16_t	length_so_far;
-	uint16_t	assoc_length;
+	uint16_t	len_so_far;
+	uint16_t	max_len;
 } __attribute__ ((packed)) read_local_amp_assoc_cp;
-#define READ_LOCAL_AMP_ASSOC_CP_SIZE 5
+
 typedef struct {
 	uint8_t		status;
 	uint8_t		handle;
-	uint16_t	length;
-	uint8_t		fragment[HCI_MAX_NAME_LENGTH];
+	uint16_t	rem_len;
+	uint8_t		frag[0];
 } __attribute__ ((packed)) read_local_amp_assoc_rp;
-#define READ_LOCAL_AMP_ASSOC_RP_SIZE 252
 
 #define OCF_WRITE_REMOTE_AMP_ASSOC	0x000B
 typedef struct {
-- 
1.7.4.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help