summaryrefslogtreecommitdiffstats
path: root/minadbd
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2015-01-26 22:45:16 +0100
committerAndroid Git Automerger <android-git-automerger@android.com>2015-01-26 22:45:16 +0100
commit2d67a483ede93f1d3906e1d03f46af34887764ac (patch)
tree3960c40a7c0088726883f3eab367d434d2ad01b8 /minadbd
parentam cad5ce81: Merge "adbd: Support for new f_fs descriptor format" (diff)
parentMerge "Fix the v2 descriptor handling." (diff)
downloadandroid_bootable_recovery-2d67a483ede93f1d3906e1d03f46af34887764ac.tar
android_bootable_recovery-2d67a483ede93f1d3906e1d03f46af34887764ac.tar.gz
android_bootable_recovery-2d67a483ede93f1d3906e1d03f46af34887764ac.tar.bz2
android_bootable_recovery-2d67a483ede93f1d3906e1d03f46af34887764ac.tar.lz
android_bootable_recovery-2d67a483ede93f1d3906e1d03f46af34887764ac.tar.xz
android_bootable_recovery-2d67a483ede93f1d3906e1d03f46af34887764ac.tar.zst
android_bootable_recovery-2d67a483ede93f1d3906e1d03f46af34887764ac.zip
Diffstat (limited to 'minadbd')
-rw-r--r--minadbd/usb_linux_client.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/minadbd/usb_linux_client.c b/minadbd/usb_linux_client.c
index e7d3c4854..b3a38dce5 100644
--- a/minadbd/usb_linux_client.c
+++ b/minadbd/usb_linux_client.c
@@ -69,14 +69,10 @@ struct desc_v1 {
} __attribute__((packed));
struct desc_v2 {
- struct usb_functionfs_descs_head_v2 {
- __le32 magic;
- __le32 length;
- __le32 flags;
- __le32 fs_count;
- __le32 hs_count;
- __le32 ss_count;
- } __attribute__((packed)) header;
+ struct usb_functionfs_descs_head_v2 header;
+ // The rest of the structure depends on the flags in the header.
+ __le32 fs_count;
+ __le32 hs_count;
struct func_desc fs_descs, hs_descs;
} __attribute__((packed));
@@ -304,9 +300,8 @@ static void init_functionfs(struct usb_handle *h)
v2_descriptor.header.magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC_V2);
v2_descriptor.header.length = cpu_to_le32(sizeof(v2_descriptor));
v2_descriptor.header.flags = FUNCTIONFS_HAS_FS_DESC | FUNCTIONFS_HAS_HS_DESC;
- v2_descriptor.header.fs_count = 3;
- v2_descriptor.header.hs_count = 3;
- v2_descriptor.header.ss_count = 0;
+ v2_descriptor.fs_count = 3;
+ v2_descriptor.hs_count = 3;
v2_descriptor.fs_descs = fs_descriptors;
v2_descriptor.hs_descs = hs_descriptors;