summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/cdc.h
diff options
context:
space:
mode:
authorMichael Brown2015-02-09 17:33:49 +0100
committerMichael Brown2015-02-09 17:34:55 +0100
commitcf153f60a54b4706225f6326dc65b9343148c9f3 (patch)
tree7b395ac183c2d63895bae1cd83718301e78f8060 /src/include/ipxe/cdc.h
parent[usb] Try multiple USB device configurations (diff)
downloadipxe-cf153f60a54b4706225f6326dc65b9343148c9f3.tar.gz
ipxe-cf153f60a54b4706225f6326dc65b9343148c9f3.tar.xz
ipxe-cf153f60a54b4706225f6326dc65b9343148c9f3.zip
[usb] Handle CDC union functional descriptors
USB Communications Device Class devices may use a union functional descriptor to group several interfaces into a function. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/cdc.h')
-rw-r--r--src/include/ipxe/cdc.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/include/ipxe/cdc.h b/src/include/ipxe/cdc.h
index 2eec598a..929a6a65 100644
--- a/src/include/ipxe/cdc.h
+++ b/src/include/ipxe/cdc.h
@@ -14,6 +14,19 @@ FILE_LICENCE ( GPL2_OR_LATER );
/** Class code for communications devices */
#define USB_CLASS_CDC 2
+/** Union functional descriptor */
+struct cdc_union_descriptor {
+ /** Descriptor header */
+ struct usb_descriptor_header header;
+ /** Descriptor subtype */
+ uint8_t subtype;
+ /** Interfaces (variable-length) */
+ uint8_t interface[1];
+} __attribute__ (( packed ));
+
+/** Union functional descriptor subtype */
+#define CDC_SUBTYPE_UNION 6
+
/** Ethernet descriptor subtype */
#define CDC_SUBTYPE_ETHERNET 15
@@ -35,4 +48,8 @@ struct cdc_connection_speed_change {
uint32_t up;
} __attribute__ (( packed ));
+extern struct cdc_union_descriptor *
+cdc_union_descriptor ( struct usb_configuration_descriptor *config,
+ struct usb_interface_descriptor *interface );
+
#endif /* _IPXE_CDC_H */