rt2x00usb.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652
  1. /*
  2. Copyright (C) 2004 - 2007 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 =
  37. interface_to_usbdev(rt2x00dev_usb(rt2x00dev));
  38. int status;
  39. unsigned int i;
  40. unsigned int pipe =
  41. (requesttype == USB_VENDOR_REQUEST_IN) ?
  42. usb_rcvctrlpipe(usb_dev, 0) : usb_sndctrlpipe(usb_dev, 0);
  43. for (i = 0; i < REGISTER_BUSY_COUNT; i++) {
  44. status = usb_control_msg(usb_dev, pipe, request, requesttype,
  45. value, offset, buffer, buffer_length,
  46. timeout);
  47. if (status >= 0)
  48. return 0;
  49. /*
  50. * Check for errors
  51. * -ENODEV: Device has disappeared, no point continuing.
  52. * All other errors: Try again.
  53. */
  54. else if (status == -ENODEV)
  55. break;
  56. }
  57. ERROR(rt2x00dev,
  58. "Vendor Request 0x%02x failed for offset 0x%04x with error %d.\n",
  59. request, offset, status);
  60. return status;
  61. }
  62. EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request);
  63. int rt2x00usb_vendor_req_buff_lock(struct rt2x00_dev *rt2x00dev,
  64. const u8 request, const u8 requesttype,
  65. const u16 offset, void *buffer,
  66. const u16 buffer_length, const int timeout)
  67. {
  68. int status;
  69. BUG_ON(!mutex_is_locked(&rt2x00dev->usb_cache_mutex));
  70. /*
  71. * Check for Cache availability.
  72. */
  73. if (unlikely(!rt2x00dev->csr_cache || buffer_length > CSR_CACHE_SIZE)) {
  74. ERROR(rt2x00dev, "CSR cache not available.\n");
  75. return -ENOMEM;
  76. }
  77. if (requesttype == USB_VENDOR_REQUEST_OUT)
  78. memcpy(rt2x00dev->csr_cache, buffer, buffer_length);
  79. status = rt2x00usb_vendor_request(rt2x00dev, request, requesttype,
  80. offset, 0, rt2x00dev->csr_cache,
  81. buffer_length, timeout);
  82. if (!status && requesttype == USB_VENDOR_REQUEST_IN)
  83. memcpy(buffer, rt2x00dev->csr_cache, buffer_length);
  84. return status;
  85. }
  86. EXPORT_SYMBOL_GPL(rt2x00usb_vendor_req_buff_lock);
  87. int rt2x00usb_vendor_request_buff(struct rt2x00_dev *rt2x00dev,
  88. const u8 request, const u8 requesttype,
  89. const u16 offset, void *buffer,
  90. const u16 buffer_length, const int timeout)
  91. {
  92. int status;
  93. mutex_lock(&rt2x00dev->usb_cache_mutex);
  94. status = rt2x00usb_vendor_req_buff_lock(rt2x00dev, request,
  95. requesttype, offset, buffer,
  96. buffer_length, timeout);
  97. mutex_unlock(&rt2x00dev->usb_cache_mutex);
  98. return status;
  99. }
  100. EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request_buff);
  101. /*
  102. * TX data handlers.
  103. */
  104. static void rt2x00usb_interrupt_txdone(struct urb *urb)
  105. {
  106. struct data_entry *entry = (struct data_entry *)urb->context;
  107. struct data_ring *ring = entry->ring;
  108. struct rt2x00_dev *rt2x00dev = ring->rt2x00dev;
  109. __le32 *txd = (__le32 *)entry->skb->data;
  110. u32 word;
  111. int tx_status;
  112. if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags) ||
  113. !__test_and_clear_bit(ENTRY_OWNER_NIC, &entry->flags))
  114. return;
  115. rt2x00_desc_read(txd, 0, &word);
  116. /*
  117. * Remove the descriptor data from the buffer.
  118. */
  119. skb_pull(entry->skb, ring->desc_size);
  120. /*
  121. * Obtain the status about this packet.
  122. */
  123. tx_status = !urb->status ? TX_SUCCESS : TX_FAIL_RETRY;
  124. rt2x00lib_txdone(entry, tx_status, 0);
  125. /*
  126. * Make this entry available for reuse.
  127. */
  128. entry->flags = 0;
  129. rt2x00_ring_index_done_inc(entry->ring);
  130. /*
  131. * If the data ring was full before the txdone handler
  132. * we must make sure the packet queue in the mac80211 stack
  133. * is reenabled when the txdone handler has finished.
  134. */
  135. if (!rt2x00_ring_full(ring))
  136. ieee80211_wake_queue(rt2x00dev->hw,
  137. entry->tx_status.control.queue);
  138. }
  139. int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
  140. struct data_ring *ring, struct sk_buff *skb,
  141. struct ieee80211_tx_control *control)
  142. {
  143. struct usb_device *usb_dev =
  144. interface_to_usbdev(rt2x00dev_usb(rt2x00dev));
  145. struct data_entry *entry = rt2x00_get_data_entry(ring);
  146. struct skb_desc *desc;
  147. u32 length;
  148. if (rt2x00_ring_full(ring)) {
  149. ieee80211_stop_queue(rt2x00dev->hw, control->queue);
  150. return -EINVAL;
  151. }
  152. if (test_bit(ENTRY_OWNER_NIC, &entry->flags)) {
  153. ERROR(rt2x00dev,
  154. "Arrived at non-free entry in the non-full queue %d.\n"
  155. "Please file bug report to %s.\n",
  156. control->queue, DRV_PROJECT);
  157. ieee80211_stop_queue(rt2x00dev->hw, control->queue);
  158. return -EINVAL;
  159. }
  160. /*
  161. * Add the descriptor in front of the skb.
  162. */
  163. skb_push(skb, ring->desc_size);
  164. memset(skb->data, 0, ring->desc_size);
  165. /*
  166. * Fill in skb descriptor
  167. */
  168. desc = get_skb_desc(skb);
  169. desc->desc_len = ring->desc_size;
  170. desc->data_len = skb->len - ring->desc_size;
  171. desc->desc = skb->data;
  172. desc->data = skb->data + ring->desc_size;
  173. desc->ring = ring;
  174. desc->entry = entry;
  175. rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
  176. /*
  177. * USB devices cannot blindly pass the skb->len as the
  178. * length of the data to usb_fill_bulk_urb. Pass the skb
  179. * to the driver to determine what the length should be.
  180. */
  181. length = rt2x00dev->ops->lib->get_tx_data_len(rt2x00dev, skb);
  182. /*
  183. * Initialize URB and send the frame to the device.
  184. */
  185. __set_bit(ENTRY_OWNER_NIC, &entry->flags);
  186. usb_fill_bulk_urb(entry->priv, usb_dev, usb_sndbulkpipe(usb_dev, 1),
  187. skb->data, length, rt2x00usb_interrupt_txdone, entry);
  188. usb_submit_urb(entry->priv, GFP_ATOMIC);
  189. rt2x00_ring_index_inc(ring);
  190. if (rt2x00_ring_full(ring))
  191. ieee80211_stop_queue(rt2x00dev->hw, control->queue);
  192. return 0;
  193. }
  194. EXPORT_SYMBOL_GPL(rt2x00usb_write_tx_data);
  195. /*
  196. * RX data handlers.
  197. */
  198. static void rt2x00usb_interrupt_rxdone(struct urb *urb)
  199. {
  200. struct data_entry *entry = (struct data_entry *)urb->context;
  201. struct data_ring *ring = entry->ring;
  202. struct rt2x00_dev *rt2x00dev = ring->rt2x00dev;
  203. struct sk_buff *skb;
  204. struct ieee80211_hdr *hdr;
  205. struct skb_desc *skbdesc;
  206. struct rxdata_entry_desc desc;
  207. int header_size;
  208. int frame_size;
  209. if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags) ||
  210. !test_and_clear_bit(ENTRY_OWNER_NIC, &entry->flags))
  211. return;
  212. /*
  213. * Check if the received data is simply too small
  214. * to be actually valid, or if the urb is signaling
  215. * a problem.
  216. */
  217. if (urb->actual_length < entry->ring->desc_size || urb->status)
  218. goto skip_entry;
  219. memset(&desc, 0, sizeof(desc));
  220. rt2x00dev->ops->lib->fill_rxdone(entry, &desc);
  221. /*
  222. * Allocate a new sk buffer to replace the current one.
  223. * If allocation fails, we should drop the current frame
  224. * so we can recycle the existing sk buffer for the new frame.
  225. * As alignment we use 2 and not NET_IP_ALIGN because we need
  226. * to be sure we have 2 bytes room in the head. (NET_IP_ALIGN
  227. * can be 0 on some hardware). We use these 2 bytes for frame
  228. * alignment later, we assume that the chance that
  229. * header_size % 4 == 2 is bigger then header_size % 2 == 0
  230. * and thus optimize alignment by reserving the 2 bytes in
  231. * advance.
  232. */
  233. frame_size = entry->ring->data_size + entry->ring->desc_size;
  234. skb = dev_alloc_skb(frame_size + 2);
  235. if (!skb)
  236. goto skip_entry;
  237. skb_reserve(skb, 2);
  238. skb_put(skb, frame_size);
  239. /*
  240. * The data behind the ieee80211 header must be
  241. * aligned on a 4 byte boundary.
  242. * After that trim the entire buffer down to only
  243. * contain the valid frame data excluding the device
  244. * descriptor.
  245. */
  246. hdr = (struct ieee80211_hdr *)entry->skb->data;
  247. header_size =
  248. ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_control));
  249. if (header_size % 4 == 0) {
  250. skb_push(entry->skb, 2);
  251. memmove(entry->skb->data, entry->skb->data + 2, skb->len - 2);
  252. }
  253. skb_trim(entry->skb, desc.size);
  254. /*
  255. * Fill in skb descriptor
  256. */
  257. skbdesc = get_skb_desc(entry->skb);
  258. skbdesc->desc_len = entry->ring->desc_size;
  259. skbdesc->data_len = entry->skb->len;
  260. skbdesc->desc = entry->skb->data - skbdesc->desc_len;
  261. skbdesc->data = entry->skb->data;
  262. skbdesc->ring = ring;
  263. skbdesc->entry = entry;
  264. /*
  265. * Send the frame to rt2x00lib for further processing.
  266. */
  267. rt2x00lib_rxdone(entry, entry->skb, &desc);
  268. /*
  269. * Replace current entry's skb with the newly allocated one,
  270. * and reinitialize the urb.
  271. */
  272. entry->skb = skb;
  273. urb->transfer_buffer = entry->skb->data;
  274. urb->transfer_buffer_length = entry->skb->len;
  275. skip_entry:
  276. if (test_bit(DEVICE_ENABLED_RADIO, &ring->rt2x00dev->flags)) {
  277. __set_bit(ENTRY_OWNER_NIC, &entry->flags);
  278. usb_submit_urb(urb, GFP_ATOMIC);
  279. }
  280. rt2x00_ring_index_inc(ring);
  281. }
  282. /*
  283. * Radio handlers
  284. */
  285. void rt2x00usb_enable_radio(struct rt2x00_dev *rt2x00dev)
  286. {
  287. struct usb_device *usb_dev =
  288. interface_to_usbdev(rt2x00dev_usb(rt2x00dev));
  289. struct data_ring *ring;
  290. struct data_entry *entry;
  291. unsigned int i;
  292. /*
  293. * Initialize the TX rings
  294. */
  295. txringall_for_each(rt2x00dev, ring) {
  296. for (i = 0; i < ring->stats.limit; i++)
  297. ring->entry[i].flags = 0;
  298. rt2x00_ring_index_clear(ring);
  299. }
  300. /*
  301. * Initialize and start the RX ring.
  302. */
  303. rt2x00_ring_index_clear(rt2x00dev->rx);
  304. for (i = 0; i < rt2x00dev->rx->stats.limit; i++) {
  305. entry = &rt2x00dev->rx->entry[i];
  306. usb_fill_bulk_urb(entry->priv, usb_dev,
  307. usb_rcvbulkpipe(usb_dev, 1),
  308. entry->skb->data, entry->skb->len,
  309. rt2x00usb_interrupt_rxdone, entry);
  310. __set_bit(ENTRY_OWNER_NIC, &entry->flags);
  311. usb_submit_urb(entry->priv, GFP_ATOMIC);
  312. }
  313. }
  314. EXPORT_SYMBOL_GPL(rt2x00usb_enable_radio);
  315. void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
  316. {
  317. struct data_ring *ring;
  318. unsigned int i;
  319. rt2x00usb_vendor_request_sw(rt2x00dev, USB_RX_CONTROL, 0x0000, 0x0000,
  320. REGISTER_TIMEOUT);
  321. /*
  322. * Cancel all rings.
  323. */
  324. ring_for_each(rt2x00dev, ring) {
  325. for (i = 0; i < ring->stats.limit; i++)
  326. usb_kill_urb(ring->entry[i].priv);
  327. }
  328. }
  329. EXPORT_SYMBOL_GPL(rt2x00usb_disable_radio);
  330. /*
  331. * Device initialization handlers.
  332. */
  333. static int rt2x00usb_alloc_urb(struct rt2x00_dev *rt2x00dev,
  334. struct data_ring *ring)
  335. {
  336. unsigned int i;
  337. /*
  338. * Allocate the URB's
  339. */
  340. for (i = 0; i < ring->stats.limit; i++) {
  341. ring->entry[i].priv = usb_alloc_urb(0, GFP_KERNEL);
  342. if (!ring->entry[i].priv)
  343. return -ENOMEM;
  344. }
  345. return 0;
  346. }
  347. static void rt2x00usb_free_urb(struct rt2x00_dev *rt2x00dev,
  348. struct data_ring *ring)
  349. {
  350. unsigned int i;
  351. if (!ring->entry)
  352. return;
  353. for (i = 0; i < ring->stats.limit; i++) {
  354. usb_kill_urb(ring->entry[i].priv);
  355. usb_free_urb(ring->entry[i].priv);
  356. if (ring->entry[i].skb)
  357. kfree_skb(ring->entry[i].skb);
  358. }
  359. }
  360. int rt2x00usb_initialize(struct rt2x00_dev *rt2x00dev)
  361. {
  362. struct data_ring *ring;
  363. struct sk_buff *skb;
  364. unsigned int entry_size;
  365. unsigned int i;
  366. int status;
  367. /*
  368. * Allocate DMA
  369. */
  370. ring_for_each(rt2x00dev, ring) {
  371. status = rt2x00usb_alloc_urb(rt2x00dev, ring);
  372. if (status)
  373. goto exit;
  374. }
  375. /*
  376. * For the RX ring, skb's should be allocated.
  377. */
  378. entry_size = rt2x00dev->rx->data_size + rt2x00dev->rx->desc_size;
  379. for (i = 0; i < rt2x00dev->rx->stats.limit; i++) {
  380. skb = dev_alloc_skb(NET_IP_ALIGN + entry_size);
  381. if (!skb)
  382. goto exit;
  383. skb_reserve(skb, NET_IP_ALIGN);
  384. skb_put(skb, entry_size);
  385. rt2x00dev->rx->entry[i].skb = skb;
  386. }
  387. return 0;
  388. exit:
  389. rt2x00usb_uninitialize(rt2x00dev);
  390. return status;
  391. }
  392. EXPORT_SYMBOL_GPL(rt2x00usb_initialize);
  393. void rt2x00usb_uninitialize(struct rt2x00_dev *rt2x00dev)
  394. {
  395. struct data_ring *ring;
  396. ring_for_each(rt2x00dev, ring)
  397. rt2x00usb_free_urb(rt2x00dev, ring);
  398. }
  399. EXPORT_SYMBOL_GPL(rt2x00usb_uninitialize);
  400. /*
  401. * USB driver handlers.
  402. */
  403. static void rt2x00usb_free_reg(struct rt2x00_dev *rt2x00dev)
  404. {
  405. kfree(rt2x00dev->rf);
  406. rt2x00dev->rf = NULL;
  407. kfree(rt2x00dev->eeprom);
  408. rt2x00dev->eeprom = NULL;
  409. kfree(rt2x00dev->csr_cache);
  410. rt2x00dev->csr_cache = NULL;
  411. }
  412. static int rt2x00usb_alloc_reg(struct rt2x00_dev *rt2x00dev)
  413. {
  414. rt2x00dev->csr_cache = kzalloc(CSR_CACHE_SIZE, GFP_KERNEL);
  415. if (!rt2x00dev->csr_cache)
  416. goto exit;
  417. rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL);
  418. if (!rt2x00dev->eeprom)
  419. goto exit;
  420. rt2x00dev->rf = kzalloc(rt2x00dev->ops->rf_size, GFP_KERNEL);
  421. if (!rt2x00dev->rf)
  422. goto exit;
  423. return 0;
  424. exit:
  425. ERROR_PROBE("Failed to allocate registers.\n");
  426. rt2x00usb_free_reg(rt2x00dev);
  427. return -ENOMEM;
  428. }
  429. int rt2x00usb_probe(struct usb_interface *usb_intf,
  430. const struct usb_device_id *id)
  431. {
  432. struct usb_device *usb_dev = interface_to_usbdev(usb_intf);
  433. struct rt2x00_ops *ops = (struct rt2x00_ops *)id->driver_info;
  434. struct ieee80211_hw *hw;
  435. struct rt2x00_dev *rt2x00dev;
  436. int retval;
  437. usb_dev = usb_get_dev(usb_dev);
  438. hw = ieee80211_alloc_hw(sizeof(struct rt2x00_dev), ops->hw);
  439. if (!hw) {
  440. ERROR_PROBE("Failed to allocate hardware.\n");
  441. retval = -ENOMEM;
  442. goto exit_put_device;
  443. }
  444. usb_set_intfdata(usb_intf, hw);
  445. rt2x00dev = hw->priv;
  446. rt2x00dev->dev = usb_intf;
  447. rt2x00dev->ops = ops;
  448. rt2x00dev->hw = hw;
  449. mutex_init(&rt2x00dev->usb_cache_mutex);
  450. rt2x00dev->usb_maxpacket =
  451. usb_maxpacket(usb_dev, usb_sndbulkpipe(usb_dev, 1), 1);
  452. if (!rt2x00dev->usb_maxpacket)
  453. rt2x00dev->usb_maxpacket = 1;
  454. retval = rt2x00usb_alloc_reg(rt2x00dev);
  455. if (retval)
  456. goto exit_free_device;
  457. retval = rt2x00lib_probe_dev(rt2x00dev);
  458. if (retval)
  459. goto exit_free_reg;
  460. return 0;
  461. exit_free_reg:
  462. rt2x00usb_free_reg(rt2x00dev);
  463. exit_free_device:
  464. ieee80211_free_hw(hw);
  465. exit_put_device:
  466. usb_put_dev(usb_dev);
  467. usb_set_intfdata(usb_intf, NULL);
  468. return retval;
  469. }
  470. EXPORT_SYMBOL_GPL(rt2x00usb_probe);
  471. void rt2x00usb_disconnect(struct usb_interface *usb_intf)
  472. {
  473. struct ieee80211_hw *hw = usb_get_intfdata(usb_intf);
  474. struct rt2x00_dev *rt2x00dev = hw->priv;
  475. /*
  476. * Free all allocated data.
  477. */
  478. rt2x00lib_remove_dev(rt2x00dev);
  479. rt2x00usb_free_reg(rt2x00dev);
  480. ieee80211_free_hw(hw);
  481. /*
  482. * Free the USB device data.
  483. */
  484. usb_set_intfdata(usb_intf, NULL);
  485. usb_put_dev(interface_to_usbdev(usb_intf));
  486. }
  487. EXPORT_SYMBOL_GPL(rt2x00usb_disconnect);
  488. #ifdef CONFIG_PM
  489. int rt2x00usb_suspend(struct usb_interface *usb_intf, pm_message_t state)
  490. {
  491. struct ieee80211_hw *hw = usb_get_intfdata(usb_intf);
  492. struct rt2x00_dev *rt2x00dev = hw->priv;
  493. int retval;
  494. retval = rt2x00lib_suspend(rt2x00dev, state);
  495. if (retval)
  496. return retval;
  497. rt2x00usb_free_reg(rt2x00dev);
  498. /*
  499. * Decrease usbdev refcount.
  500. */
  501. usb_put_dev(interface_to_usbdev(usb_intf));
  502. return 0;
  503. }
  504. EXPORT_SYMBOL_GPL(rt2x00usb_suspend);
  505. int rt2x00usb_resume(struct usb_interface *usb_intf)
  506. {
  507. struct ieee80211_hw *hw = usb_get_intfdata(usb_intf);
  508. struct rt2x00_dev *rt2x00dev = hw->priv;
  509. int retval;
  510. usb_get_dev(interface_to_usbdev(usb_intf));
  511. retval = rt2x00usb_alloc_reg(rt2x00dev);
  512. if (retval)
  513. return retval;
  514. retval = rt2x00lib_resume(rt2x00dev);
  515. if (retval)
  516. goto exit_free_reg;
  517. return 0;
  518. exit_free_reg:
  519. rt2x00usb_free_reg(rt2x00dev);
  520. return retval;
  521. }
  522. EXPORT_SYMBOL_GPL(rt2x00usb_resume);
  523. #endif /* CONFIG_PM */
  524. /*
  525. * rt2x00pci module information.
  526. */
  527. MODULE_AUTHOR(DRV_PROJECT);
  528. MODULE_VERSION(DRV_VERSION);
  529. MODULE_DESCRIPTION("rt2x00 library");
  530. MODULE_LICENSE("GPL");