ar9170: fix for driver-core ABI change
[safe/jmp/linux-2.6] / drivers / net / wireless / ath / ar9170 / usb.c
index 4e30197..c8121a6 100644 (file)
  */
 
 #include <linux/module.h>
+#include <linux/slab.h>
 #include <linux/usb.h>
 #include <linux/firmware.h>
 #include <linux/etherdevice.h>
+#include <linux/device.h>
 #include <net/mac80211.h>
 #include "ar9170.h"
 #include "cmd.h"
@@ -66,18 +68,28 @@ static struct usb_device_id ar9170_usb_ids[] = {
        { USB_DEVICE(0x0cf3, 0x1001) },
        /* TP-Link TL-WN821N v2 */
        { USB_DEVICE(0x0cf3, 0x1002) },
+       /* 3Com Dual Band 802.11n USB Adapter */
+       { USB_DEVICE(0x0cf3, 0x1010) },
+       /* H3C Dual Band 802.11n USB Adapter */
+       { USB_DEVICE(0x0cf3, 0x1011) },
        /* Cace Airpcap NX */
        { USB_DEVICE(0xcace, 0x0300) },
        /* D-Link DWA 160 A1 */
        { USB_DEVICE(0x07d1, 0x3c10) },
        /* D-Link DWA 160 A2 */
        { USB_DEVICE(0x07d1, 0x3a09) },
+       /* Netgear WNA1000 */
+       { USB_DEVICE(0x0846, 0x9040) },
        /* Netgear WNDA3100 */
        { USB_DEVICE(0x0846, 0x9010) },
        /* Netgear WN111 v2 */
        { USB_DEVICE(0x0846, 0x9001) },
        /* Zydas ZD1221 */
        { USB_DEVICE(0x0ace, 0x1221) },
+       /* Proxim ORiNOCO 802.11n USB */
+       { USB_DEVICE(0x1435, 0x0804) },
+       /* WNC Generic 11n USB Dongle */
+       { USB_DEVICE(0x1435, 0x0326) },
        /* ZyXEL NWD271N */
        { USB_DEVICE(0x0586, 0x3417) },
        /* Z-Com UB81 BG */
@@ -94,6 +106,8 @@ static struct usb_device_id ar9170_usb_ids[] = {
        { USB_DEVICE(0x04bb, 0x093f) },
        /* AVM FRITZ!WLAN USB Stick N */
        { USB_DEVICE(0x057C, 0x8401) },
+       /* NEC WL300NU-G */
+       { USB_DEVICE(0x0409, 0x0249) },
        /* AVM FRITZ!WLAN USB Stick N 2.4 */
        { USB_DEVICE(0x057C, 0x8402), .driver_info = AR9170_REQ_FW1_ONLY },
 
@@ -416,7 +430,7 @@ static int ar9170_usb_exec_cmd(struct ar9170 *ar, enum ar9170_cmd cmd,
        spin_unlock_irqrestore(&aru->common.cmdlock, flags);
 
        usb_fill_int_urb(urb, aru->udev,
-                        usb_sndbulkpipe(aru->udev, AR9170_EP_CMD),
+                        usb_sndintpipe(aru->udev, AR9170_EP_CMD),
                         aru->common.cmdbuf, plen + 4,
                         ar9170_usb_tx_urb_complete, NULL, 1);
 
@@ -726,10 +740,10 @@ static void ar9170_usb_firmware_failed(struct ar9170_usb *aru)
 
        /* unbind anything failed */
        if (parent)
-               down(&parent->sem);
+               device_lock(parent);
        device_release_driver(&aru->udev->dev);
        if (parent)
-               up(&parent->sem);
+               device_unlock(parent);
 }
 
 static void ar9170_usb_firmware_finish(const struct firmware *fw, void *context)