diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2010-06-29 15:41:05 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-30 15:00:50 -0400 |
commit | 78eea11b0e6ae5771bc19cc46984f1cdcbbb6ba1 (patch) | |
tree | 5c45266d1ccf0c16cdb72d1d1e367c3d35c110c2 /drivers/net/wireless/rt2x00/rt2x00pci.c | |
parent | fe7256971fbaeac868c35c2dbd34a7bbbdc0622b (diff) |
rt2x00: Merge PCI and USB versions of write_tx_data into single function.
Now that rt2x00pci_write_tx_data and rt2x00usb_write_tx_data are similar
we can merge them in a single function in rt2x00queue.c.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 10eaffd12b1b..1c9ccc30b6a4 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -61,49 +61,6 @@ int rt2x00pci_regbusy_read(struct rt2x00_dev *rt2x00dev, | |||
61 | EXPORT_SYMBOL_GPL(rt2x00pci_regbusy_read); | 61 | EXPORT_SYMBOL_GPL(rt2x00pci_regbusy_read); |
62 | 62 | ||
63 | /* | 63 | /* |
64 | * TX data handlers. | ||
65 | */ | ||
66 | int rt2x00pci_write_tx_data(struct queue_entry *entry, | ||
67 | struct txentry_desc *txdesc) | ||
68 | { | ||
69 | struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; | ||
70 | |||
71 | /* | ||
72 | * This should not happen, we already checked the entry | ||
73 | * was ours. When the hardware disagrees there has been | ||
74 | * a queue corruption! | ||
75 | */ | ||
76 | if (unlikely(rt2x00dev->ops->lib->get_entry_state(entry))) { | ||
77 | ERROR(rt2x00dev, | ||
78 | "Corrupt queue %d, accessing entry which is not ours.\n" | ||
79 | "Please file bug report to %s.\n", | ||
80 | entry->queue->qid, DRV_PROJECT); | ||
81 | return -EINVAL; | ||
82 | } | ||
83 | |||
84 | /* | ||
85 | * Add the requested extra tx headroom in front of the skb. | ||
86 | */ | ||
87 | skb_push(entry->skb, rt2x00dev->ops->extra_tx_headroom); | ||
88 | memset(entry->skb->data, 0, rt2x00dev->ops->extra_tx_headroom); | ||
89 | |||
90 | /* | ||
91 | * Call the driver's write_tx_datadesc function, if it exists. | ||
92 | */ | ||
93 | if (rt2x00dev->ops->lib->write_tx_datadesc) | ||
94 | rt2x00dev->ops->lib->write_tx_datadesc(entry, txdesc); | ||
95 | |||
96 | /* | ||
97 | * Map the skb to DMA. | ||
98 | */ | ||
99 | if (test_bit(DRIVER_REQUIRE_DMA, &rt2x00dev->flags)) | ||
100 | rt2x00queue_map_txskb(rt2x00dev, entry->skb); | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | EXPORT_SYMBOL_GPL(rt2x00pci_write_tx_data); | ||
105 | |||
106 | /* | ||
107 | * TX/RX data handlers. | 64 | * TX/RX data handlers. |
108 | */ | 65 | */ |
109 | void rt2x00pci_txdone(struct queue_entry *entry, | 66 | void rt2x00pci_txdone(struct queue_entry *entry, |