aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c34
1 files changed, 27 insertions, 7 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 */
616static void rt2800pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, 616static 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
685static 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,