mirror of
https://github.com/ipxe/ipxe
synced 2025-12-26 09:32:33 +03:00
[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>
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user