usb.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (c) 2011 Broadcom Corporation
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  11. * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  13. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #ifndef BRCMFMAC_USB_H
  17. #define BRCMFMAC_USB_H
  18. enum brcmf_usb_state {
  19. BRCMFMAC_USB_STATE_DOWN,
  20. BRCMFMAC_USB_STATE_DL_FAIL,
  21. BRCMFMAC_USB_STATE_DL_DONE,
  22. BRCMFMAC_USB_STATE_UP,
  23. BRCMFMAC_USB_STATE_SLEEP
  24. };
  25. struct brcmf_stats {
  26. u32 tx_ctlpkts;
  27. u32 tx_ctlerrs;
  28. u32 rx_ctlpkts;
  29. u32 rx_ctlerrs;
  30. };
  31. struct brcmf_usbdev {
  32. struct brcmf_bus *bus;
  33. struct brcmf_usbdev_info *devinfo;
  34. enum brcmf_usb_state state;
  35. struct brcmf_stats stats;
  36. int ntxq, nrxq, rxsize;
  37. u32 bus_mtu;
  38. int devid;
  39. int chiprev; /* chip revsion number */
  40. };
  41. /* IO Request Block (IRB) */
  42. struct brcmf_usbreq {
  43. struct list_head list;
  44. struct brcmf_usbdev_info *devinfo;
  45. struct urb *urb;
  46. struct sk_buff *skb;
  47. };
  48. #endif /* BRCMFMAC_USB_H */