aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2800pci.c
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2011-03-28 07:30:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-04 16:20:01 -0400
commit2e7798b7c12bdaab4a4aee76d6d1ab7c986234ac (patch)
treeaccdb12b6043726b480af2473b8982ba8cd79524 /drivers/net/wireless/rt2x00/rt2800pci.c
parent166389375d5a3894aa00a9c2e490ac4b9af2a891 (diff)
rt2x00: Limit rt2800pci txdone processing to 16 entries at once
Instead of reporting an unlimited number of tx status reports to mac80211 stop after 16 frames and reschedule the tx status tasklet. This allows other tasklets to be run inbetween. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-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/rt2800pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 4672dc99fe46..d3055147ddfb 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -717,12 +717,13 @@ static void rt2800pci_wakeup(struct rt2x00_dev *rt2x00dev)
717 rt2800_config(rt2x00dev, &libconf, IEEE80211_CONF_CHANGE_PS); 717 rt2800_config(rt2x00dev, &libconf, IEEE80211_CONF_CHANGE_PS);
718} 718}
719 719
720static void rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) 720static bool rt2800pci_txdone(struct rt2x00_dev *rt2x00dev)
721{ 721{
722 struct data_queue *queue; 722 struct data_queue *queue;
723 struct queue_entry *entry; 723 struct queue_entry *entry;
724 u32 status; 724 u32 status;
725 u8 qid; 725 u8 qid;
726 int max_tx_done = 16;
726 727
727 while (kfifo_get(&rt2x00dev->txstatus_fifo, &status)) { 728 while (kfifo_get(&rt2x00dev->txstatus_fifo, &status)) {
728 qid = rt2x00_get_field32(status, TX_STA_FIFO_PID_QUEUE); 729 qid = rt2x00_get_field32(status, TX_STA_FIFO_PID_QUEUE);
@@ -759,7 +760,12 @@ static void rt2800pci_txdone(struct rt2x00_dev *rt2x00dev)
759 760
760 entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); 761 entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE);
761 rt2800_txdone_entry(entry, status); 762 rt2800_txdone_entry(entry, status);
763
764 if (--max_tx_done == 0)
765 break;
762 } 766 }
767
768 return !max_tx_done;
763} 769}
764 770
765static void rt2800pci_enable_interrupt(struct rt2x00_dev *rt2x00dev, 771static void rt2800pci_enable_interrupt(struct rt2x00_dev *rt2x00dev,
@@ -780,7 +786,9 @@ static void rt2800pci_enable_interrupt(struct rt2x00_dev *rt2x00dev,
780 786
781static void rt2800pci_txstatus_tasklet(unsigned long data) 787static void rt2800pci_txstatus_tasklet(unsigned long data)
782{ 788{
783 rt2800pci_txdone((struct rt2x00_dev *)data); 789 struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
790 if (rt2800pci_txdone(rt2x00dev))
791 tasklet_schedule(&rt2x00dev->txstatus_tasklet);
784 792
785 /* 793 /*
786 * No need to enable the tx status interrupt here as we always 794 * No need to enable the tx status interrupt here as we always