diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 34 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 26 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.h | 3 |
8 files changed, 54 insertions, 24 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 2131f8f0c502..0e52f174896c 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -613,15 +613,23 @@ static int rt2800pci_set_device_state(struct rt2x00_dev *rt2x00dev, | |||
613 | /* | 613 | /* |
614 | * TX descriptor initialization | 614 | * TX descriptor initialization |
615 | */ | 615 | */ |
616 | static void rt2800pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | 616 | static int rt2800pci_write_tx_data(struct queue_entry* entry, |
617 | struct sk_buff *skb, | 617 | struct txentry_desc *txdesc) |
618 | struct txentry_desc *txdesc) | ||
619 | { | 618 | { |
620 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); | 619 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
621 | __le32 *txd = skbdesc->desc; | 620 | struct sk_buff *skb = entry->skb; |
622 | __le32 *txwi = (__le32 *)(skb->data - rt2x00dev->ops->extra_tx_headroom); | 621 | struct skb_frame_desc *skbdesc; |
622 | int ret; | ||
623 | __le32 *txwi; | ||
623 | u32 word; | 624 | u32 word; |
624 | 625 | ||
626 | ret = rt2x00pci_write_tx_data(entry, txdesc); | ||
627 | if (ret) | ||
628 | return ret; | ||
629 | |||
630 | skbdesc = get_skb_frame_desc(skb); | ||
631 | txwi = (__le32 *)(skb->data - rt2x00dev->ops->extra_tx_headroom); | ||
632 | |||
625 | /* | 633 | /* |
626 | * Initialize TX Info descriptor | 634 | * Initialize TX Info descriptor |
627 | */ | 635 | */ |
@@ -670,6 +678,18 @@ static void rt2800pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
670 | _rt2x00_desc_write(txwi, 2, 0 /* skbdesc->iv[0] */); | 678 | _rt2x00_desc_write(txwi, 2, 0 /* skbdesc->iv[0] */); |
671 | _rt2x00_desc_write(txwi, 3, 0 /* skbdesc->iv[1] */); | 679 | _rt2x00_desc_write(txwi, 3, 0 /* skbdesc->iv[1] */); |
672 | 680 | ||
681 | return 0; | ||
682 | } | ||
683 | |||
684 | |||
685 | static void rt2800pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | ||
686 | struct sk_buff *skb, | ||
687 | struct txentry_desc *txdesc) | ||
688 | { | ||
689 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); | ||
690 | __le32 *txd = skbdesc->desc; | ||
691 | u32 word; | ||
692 | |||
673 | /* | 693 | /* |
674 | * The buffers pointed by SD_PTR0/SD_LEN0 and SD_PTR1/SD_LEN1 | 694 | * The buffers pointed by SD_PTR0/SD_LEN0 and SD_PTR1/SD_LEN1 |
675 | * must contains a TXWI structure + 802.11 header + padding + 802.11 | 695 | * must contains a TXWI structure + 802.11 header + padding + 802.11 |
@@ -1135,7 +1155,7 @@ static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = { | |||
1135 | .reset_tuner = rt2800_reset_tuner, | 1155 | .reset_tuner = rt2800_reset_tuner, |
1136 | .link_tuner = rt2800_link_tuner, | 1156 | .link_tuner = rt2800_link_tuner, |
1137 | .write_tx_desc = rt2800pci_write_tx_desc, | 1157 | .write_tx_desc = rt2800pci_write_tx_desc, |
1138 | .write_tx_data = rt2x00pci_write_tx_data, | 1158 | .write_tx_data = rt2800pci_write_tx_data, |
1139 | .write_beacon = rt2800pci_write_beacon, | 1159 | .write_beacon = rt2800pci_write_beacon, |
1140 | .kick_tx_queue = rt2800pci_kick_tx_queue, | 1160 | .kick_tx_queue = rt2800pci_kick_tx_queue, |
1141 | .kill_tx_queue = rt2800pci_kill_tx_queue, | 1161 | .kill_tx_queue = rt2800pci_kill_tx_queue, |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 6b809ab42c61..95c8a6134ff8 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -806,6 +806,10 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
806 | { USB_DEVICE(0x07b8, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, | 806 | { USB_DEVICE(0x07b8, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, |
807 | { USB_DEVICE(0x07b8, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, | 807 | { USB_DEVICE(0x07b8, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, |
808 | { USB_DEVICE(0x1482, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, | 808 | { USB_DEVICE(0x1482, 0x3c09), USB_DEVICE_DATA(&rt2800usb_ops) }, |
809 | /* Allwin */ | ||
810 | { USB_DEVICE(0x8516, 0x2070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
811 | { USB_DEVICE(0x8516, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
812 | { USB_DEVICE(0x8516, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
809 | /* Amit */ | 813 | /* Amit */ |
810 | { USB_DEVICE(0x15c5, 0x0008), USB_DEVICE_DATA(&rt2800usb_ops) }, | 814 | { USB_DEVICE(0x15c5, 0x0008), USB_DEVICE_DATA(&rt2800usb_ops) }, |
811 | /* Askey */ | 815 | /* Askey */ |
@@ -848,6 +852,11 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
848 | /* Hawking */ | 852 | /* Hawking */ |
849 | { USB_DEVICE(0x0e66, 0x0001), USB_DEVICE_DATA(&rt2800usb_ops) }, | 853 | { USB_DEVICE(0x0e66, 0x0001), USB_DEVICE_DATA(&rt2800usb_ops) }, |
850 | { USB_DEVICE(0x0e66, 0x0003), USB_DEVICE_DATA(&rt2800usb_ops) }, | 854 | { USB_DEVICE(0x0e66, 0x0003), USB_DEVICE_DATA(&rt2800usb_ops) }, |
855 | { USB_DEVICE(0x0e66, 0x0009), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
856 | { USB_DEVICE(0x0e66, 0x000b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
857 | { USB_DEVICE(0x0e66, 0x0013), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
858 | { USB_DEVICE(0x0e66, 0x0017), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
859 | { USB_DEVICE(0x0e66, 0x0018), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
851 | /* Linksys */ | 860 | /* Linksys */ |
852 | { USB_DEVICE(0x1737, 0x0070), USB_DEVICE_DATA(&rt2800usb_ops) }, | 861 | { USB_DEVICE(0x1737, 0x0070), USB_DEVICE_DATA(&rt2800usb_ops) }, |
853 | { USB_DEVICE(0x1737, 0x0071), USB_DEVICE_DATA(&rt2800usb_ops) }, | 862 | { USB_DEVICE(0x1737, 0x0071), USB_DEVICE_DATA(&rt2800usb_ops) }, |
@@ -907,6 +916,10 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
907 | { USB_DEVICE(0x07b8, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | 916 | { USB_DEVICE(0x07b8, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, |
908 | /* AirTies */ | 917 | /* AirTies */ |
909 | { USB_DEVICE(0x1eda, 0x2310), USB_DEVICE_DATA(&rt2800usb_ops) }, | 918 | { USB_DEVICE(0x1eda, 0x2310), USB_DEVICE_DATA(&rt2800usb_ops) }, |
919 | /* Allwin */ | ||
920 | { USB_DEVICE(0x8516, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
921 | { USB_DEVICE(0x8516, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
922 | { USB_DEVICE(0x8516, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
910 | /* ASUS */ | 923 | /* ASUS */ |
911 | { USB_DEVICE(0x0b05, 0x1784), USB_DEVICE_DATA(&rt2800usb_ops) }, | 924 | { USB_DEVICE(0x0b05, 0x1784), USB_DEVICE_DATA(&rt2800usb_ops) }, |
912 | /* AzureWave */ | 925 | /* AzureWave */ |
@@ -991,6 +1004,8 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
991 | { USB_DEVICE(0x5a57, 0x5257), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1004 | { USB_DEVICE(0x5a57, 0x5257), USB_DEVICE_DATA(&rt2800usb_ops) }, |
992 | #endif | 1005 | #endif |
993 | #ifdef CONFIG_RT2800USB_RT35XX | 1006 | #ifdef CONFIG_RT2800USB_RT35XX |
1007 | /* Allwin */ | ||
1008 | { USB_DEVICE(0x8516, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
994 | /* Askey */ | 1009 | /* Askey */ |
995 | { USB_DEVICE(0x1690, 0x0744), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1010 | { USB_DEVICE(0x1690, 0x0744), USB_DEVICE_DATA(&rt2800usb_ops) }, |
996 | /* Cisco */ | 1011 | /* Cisco */ |
@@ -1014,14 +1029,6 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1014 | * Unclear what kind of devices these are (they aren't supported by the | 1029 | * Unclear what kind of devices these are (they aren't supported by the |
1015 | * vendor driver). | 1030 | * vendor driver). |
1016 | */ | 1031 | */ |
1017 | /* Allwin */ | ||
1018 | { USB_DEVICE(0x8516, 0x2070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1019 | { USB_DEVICE(0x8516, 0x2770), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1020 | { USB_DEVICE(0x8516, 0x2870), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1021 | { USB_DEVICE(0x8516, 0x3070), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1022 | { USB_DEVICE(0x8516, 0x3071), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1023 | { USB_DEVICE(0x8516, 0x3072), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1024 | { USB_DEVICE(0x8516, 0x3572), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1025 | /* Amigo */ | 1032 | /* Amigo */ |
1026 | { USB_DEVICE(0x0e0b, 0x9031), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1033 | { USB_DEVICE(0x0e0b, 0x9031), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1027 | { USB_DEVICE(0x0e0b, 0x9041), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1034 | { USB_DEVICE(0x0e0b, 0x9041), USB_DEVICE_DATA(&rt2800usb_ops) }, |
@@ -1057,9 +1064,6 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1057 | { USB_DEVICE(0x15a9, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1064 | { USB_DEVICE(0x15a9, 0x0010), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1058 | /* Gigabyte */ | 1065 | /* Gigabyte */ |
1059 | { USB_DEVICE(0x1044, 0x800c), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1066 | { USB_DEVICE(0x1044, 0x800c), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1060 | /* Hawking */ | ||
1061 | { USB_DEVICE(0x0e66, 0x0009), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1062 | { USB_DEVICE(0x0e66, 0x000b), USB_DEVICE_DATA(&rt2800usb_ops) }, | ||
1063 | /* LevelOne */ | 1067 | /* LevelOne */ |
1064 | { USB_DEVICE(0x1740, 0x0605), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1068 | { USB_DEVICE(0x1740, 0x0605), USB_DEVICE_DATA(&rt2800usb_ops) }, |
1065 | { USB_DEVICE(0x1740, 0x0615), USB_DEVICE_DATA(&rt2800usb_ops) }, | 1069 | { USB_DEVICE(0x1740, 0x0615), USB_DEVICE_DATA(&rt2800usb_ops) }, |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 4de505b98331..4f9b666f7a7f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -549,7 +549,8 @@ struct rt2x00lib_ops { | |||
549 | void (*write_tx_desc) (struct rt2x00_dev *rt2x00dev, | 549 | void (*write_tx_desc) (struct rt2x00_dev *rt2x00dev, |
550 | struct sk_buff *skb, | 550 | struct sk_buff *skb, |
551 | struct txentry_desc *txdesc); | 551 | struct txentry_desc *txdesc); |
552 | int (*write_tx_data) (struct queue_entry *entry); | 552 | int (*write_tx_data) (struct queue_entry *entry, |
553 | struct txentry_desc *txdesc); | ||
553 | void (*write_beacon) (struct queue_entry *entry); | 554 | void (*write_beacon) (struct queue_entry *entry); |
554 | int (*get_tx_data_len) (struct queue_entry *entry); | 555 | int (*get_tx_data_len) (struct queue_entry *entry); |
555 | void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, | 556 | void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index cf3f1c0c4382..4b941e9c794e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -63,7 +63,8 @@ EXPORT_SYMBOL_GPL(rt2x00pci_regbusy_read); | |||
63 | /* | 63 | /* |
64 | * TX data handlers. | 64 | * TX data handlers. |
65 | */ | 65 | */ |
66 | int rt2x00pci_write_tx_data(struct queue_entry *entry) | 66 | int rt2x00pci_write_tx_data(struct queue_entry *entry, |
67 | struct txentry_desc *txdesc) | ||
67 | { | 68 | { |
68 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 69 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
69 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; | 70 | struct queue_entry_priv_pci *entry_priv = entry->priv_data; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h index 8149ff68410a..51bcef3839ce 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.h +++ b/drivers/net/wireless/rt2x00/rt2x00pci.h | |||
@@ -92,7 +92,8 @@ int rt2x00pci_regbusy_read(struct rt2x00_dev *rt2x00dev, | |||
92 | * This function will initialize the DMA and skb descriptor | 92 | * This function will initialize the DMA and skb descriptor |
93 | * to prepare the entry for the actual TX operation. | 93 | * to prepare the entry for the actual TX operation. |
94 | */ | 94 | */ |
95 | int rt2x00pci_write_tx_data(struct queue_entry *entry); | 95 | int rt2x00pci_write_tx_data(struct queue_entry *entry, |
96 | struct txentry_desc *txdesc); | ||
96 | 97 | ||
97 | /** | 98 | /** |
98 | * struct queue_entry_priv_pci: Per entry PCI specific information | 99 | * struct queue_entry_priv_pci: Per entry PCI specific information |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index a0bd36fc4d2e..91b7fb99ceb4 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -526,7 +526,8 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb, | |||
526 | * call failed. Since we always return NETDEV_TX_OK to mac80211, | 526 | * call failed. Since we always return NETDEV_TX_OK to mac80211, |
527 | * this frame will simply be dropped. | 527 | * this frame will simply be dropped. |
528 | */ | 528 | */ |
529 | if (unlikely(queue->rt2x00dev->ops->lib->write_tx_data(entry))) { | 529 | if (unlikely(queue->rt2x00dev->ops->lib->write_tx_data(entry, |
530 | &txdesc))) { | ||
530 | clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags); | 531 | clear_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags); |
531 | entry->skb = NULL; | 532 | entry->skb = NULL; |
532 | return -EIO; | 533 | return -EIO; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index f9a7f8b17411..da111c0c2928 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -216,7 +216,8 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) | |||
216 | rt2x00lib_txdone(entry, &txdesc); | 216 | rt2x00lib_txdone(entry, &txdesc); |
217 | } | 217 | } |
218 | 218 | ||
219 | int rt2x00usb_write_tx_data(struct queue_entry *entry) | 219 | int rt2x00usb_write_tx_data(struct queue_entry *entry, |
220 | struct txentry_desc *txdesc) | ||
220 | { | 221 | { |
221 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | 222 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; |
222 | struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev); | 223 | struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.h b/drivers/net/wireless/rt2x00/rt2x00usb.h index 3da6841b5d42..621d0f829251 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.h +++ b/drivers/net/wireless/rt2x00/rt2x00usb.h | |||
@@ -376,7 +376,8 @@ void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev); | |||
376 | * This function will initialize the URB and skb descriptor | 376 | * This function will initialize the URB and skb descriptor |
377 | * to prepare the entry for the actual TX operation. | 377 | * to prepare the entry for the actual TX operation. |
378 | */ | 378 | */ |
379 | int rt2x00usb_write_tx_data(struct queue_entry *entry); | 379 | int rt2x00usb_write_tx_data(struct queue_entry *entry, |
380 | struct txentry_desc *txdesc); | ||
380 | 381 | ||
381 | /** | 382 | /** |
382 | * struct queue_entry_priv_usb: Per entry USB specific information | 383 | * struct queue_entry_priv_usb: Per entry USB specific information |