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