rt2x00usb.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. /*
  2. Copyright (C) 2004 - 2008 rt2x00 SourceForge Project
  3. <http://rt2x00.serialmonkey.com>
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the
  14. Free Software Foundation, Inc.,
  15. 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  16. */
  17. /*
  18. Module: rt2x00usb
  19. Abstract: rt2x00 generic usb device routines.
  20. */
  21. #include <linux/kernel.h>
  22. #include <linux/module.h>
  23. #include <linux/usb.h>
  24. #include <linux/bug.h>
  25. #include "rt2x00.h"
  26. #include "rt2x00usb.h"
  27. /*
  28. * Interfacing with the HW.
  29. */
  30. int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,
  31. const u8 request, const u8 requesttype,
  32. const u16 offset, const u16 value,
  33. void *buffer, const u16 buffer_length,
  34. const int timeout)
  35. {
  36. struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
  37. int status;
  38. unsigned int i;
  39. unsigned int pipe =
  40. (requesttype == USB_VENDOR_REQUEST_IN) ?
  41. usb_rcvctrlpipe(usb_dev, 0) : usb_sndctrlpipe(usb_dev, 0);
  42. for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
  43. status = usb_control_msg(usb_dev, pipe, request, requesttype,
  44. value, offset, buffer, buffer_length,
  45. timeout);
  46. if (status >= 0)
  47. return 0;
  48. /*
  49. * Check for errors
  50. * -ENODEV: Device has disappeared, no point continuing.
  51. * All other errors: Try again.
  52. */
  53. else if (status == -ENODEV)
  54. break;
  55. }
  56. ERROR(rt2x00dev,
  57. "Vendor Request 0x%02x failed for offset 0x%04x with error %d.\n",
  58. request, offset, status);
  59. return status;
  60. }
  61. EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request);
  62. int rt2x00usb_vendor_req_buff_lock(struct rt2x00_dev *rt2x00dev,
  63. const u8 request, const u8 requesttype,
  64. const u16 offset, void *buffer,
  65. const u16 buffer_length, const int timeout)
  66. {
  67. int status;
  68. BUG_ON(!mutex_is_locked(&rt2x00dev->usb_cache_mutex));
  69. /*
  70. * Check for Cache availability.
  71. */
  72. if (unlikely(!rt2x00dev->csr.cache || buffer_length > CSR_CACHE_SIZE)) {
  73. ERROR(rt2x00dev, "CSR cache not available.\n");
  74. return -ENOMEM;
  75. }
  76. if (requesttype == USB_VENDOR_REQUEST_OUT)
  77. memcpy(rt2x00dev->csr.cache, buffer, buffer_length);
  78. status = rt2x00usb_vendor_request(rt2x00dev, request, requesttype,
  79. offset, 0, rt2x00dev->csr.cache,
  80. buffer_length, timeout);
  81. if (!status && requesttype == USB_VENDOR_REQUEST_IN)
  82. memcpy(buffer, rt2x00dev->csr.cache, buffer_length);
  83. return status;
  84. }
  85. EXPORT_SYMBOL_GPL(rt2x00usb_vendor_req_buff_lock);
  86. int rt2x00usb_vendor_request_buff(struct rt2x00_dev *rt2x00dev,
  87. const u8 request, const u8 requesttype,
  88. const u16 offset, void *buffer,
  89. const u16 buffer_length, const int timeout)
  90. {
  91. int status;
  92. mutex_lock(&rt2x00dev->usb_cache_mutex);
  93. status = rt2x00usb_vendor_req_buff_lock(rt2x00dev, request,
  94. requesttype, offset, buffer,
  95. buffer_length, timeout);
  96. mutex_unlock(&rt2x00dev->usb_cache_mutex);
  97. return status;
  98. }
  99. EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_buff);
  100. int rt2x00usb_vendor_request_large_buff(struct rt2x00_dev *rt2x00dev,
  101. const u8 request, const u8 requesttype,
  102. const u16 offset, const void *buffer,
  103. const u16 buffer_length,
  104. const int timeout)
  105. {
  106. int status = 0;
  107. unsigned char *tb;
  108. u16 off, len, bsize;
  109. mutex_lock(&rt2x00dev->usb_cache_mutex);
  110. tb = (char *)buffer;
  111. off = offset;
  112. len = buffer_length;
  113. while (len && !status) {
  114. bsize = min_t(u16, CSR_CACHE_SIZE, len);
  115. status = rt2x00usb_vendor_req_buff_lock(rt2x00dev, request,
  116. requesttype, off, tb,
  117. bsize, timeout);
  118. tb += bsize;
  119. len -= bsize;
  120. off += bsize;
  121. }
  122. mutex_unlock(&rt2x00dev->usb_cache_mutex);
  123. return status;
  124. }
  125. EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_large_buff);
  126. /*
  127. * TX data handlers.
  128. */
  129. static void rt2x00usb_interrupt_txdone(struct urb *urb)
  130. {
  131. struct queue_entry *entry = (struct queue_entry *)urb->context;
  132. struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
  133. struct txdone_entry_desc txdesc;
  134. if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags) ||
  135. !test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
  136. return;
  137. /*
  138. * Obtain the status about this packet.
  139. * Note that when the status is 0 it does not mean the
  140. * frame was send out correctly. It only means the frame
  141. * was succesfully pushed to the hardware, we have no
  142. * way to determine the transmission status right now.
  143. * (Only indirectly by looking at the failed TX counters
  144. * in the register).
  145. */
  146. txdesc.flags = 0;
  147. if (!urb->status)
  148. __set_bit(TXDONE_UNKNOWN, &txdesc.flags);
  149. else
  150. __set_bit(TXDONE_FAILURE, &txdesc.flags);
  151. txdesc.retry = 0;
  152. rt2x00lib_txdone(entry, &txdesc);
  153. }
  154. int rt2x00usb_write_tx_data(struct queue_entry *entry)
  155. {
  156. struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
  157. struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
  158. struct queue_entry_priv_usb *entry_priv = entry->priv_data;
  159. struct skb_frame_desc *skbdesc;
  160. u32 length;
  161. /*
  162. * Add the descriptor in front of the skb.
  163. */
  164. skb_push(entry->skb, entry->queue->desc_size);
  165. memset(entry->skb->data, 0, entry->queue->desc_size);
  166. /*
  167. * Fill in skb descriptor
  168. */
  169. skbdesc = get_skb_frame_desc(entry->skb);
  170. skbdesc->desc = entry->skb->data;
  171. skbdesc->desc_len = entry->queue->desc_size;
  172. /*
  173. * USB devices cannot blindly pass the skb->len as the
  174. * length of the data to usb_fill_bulk_urb. Pass the skb
  175. * to the driver to determine what the length should be.
  176. */
  177. length = rt2x00dev->ops->lib->get_tx_data_len(rt2x00dev, entry->skb);
  178. usb_fill_bulk_urb(entry_priv->urb, usb_dev,
  179. usb_sndbulkpipe(usb_dev, 1),
  180. entry->skb->data, length,
  181. rt2x00usb_interrupt_txdone, entry);
  182. /*
  183. * Make sure the skb->data pointer points to the frame, not the
  184. * descriptor.
  185. */
  186. skb_pull(entry->skb, entry->queue->desc_size);
  187. return 0;
  188. }
  189. EXPORT_SYMBOL_GPL(rt2x00usb_write_tx_data);
  190. static inline void rt2x00usb_kick_tx_entry(struct queue_entry *entry)
  191. {
  192. struct queue_entry_priv_usb *entry_priv = entry->priv_data;
  193. if (test_and_clear_bit(ENTRY_DATA_PENDING, &entry->flags))
  194. usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
  195. }
  196. void rt2x00usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
  197. const enum data_queue_qid qid)
  198. {
  199. struct data_queue *queue = rt2x00queue_get_queue(rt2x00dev, qid);
  200. unsigned long irqflags;
  201. unsigned int index;
  202. unsigned int index_done;
  203. unsigned int i;
  204. /*
  205. * Only protect the range we are going to loop over,
  206. * if during our loop a extra entry is set to pending
  207. * it should not be kicked during this run, since it
  208. * is part of another TX operation.
  209. */
  210. spin_lock_irqsave(&queue->lock, irqflags);
  211. index = queue->index[Q_INDEX];
  212. index_done = queue->index[Q_INDEX_DONE];
  213. spin_unlock_irqrestore(&queue->lock, irqflags);
  214. /*
  215. * Start from the TX done pointer, this guarentees that we will
  216. * send out all frames in the correct order.
  217. */
  218. if (index_done < index) {
  219. for (i = index_done; i < index; i++)
  220. rt2x00usb_kick_tx_entry(&queue->entries[i]);
  221. } else {
  222. for (i = index_done; i < queue->limit; i++)
  223. rt2x00usb_kick_tx_entry(&queue->entries[i]);
  224. for (i = 0; i < index; i++)
  225. rt2x00usb_kick_tx_entry(&queue->entries[i]);
  226. }
  227. }
  228. EXPORT_SYMBOL_GPL(rt2x00usb_kick_tx_queue);
  229. /*
  230. * RX data handlers.
  231. */
  232. static void rt2x00usb_interrupt_rxdone(struct urb *urb)
  233. {
  234. struct queue_entry *entry = (struct queue_entry *)urb->context;
  235. struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
  236. struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
  237. u8 rxd[32];
  238. if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags) ||
  239. !test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
  240. return;
  241. /*
  242. * Check if the received data is simply too small
  243. * to be actually valid, or if the urb is signaling
  244. * a problem.
  245. */
  246. if (urb->actual_length < entry->queue->desc_size || urb->status) {
  247. set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
  248. usb_submit_urb(urb, GFP_ATOMIC);
  249. return;
  250. }
  251. /*
  252. * Fill in desc fields of the skb descriptor
  253. */
  254. skbdesc->desc = rxd;
  255. skbdesc->desc_len = entry->queue->desc_size;
  256. /*
  257. * Send the frame to rt2x00lib for further processing.
  258. */
  259. rt2x00lib_rxdone(rt2x00dev, entry);
  260. }
  261. /*
  262. * Radio handlers
  263. */
  264. void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
  265. {
  266. struct queue_entry_priv_usb *entry_priv;
  267. struct queue_entry_priv_usb_bcn *bcn_priv;
  268. struct data_queue *queue;
  269. unsigned int i;
  270. rt2x00usb_vendor_request_sw(rt2x00dev, USB_RX_CONTROL, 0, 0,
  271. REGISTER_TIMEOUT);
  272. /*
  273. * Cancel all queues.
  274. */
  275. queue_for_each(rt2x00dev, queue) {
  276. for (i = 0; i < queue->limit; i++) {
  277. entry_priv = queue->entries[i].priv_data;
  278. usb_kill_urb(entry_priv->urb);
  279. }
  280. }
  281. /*
  282. * Kill guardian urb (if required by driver).
  283. */
  284. if (!test_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags))
  285. return;
  286. for (i = 0; i < rt2x00dev->bcn->limit; i++) {
  287. bcn_priv = rt2x00dev->bcn->entries[i].priv_data;
  288. if (bcn_priv->guardian_urb)
  289. usb_kill_urb(bcn_priv->guardian_urb);
  290. }
  291. }
  292. EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio);
  293. /*
  294. * Device initialization handlers.
  295. */
  296. void rt2x00usb_init_rxentry(struct rt2x00_dev *rt2x00dev,
  297. struct queue_entry *entry)
  298. {
  299. struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
  300. struct queue_entry_priv_usb *entry_priv = entry->priv_data;
  301. usb_fill_bulk_urb(entry_priv->urb, usb_dev,
  302. usb_rcvbulkpipe(usb_dev, 1),
  303. entry->skb->data, entry->skb->len,
  304. rt2x00usb_interrupt_rxdone, entry);
  305. set_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags);
  306. usb_submit_urb(entry_priv->urb, GFP_ATOMIC);
  307. }
  308. EXPORT_SYMBOL_GPL(rt2x00usb_init_rxentry);
  309. void rt2x00usb_init_txentry(struct rt2x00_dev *rt2x00dev,
  310. struct queue_entry *entry)
  311. {
  312. entry->flags = 0;
  313. }
  314. EXPORT_SYMBOL_GPL(rt2x00usb_init_txentry);
  315. static int rt2x00usb_alloc_urb(struct rt2x00_dev *rt2x00dev,
  316. struct data_queue *queue)
  317. {
  318. struct queue_entry_priv_usb *entry_priv;
  319. struct queue_entry_priv_usb_bcn *bcn_priv;
  320. unsigned int i;
  321. for (i = 0; i < queue->limit; i++) {
  322. entry_priv = queue->entries[i].priv_data;
  323. entry_priv->urb = usb_alloc_urb(0, GFP_KERNEL);
  324. if (!entry_priv->urb)
  325. return -ENOMEM;
  326. }
  327. /*
  328. * If this is not the beacon queue or
  329. * no guardian byte was required for the beacon,
  330. * then we are done.
  331. */
  332. if (rt2x00dev->bcn != queue ||
  333. !test_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags))
  334. return 0;
  335. for (i = 0; i < queue->limit; i++) {
  336. bcn_priv = queue->entries[i].priv_data;
  337. bcn_priv->guardian_urb = usb_alloc_urb(0, GFP_KERNEL);
  338. if (!bcn_priv->guardian_urb)
  339. return -ENOMEM;
  340. }
  341. return 0;
  342. }
  343. static void rt2x00usb_free_urb(struct rt2x00_dev *rt2x00dev,
  344. struct data_queue *queue)
  345. {
  346. struct queue_entry_priv_usb *entry_priv;
  347. struct queue_entry_priv_usb_bcn *bcn_priv;
  348. unsigned int i;
  349. if (!queue->entries)
  350. return;
  351. for (i = 0; i < queue->limit; i++) {
  352. entry_priv = queue->entries[i].priv_data;
  353. usb_kill_urb(entry_priv->urb);
  354. usb_free_urb(entry_priv->urb);
  355. }
  356. /*
  357. * If this is not the beacon queue or
  358. * no guardian byte was required for the beacon,
  359. * then we are done.
  360. */
  361. if (rt2x00dev->bcn != queue ||
  362. !test_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags))
  363. return;
  364. for (i = 0; i < queue->limit; i++) {
  365. bcn_priv = queue->entries[i].priv_data;
  366. usb_kill_urb(bcn_priv->guardian_urb);
  367. usb_free_urb(bcn_priv->guardian_urb);
  368. }
  369. }
  370. int rt2x00usb_initialize(struct rt2x00_dev *rt2x00dev)
  371. {
  372. struct data_queue *queue;
  373. int status;
  374. /*
  375. * Allocate DMA
  376. */
  377. queue_for_each(rt2x00dev, queue) {
  378. status = rt2x00usb_alloc_urb(rt2x00dev, queue);
  379. if (status)
  380. goto exit;
  381. }
  382. return 0;
  383. exit:
  384. rt2x00usb_uninitialize(rt2x00dev);
  385. return status;
  386. }
  387. EXPORT_SYMBOL_GPL(rt2x00usb_initialize);
  388. void rt2x00usb_uninitialize(struct rt2x00_dev *rt2x00dev)
  389. {
  390. struct data_queue *queue;
  391. queue_for_each(rt2x00dev, queue)
  392. rt2x00usb_free_urb(rt2x00dev, queue);
  393. }
  394. EXPORT_SYMBOL_GPL(rt2x00usb_uninitialize);
  395. /*
  396. * USB driver handlers.
  397. */
  398. static void rt2x00usb_free_reg(struct rt2x00_dev *rt2x00dev)
  399. {
  400. kfree(rt2x00dev->rf);
  401. rt2x00dev->rf = NULL;
  402. kfree(rt2x00dev->eeprom);
  403. rt2x00dev->eeprom = NULL;
  404. kfree(rt2x00dev->csr.cache);
  405. rt2x00dev->csr.cache = NULL;
  406. }
  407. static int rt2x00usb_alloc_reg(struct rt2x00_dev *rt2x00dev)
  408. {
  409. rt2x00dev->csr.cache = kzalloc(CSR_CACHE_SIZE, GFP_KERNEL);
  410. if (!rt2x00dev->csr.cache)
  411. goto exit;
  412. rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL);
  413. if (!rt2x00dev->eeprom)
  414. goto exit;
  415. rt2x00dev->rf = kzalloc(rt2x00dev->ops->rf_size, GFP_KERNEL);
  416. if (!rt2x00dev->rf)
  417. goto exit;
  418. return 0;
  419. exit:
  420. ERROR_PROBE("Failed to allocate registers.\n");
  421. rt2x00usb_free_reg(rt2x00dev);
  422. return -ENOMEM;
  423. }
  424. int rt2x00usb_probe(struct usb_interface *usb_intf,
  425. const struct usb_device_id *id)
  426. {
  427. struct usb_device *usb_dev = interface_to_usbdev(usb_intf);
  428. struct rt2x00_ops *ops = (struct rt2x00_ops *)id->driver_info;
  429. struct ieee80211_hw *hw;
  430. struct rt2x00_dev *rt2x00dev;
  431. int retval;
  432. usb_dev = usb_get_dev(usb_dev);
  433. hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
  434. if (!hw) {
  435. ERROR_PROBE("Failed to allocate hardware.\n");
  436. retval = -ENOMEM;
  437. goto exit_put_device;
  438. }
  439. usb_set_intfdata(usb_intf, hw);
  440. rt2x00dev = hw->priv;
  441. rt2x00dev->dev = &usb_intf->dev;
  442. rt2x00dev->ops = ops;
  443. rt2x00dev->hw = hw;
  444. mutex_init(&rt2x00dev->usb_cache_mutex);
  445. rt2x00dev->usb_maxpacket =
  446. usb_maxpacket(usb_dev, usb_sndbulkpipe(usb_dev, 1), 1);
  447. if (!rt2x00dev->usb_maxpacket)
  448. rt2x00dev->usb_maxpacket = 1;
  449. retval = rt2x00usb_alloc_reg(rt2x00dev);
  450. if (retval)
  451. goto exit_free_device;
  452. retval = rt2x00lib_probe_dev(rt2x00dev);
  453. if (retval)
  454. goto exit_free_reg;
  455. return 0;
  456. exit_free_reg:
  457. rt2x00usb_free_reg(rt2x00dev);
  458. exit_free_device:
  459. ieee80211_free_hw(hw);
  460. exit_put_device:
  461. usb_put_dev(usb_dev);
  462. usb_set_intfdata(usb_intf, NULL);
  463. return retval;
  464. }
  465. EXPORT_SYMBOL_GPL(rt2x00usb_probe);
  466. void rt2x00usb_disconnect(struct usb_interface *usb_intf)
  467. {
  468. struct ieee80211_hw *hw = usb_get_intfdata(usb_intf);
  469. struct rt2x00_dev *rt2x00dev = hw->priv;
  470. /*
  471. * Free all allocated data.
  472. */
  473. rt2x00lib_remove_dev(rt2x00dev);
  474. rt2x00usb_free_reg(rt2x00dev);
  475. ieee80211_free_hw(hw);
  476. /*
  477. * Free the USB device data.
  478. */
  479. usb_set_intfdata(usb_intf, NULL);
  480. usb_put_dev(interface_to_usbdev(usb_intf));
  481. }
  482. EXPORT_SYMBOL_GPL(rt2x00usb_disconnect);
  483. #ifdef CONFIG_PM
  484. int rt2x00usb_suspend(struct usb_interface *usb_intf, pm_message_t state)
  485. {
  486. struct ieee80211_hw *hw = usb_get_intfdata(usb_intf);
  487. struct rt2x00_dev *rt2x00dev = hw->priv;
  488. int retval;
  489. retval = rt2x00lib_suspend(rt2x00dev, state);
  490. if (retval)
  491. return retval;
  492. rt2x00usb_free_reg(rt2x00dev);
  493. /*
  494. * Decrease usbdev refcount.
  495. */
  496. usb_put_dev(interface_to_usbdev(usb_intf));
  497. return 0;
  498. }
  499. EXPORT_SYMBOL_GPL(rt2x00usb_suspend);
  500. int rt2x00usb_resume(struct usb_interface *usb_intf)
  501. {
  502. struct ieee80211_hw *hw = usb_get_intfdata(usb_intf);
  503. struct rt2x00_dev *rt2x00dev = hw->priv;
  504. int retval;
  505. usb_get_dev(interface_to_usbdev(usb_intf));
  506. retval = rt2x00usb_alloc_reg(rt2x00dev);
  507. if (retval)
  508. return retval;
  509. retval = rt2x00lib_resume(rt2x00dev);
  510. if (retval)
  511. goto exit_free_reg;
  512. return 0;
  513. exit_free_reg:
  514. rt2x00usb_free_reg(rt2x00dev);
  515. return retval;
  516. }
  517. EXPORT_SYMBOL_GPL(rt2x00usb_resume);
  518. #endif /* CONFIG_PM */
  519. /*
  520. * rt2x00usb module information.
  521. */
  522. MODULE_AUTHOR(DRV_PROJECT);
  523. MODULE_VERSION(DRV_VERSION);
  524. MODULE_DESCRIPTION("rt2x00 usb library");
  525. MODULE_LICENSE("GPL");