You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

acm.h 1.2KB

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