Diff between 1573ebb8525cfe2b687c3a6d2bbbdd5cc06c44f0 and c05c743254e1afa765123c2a69f46e75bbe632c6

Changed Files

File Additions Deletions Status
android/avctp.c +0 -4 modified
android/avctp.h +5 -1 modified

Full Patch

diff --git a/android/avctp.c b/android/avctp.c
index be3fed1..a70ed52 100644
--- a/android/avctp.c
+++ b/android/avctp.c
@@ -76,7 +76,6 @@ struct avctp_header {
 	uint8_t transaction:4;
 	uint16_t pid;
 } __attribute__ ((packed));
-#define AVCTP_HEADER_LENGTH 3
 
 struct avc_header {
 	uint8_t code:4;
@@ -85,7 +84,6 @@ struct avc_header {
 	uint8_t subunit_type:5;
 	uint8_t opcode;
 } __attribute__ ((packed));
-#define AVC_HEADER_LENGTH 3
 
 #elif __BYTE_ORDER == __BIG_ENDIAN
 
@@ -96,7 +94,6 @@ struct avctp_header {
 	uint8_t ipid:1;
 	uint16_t pid;
 } __attribute__ ((packed));
-#define AVCTP_HEADER_LENGTH 3
 
 struct avc_header {
 	uint8_t _hdr0:4;
@@ -105,7 +102,6 @@ struct avc_header {
 	uint8_t subunit_id:3;
 	uint8_t opcode;
 } __attribute__ ((packed));
-#define AVC_HEADER_LENGTH 3
 
 #else
 #error "Unknown byte order"
diff --git a/android/avctp.h b/android/avctp.h
index 2b33858..f0da2b3 100644
--- a/android/avctp.h
+++ b/android/avctp.h
@@ -25,7 +25,11 @@
 #define AVCTP_CONTROL_PSM		23
 #define AVCTP_BROWSING_PSM		27
 
-#define AVC_MTU 512
+#define AVCTP_HEADER_LENGTH		3
+#define AVC_HEADER_LENGTH		3
+
+#define AVC_DATA_OFFSET			AVCTP_HEADER_LENGTH + AVC_HEADER_LENGTH
+#define AVC_DATA_MTU			512
 
 /* ctype entries */
 #define AVC_CTYPE_CONTROL		0x0