diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hif_usb.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hif_usb.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hif_usb.c b/drivers/net/wireless/ath/ath9k/hif_usb.c index 6576f683dba0..f7ec31b4ddd3 100644 --- a/drivers/net/wireless/ath/ath9k/hif_usb.c +++ b/drivers/net/wireless/ath/ath9k/hif_usb.c | |||
@@ -35,6 +35,7 @@ static struct usb_device_id ath9k_hif_usb_ids[] = { | |||
35 | { USB_DEVICE(0x07D1, 0x3A10) }, /* Dlink Wireless 150 */ | 35 | { USB_DEVICE(0x07D1, 0x3A10) }, /* Dlink Wireless 150 */ |
36 | { USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */ | 36 | { USB_DEVICE(0x13D3, 0x3327) }, /* Azurewave */ |
37 | { USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */ | 37 | { USB_DEVICE(0x13D3, 0x3328) }, /* Azurewave */ |
38 | { USB_DEVICE(0x13D3, 0x3346) }, /* IMC Networks */ | ||
38 | { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ | 39 | { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ |
39 | { USB_DEVICE(0x083A, 0xA704) }, /* SMC Networks */ | 40 | { USB_DEVICE(0x083A, 0xA704) }, /* SMC Networks */ |
40 | { }, | 41 | { }, |
@@ -540,11 +541,11 @@ static void ath9k_hif_usb_reg_in_cb(struct urb *urb) | |||
540 | return; | 541 | return; |
541 | } | 542 | } |
542 | 543 | ||
543 | usb_fill_int_urb(urb, hif_dev->udev, | 544 | usb_fill_bulk_urb(urb, hif_dev->udev, |
544 | usb_rcvbulkpipe(hif_dev->udev, | 545 | usb_rcvbulkpipe(hif_dev->udev, |
545 | USB_REG_IN_PIPE), | 546 | USB_REG_IN_PIPE), |
546 | nskb->data, MAX_REG_IN_BUF_SIZE, | 547 | nskb->data, MAX_REG_IN_BUF_SIZE, |
547 | ath9k_hif_usb_reg_in_cb, nskb, 1); | 548 | ath9k_hif_usb_reg_in_cb, nskb); |
548 | 549 | ||
549 | ret = usb_submit_urb(urb, GFP_ATOMIC); | 550 | ret = usb_submit_urb(urb, GFP_ATOMIC); |
550 | if (ret) { | 551 | if (ret) { |
@@ -720,11 +721,11 @@ static int ath9k_hif_usb_alloc_reg_in_urb(struct hif_device_usb *hif_dev) | |||
720 | if (!skb) | 721 | if (!skb) |
721 | goto err; | 722 | goto err; |
722 | 723 | ||
723 | usb_fill_int_urb(hif_dev->reg_in_urb, hif_dev->udev, | 724 | usb_fill_bulk_urb(hif_dev->reg_in_urb, hif_dev->udev, |
724 | usb_rcvbulkpipe(hif_dev->udev, | 725 | usb_rcvbulkpipe(hif_dev->udev, |
725 | USB_REG_IN_PIPE), | 726 | USB_REG_IN_PIPE), |
726 | skb->data, MAX_REG_IN_BUF_SIZE, | 727 | skb->data, MAX_REG_IN_BUF_SIZE, |
727 | ath9k_hif_usb_reg_in_cb, skb, 1); | 728 | ath9k_hif_usb_reg_in_cb, skb); |
728 | 729 | ||
729 | if (usb_submit_urb(hif_dev->reg_in_urb, GFP_KERNEL) != 0) | 730 | if (usb_submit_urb(hif_dev->reg_in_urb, GFP_KERNEL) != 0) |
730 | goto err; | 731 | goto err; |
@@ -843,14 +844,6 @@ static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev) | |||
843 | goto err_fw_req; | 844 | goto err_fw_req; |
844 | } | 845 | } |
845 | 846 | ||
846 | /* Alloc URBs */ | ||
847 | ret = ath9k_hif_usb_alloc_urbs(hif_dev); | ||
848 | if (ret) { | ||
849 | dev_err(&hif_dev->udev->dev, | ||
850 | "ath9k_htc: Unable to allocate URBs\n"); | ||
851 | goto err_urb; | ||
852 | } | ||
853 | |||
854 | /* Download firmware */ | 847 | /* Download firmware */ |
855 | ret = ath9k_hif_usb_download_fw(hif_dev); | 848 | ret = ath9k_hif_usb_download_fw(hif_dev); |
856 | if (ret) { | 849 | if (ret) { |
@@ -866,16 +859,22 @@ static int ath9k_hif_usb_dev_init(struct hif_device_usb *hif_dev) | |||
866 | */ | 859 | */ |
867 | for (idx = 0; idx < alt->desc.bNumEndpoints; idx++) { | 860 | for (idx = 0; idx < alt->desc.bNumEndpoints; idx++) { |
868 | endp = &alt->endpoint[idx].desc; | 861 | endp = &alt->endpoint[idx].desc; |
869 | if (((endp->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK) | 862 | if ((endp->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) |
870 | == 0x04) && | 863 | == USB_ENDPOINT_XFER_INT) { |
871 | ((endp->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) | ||
872 | == USB_ENDPOINT_XFER_INT)) { | ||
873 | endp->bmAttributes &= ~USB_ENDPOINT_XFERTYPE_MASK; | 864 | endp->bmAttributes &= ~USB_ENDPOINT_XFERTYPE_MASK; |
874 | endp->bmAttributes |= USB_ENDPOINT_XFER_BULK; | 865 | endp->bmAttributes |= USB_ENDPOINT_XFER_BULK; |
875 | endp->bInterval = 0; | 866 | endp->bInterval = 0; |
876 | } | 867 | } |
877 | } | 868 | } |
878 | 869 | ||
870 | /* Alloc URBs */ | ||
871 | ret = ath9k_hif_usb_alloc_urbs(hif_dev); | ||
872 | if (ret) { | ||
873 | dev_err(&hif_dev->udev->dev, | ||
874 | "ath9k_htc: Unable to allocate URBs\n"); | ||
875 | goto err_urb; | ||
876 | } | ||
877 | |||
879 | return 0; | 878 | return 0; |
880 | 879 | ||
881 | err_fw_download: | 880 | err_fw_download: |