iPXE
acm.h
Go to the documentation of this file.
00001 #ifndef _ACM_H
00002 #define _ACM_H
00003 
00004 /** @file
00005  *
00006  * USB RNDIS Ethernet driver
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00011 
00012 #include <ipxe/usb.h>
00013 #include <ipxe/cdc.h>
00014 
00015 /** CDC-ACM subclass */
00016 #define USB_SUBCLASS_CDC_ACM 0x02
00017 
00018 /** CDC-ACM RNDIS device protocol */
00019 #define USB_PROTOCOL_ACM_RNDIS 0xff
00020 
00021 /** Class code for wireless devices */
00022 #define USB_CLASS_WIRELESS 0xe0
00023 
00024 /** Radio frequency device subclass */
00025 #define USB_SUBCLASS_WIRELESS_RADIO 0x01
00026 
00027 /** Radio frequency RNDIS device protocol */
00028 #define USB_PROTOCOL_RADIO_RNDIS 0x03
00029 
00030 /** A USB RNDIS network device */
00031 struct acm_device {
00032         /** USB device */
00033         struct usb_device *usb;
00034         /** USB bus */
00035         struct usb_bus *bus;
00036         /** RNDIS device */
00037         struct rndis_device *rndis;
00038         /** USB network device */
00039         struct usbnet_device usbnet;
00040 
00041         /** An encapsulated response is available */
00042         int responded;
00043 };
00044 
00045 /** Interrupt maximum fill level
00046  *
00047  * This is a policy decision.
00048  */
00049 #define ACM_INTR_MAX_FILL 2
00050 
00051 /** Bulk IN maximum fill level
00052  *
00053  * This is a policy decision.
00054  */
00055 #define ACM_IN_MAX_FILL 8
00056 
00057 /** Bulk IN buffer size
00058  *
00059  * This is a policy decision.
00060  */
00061 #define ACM_IN_MTU 2048
00062 
00063 /** Encapsulated response buffer size
00064  *
00065  * This is a policy decision.
00066  */
00067 #define ACM_RESPONSE_MTU 128
00068 
00069 #endif /* _ACM_H */