InterfaceAdapter.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. #ifndef _INTERFACE_ADAPTER_H
  2. #define _INTERFACE_ADAPTER_H
  3. struct bcm_bulk_endpoint_in {
  4. char *bulk_in_buffer;
  5. size_t bulk_in_size;
  6. unsigned char bulk_in_endpointAddr;
  7. unsigned int bulk_in_pipe;
  8. };
  9. struct bcm_bulk_endpoint_out {
  10. unsigned char bulk_out_buffer;
  11. size_t bulk_out_size;
  12. unsigned char bulk_out_endpointAddr;
  13. unsigned int bulk_out_pipe;
  14. /* this is used when int out endpoint is used as bulk out end point */
  15. unsigned char int_out_interval;
  16. };
  17. struct bcm_intr_endpoint_in {
  18. char *int_in_buffer;
  19. size_t int_in_size;
  20. unsigned char int_in_endpointAddr;
  21. unsigned char int_in_interval;
  22. unsigned int int_in_pipe;
  23. };
  24. struct bcm_intr_endpoint_out {
  25. char *int_out_buffer;
  26. size_t int_out_size;
  27. unsigned char int_out_endpointAddr;
  28. unsigned char int_out_interval;
  29. unsigned int int_out_pipe;
  30. };
  31. struct bcm_usb_tcb {
  32. struct urb *urb;
  33. void *psIntfAdapter;
  34. bool bUsed;
  35. };
  36. struct bcm_usb_rcb {
  37. struct urb *urb;
  38. void *psIntfAdapter;
  39. bool bUsed;
  40. };
  41. /*
  42. * This is the interface specific Sub-Adapter
  43. * Structure.
  44. */
  45. struct bcm_interface_adapter {
  46. struct usb_device *udev;
  47. struct usb_interface *interface;
  48. /* Bulk endpoint in info */
  49. struct bcm_bulk_endpoint_in sBulkIn;
  50. /* Bulk endpoint out info */
  51. struct bcm_bulk_endpoint_out sBulkOut;
  52. /* Interrupt endpoint in info */
  53. struct bcm_intr_endpoint_in sIntrIn;
  54. /* Interrupt endpoint out info */
  55. struct bcm_intr_endpoint_out sIntrOut;
  56. unsigned long ulInterruptData[2];
  57. struct urb *psInterruptUrb;
  58. struct bcm_usb_tcb asUsbTcb[MAXIMUM_USB_TCB];
  59. struct bcm_usb_rcb asUsbRcb[MAXIMUM_USB_RCB];
  60. atomic_t uNumTcbUsed;
  61. atomic_t uCurrTcb;
  62. atomic_t uNumRcbUsed;
  63. atomic_t uCurrRcb;
  64. struct bcm_mini_adapter *psAdapter;
  65. bool bFlashBoot;
  66. bool bHighSpeedDevice;
  67. bool bSuspended;
  68. bool bPreparingForBusSuspend;
  69. struct work_struct usbSuspendWork;
  70. };
  71. #endif