aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2400pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-11-12 09:02:40 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:04:40 -0500
commit3957ccb56e17ca839265ccb292c4c6850dcf5d32 (patch)
treebf579438b2f8e0d81160059e16eae97aa1254b77 /drivers/net/wireless/rt2x00/rt2400pci.c
parent797a54c68e0eb551c60e3dc843627f967919a951 (diff)
rt2x00: Move duplicate code into rt2x00pci_txdone()
rt2400pci, rt2500pci and rt61 require different txdone handling, but the code that pushes the frame upstream and cleans up the entry is identical to all of them. This will create the function rt2x00pci_txdone() to remove the duplicate code. 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/rt2400pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2400pci.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c
index d48b6ca9845a..bdf3edc6524f 100644
--- a/drivers/net/wireless/rt2x00/rt2400pci.c
+++ b/drivers/net/wireless/rt2x00/rt2400pci.c
@@ -1167,26 +1167,8 @@ static void rt2400pci_txdone(struct rt2x00_dev *rt2x00dev, const int queue)
1167 tx_status = rt2x00_get_field32(word, TXD_W0_RESULT); 1167 tx_status = rt2x00_get_field32(word, TXD_W0_RESULT);
1168 retry = rt2x00_get_field32(word, TXD_W0_RETRY_COUNT); 1168 retry = rt2x00_get_field32(word, TXD_W0_RETRY_COUNT);
1169 1169
1170 rt2x00lib_txdone(entry, tx_status, retry); 1170 rt2x00pci_txdone(rt2x00dev, entry, tx_status, retry);
1171
1172 /*
1173 * Make this entry available for reuse.
1174 */
1175 entry->flags = 0;
1176 rt2x00_set_field32(&word, TXD_W0_VALID, 0);
1177 rt2x00_desc_write(txd, 0, word);
1178 rt2x00_ring_index_done_inc(ring);
1179 } 1171 }
1180
1181 /*
1182 * If the data ring was full before the txdone handler
1183 * we must make sure the packet queue in the mac80211 stack
1184 * is reenabled when the txdone handler has finished.
1185 */
1186 entry = ring->entry;
1187 if (!rt2x00_ring_full(ring))
1188 ieee80211_wake_queue(rt2x00dev->hw,
1189 entry->tx_status.control.queue);
1190} 1172}
1191 1173
1192static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance) 1174static irqreturn_t rt2400pci_interrupt(int irq, void *dev_instance)