iPXE
acm.h
Go to the documentation of this file.
1 #ifndef _ACM_H
2 #define _ACM_H
3 
4 /** @file
5  *
6  * USB RNDIS Ethernet driver
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 #include <ipxe/usb.h>
13 #include <ipxe/cdc.h>
14 
15 /** CDC-ACM subclass */
16 #define USB_SUBCLASS_CDC_ACM 0x02
17 
18 /** CDC-ACM RNDIS device protocol */
19 #define USB_PROTOCOL_ACM_RNDIS 0xff
20 
21 /** Class code for wireless devices */
22 #define USB_CLASS_WIRELESS 0xe0
23 
24 /** Radio frequency device subclass */
25 #define USB_SUBCLASS_WIRELESS_RADIO 0x01
26 
27 /** Radio frequency RNDIS device protocol */
28 #define USB_PROTOCOL_RADIO_RNDIS 0x03
29 
30 /** A USB RNDIS network device */
31 struct acm_device {
32  /** USB device */
33  struct usb_device *usb;
34  /** USB bus */
35  struct usb_bus *bus;
36  /** RNDIS device */
38  /** USB network device */
40 
41  /** An encapsulated response is available */
42  int responded;
43 };
44 
45 /** Interrupt maximum fill level
46  *
47  * This is a policy decision.
48  */
49 #define ACM_INTR_MAX_FILL 2
50 
51 /** Bulk IN maximum fill level
52  *
53  * This is a policy decision.
54  */
55 #define ACM_IN_MAX_FILL 8
56 
57 /** Bulk IN buffer size
58  *
59  * This is a policy decision.
60  */
61 #define ACM_IN_MTU 2048
62 
63 /** Encapsulated response buffer size
64  *
65  * This is a policy decision.
66  */
67 #define ACM_RESPONSE_MTU 128
68 
69 #endif /* _ACM_H */
struct usb_bus * bus
USB bus.
Definition: acm.h:35
struct usbnet_device usbnet
USB network device.
Definition: acm.h:39
int responded
An encapsulated response is available.
Definition: acm.h:42
An RNDIS device.
Definition: rndis.h:317
struct usb_device * usb
USB device.
Definition: acm.h:33
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
A USB device.
Definition: usb.h:708
A USB network device.
Definition: usbnet.h:15
A USB RNDIS network device.
Definition: acm.h:31
Universal Serial Bus (USB)
USB Communications Device Class (CDC)
A USB bus.
Definition: usb.h:951
struct rndis_device * rndis
RNDIS device.
Definition: acm.h:37