aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2010-07-11 06:26:48 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-12 16:05:34 -0400
commit78e256c9a3717bcae2e9ed05c9ec7bed7bf2c55d (patch)
tree343bf5127f29e0490616a32c4c785b7d33f3d788 /drivers/net/wireless/rt2x00/rt2x00dev.c
parent50e888eae23dc062cb52a7538e85a5960ce1d91c (diff)
rt2x00: Convert rt2x00 to use threaded interrupts
Use threaded interrupts for all rt2x00 PCI devices. This has several generic advantages: - Reduce the time we spend in hard irq context - Use non-atmic mac80211 functions for rx/tx Furthermore implementing broad- and multicast buffering will be much easier in process context while maintaining low latency and updating the beacon just before transmission (pre tbtt interrupt) can also be done in process context. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.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/rt2x00dev.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 0906e14b347f..d3ebb4144562 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -340,9 +340,17 @@ void rt2x00lib_txdone(struct queue_entry *entry,
340 * send the status report back. 340 * send the status report back.
341 */ 341 */
342 if (!(skbdesc_flags & SKBDESC_NOT_MAC80211)) 342 if (!(skbdesc_flags & SKBDESC_NOT_MAC80211))
343 ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb); 343 /*
344 * Only PCI and SOC devices process the tx status in process
345 * context. Hence use ieee80211_tx_status for PCI and SOC
346 * devices and stick to ieee80211_tx_status_irqsafe for USB.
347 */
348 if (rt2x00_is_usb(rt2x00dev))
349 ieee80211_tx_status_irqsafe(rt2x00dev->hw, entry->skb);
350 else
351 ieee80211_tx_status(rt2x00dev->hw, entry->skb);
344 else 352 else
345 dev_kfree_skb_irq(entry->skb); 353 dev_kfree_skb_any(entry->skb);
346 354
347 /* 355 /*
348 * Make this entry available for reuse. 356 * Make this entry available for reuse.
@@ -489,7 +497,16 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
489 */ 497 */
490 rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_RXDONE, entry->skb); 498 rt2x00debug_dump_frame(rt2x00dev, DUMP_FRAME_RXDONE, entry->skb);
491 memcpy(IEEE80211_SKB_RXCB(entry->skb), rx_status, sizeof(*rx_status)); 499 memcpy(IEEE80211_SKB_RXCB(entry->skb), rx_status, sizeof(*rx_status));
492 ieee80211_rx_irqsafe(rt2x00dev->hw, entry->skb); 500
501 /*
502 * Currently only PCI and SOC devices handle rx interrupts in process
503 * context. Hence, use ieee80211_rx_irqsafe for USB and ieee80211_rx_ni
504 * for PCI and SOC devices.
505 */
506 if (rt2x00_is_usb(rt2x00dev))
507 ieee80211_rx_irqsafe(rt2x00dev->hw, entry->skb);
508 else
509 ieee80211_rx_ni(rt2x00dev->hw, entry->skb);
493 510
494 /* 511 /*
495 * Replace the skb with the freshly allocated one. 512 * Replace the skb with the freshly allocated one.