diff options
author | Michael Brown <mcb30@ipxe.org> | 2015-12-01 14:46:48 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2015-12-07 13:16:53 +0000 |
commit | 296dee6d38ffb9db4da79e868b741a689953246f (patch) | |
tree | 604d15e68e8c137fb26d1af300e7a2c12e9d28f6 /src/drivers/net/acm.h | |
parent | 53ba5936b5c70b030d81e8f2349d75a7264581ae (diff) | |
download | ipxe-296dee6d38ffb9db4da79e868b741a689953246f.tar.gz |
[acm] Add support for CDC-ACM (aka USB RNDIS) devices
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/acm.h')
-rw-r--r-- | src/drivers/net/acm.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/src/drivers/net/acm.h b/src/drivers/net/acm.h new file mode 100644 index 000000000..d4944967b --- /dev/null +++ b/src/drivers/net/acm.h @@ -0,0 +1,69 @@ +#ifndef _ACM_H +#define _ACM_H + +/** @file + * + * USB RNDIS Ethernet driver + * + */ + +FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); + +#include <ipxe/usb.h> +#include <ipxe/cdc.h> + +/** CDC-ACM subclass */ +#define USB_SUBCLASS_CDC_ACM 0x02 + +/** CDC-ACM RNDIS device protocol */ +#define USB_PROTOCOL_ACM_RNDIS 0xff + +/** Class code for wireless devices */ +#define USB_CLASS_WIRELESS 0xe0 + +/** Radio frequency device subclass */ +#define USB_SUBCLASS_WIRELESS_RADIO 0x01 + +/** Radio frequency RNDIS device protocol */ +#define USB_PROTOCOL_RADIO_RNDIS 0x03 + +/** A USB RNDIS network device */ +struct acm_device { + /** USB device */ + struct usb_device *usb; + /** USB bus */ + struct usb_bus *bus; + /** RNDIS device */ + struct rndis_device *rndis; + /** USB network device */ + struct usbnet_device usbnet; + + /** An encapsulated response is available */ + int responded; +}; + +/** Interrupt maximum fill level + * + * This is a policy decision. + */ +#define ACM_INTR_MAX_FILL 2 + +/** Bulk IN maximum fill level + * + * This is a policy decision. + */ +#define ACM_IN_MAX_FILL 8 + +/** Bulk IN buffer size + * + * This is a policy decision. + */ +#define ACM_IN_MTU 2048 + +/** Encapsulated response buffer size + * + * This is a policy decision. + */ +#define ACM_RESPONSE_MTU 128 + +#endif /* _ACM_H */ |