usb.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * Atheros AR9170 USB driver
  3. *
  4. * Driver specific definitions
  5. *
  6. * Copyright 2008, Johannes Berg <johannes@sipsolutions.net>
  7. * Copyright 2009, Christian Lamparter <chunkeey@web.de>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License
  20. * along with this program; see the file COPYING. If not, see
  21. * http://www.gnu.org/licenses/.
  22. *
  23. * This file incorporates work covered by the following copyright and
  24. * permission notice:
  25. * Copyright (c) 2007-2008 Atheros Communications, Inc.
  26. *
  27. * Permission to use, copy, modify, and/or distribute this software for any
  28. * purpose with or without fee is hereby granted, provided that the above
  29. * copyright notice and this permission notice appear in all copies.
  30. *
  31. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  32. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  33. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  34. * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  35. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
  36. * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  37. * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  38. */
  39. #ifndef __USB_H
  40. #define __USB_H
  41. #include <linux/usb.h>
  42. #include <linux/completion.h>
  43. #include <linux/spinlock.h>
  44. #include <linux/leds.h>
  45. #include <net/wireless.h>
  46. #include <net/mac80211.h>
  47. #include <linux/firmware.h>
  48. #include "eeprom.h"
  49. #include "hw.h"
  50. #include "ar9170.h"
  51. #define AR9170_NUM_RX_URBS 16
  52. struct firmware;
  53. struct ar9170_usb {
  54. struct ar9170 common;
  55. struct usb_device *udev;
  56. struct usb_interface *intf;
  57. struct usb_anchor rx_submitted;
  58. struct usb_anchor tx_submitted;
  59. spinlock_t cmdlock;
  60. struct completion cmd_wait;
  61. int readlen;
  62. u8 *readbuf;
  63. const struct firmware *init_values;
  64. const struct firmware *firmware;
  65. };
  66. #endif /* __USB_H */