aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHelmut Schaa <helmut.schaa@googlemail.com>2011-09-07 14:10:02 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-09-14 13:56:44 -0400
commit31937c423ed3a13613b3aa7459e7405dd428f2d8 (patch)
treeb8507dc88383c809e0521006791ee343e618d97c
parent4319e193271dc93241338eb0173fc26dc6c35465 (diff)
rt2x00: Minor optimizazion in txdone path
We can save an indirect function call + some instructions for fetching the actual function pointer by passing the driver specific txwi pointer directly from rt2800pci/rt2800usb to rt2800lib instead of using the rt2800_drv_get_txwi callback. 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>
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.h2
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c3
4 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index ef67f6786a84..6a8e92032e90 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -601,7 +601,7 @@ void rt2800_process_rxwi(struct queue_entry *entry,
601} 601}
602EXPORT_SYMBOL_GPL(rt2800_process_rxwi); 602EXPORT_SYMBOL_GPL(rt2800_process_rxwi);
603 603
604void rt2800_txdone_entry(struct queue_entry *entry, u32 status) 604void rt2800_txdone_entry(struct queue_entry *entry, u32 status, __le32 *txwi)
605{ 605{
606 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; 606 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
607 struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); 607 struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb);
@@ -609,13 +609,11 @@ void rt2800_txdone_entry(struct queue_entry *entry, u32 status)
609 u32 word; 609 u32 word;
610 u16 mcs, real_mcs; 610 u16 mcs, real_mcs;
611 int aggr, ampdu; 611 int aggr, ampdu;
612 __le32 *txwi;
613 612
614 /* 613 /*
615 * Obtain the status about this packet. 614 * Obtain the status about this packet.
616 */ 615 */
617 txdesc.flags = 0; 616 txdesc.flags = 0;
618 txwi = rt2800_drv_get_txwi(entry);
619 rt2x00_desc_read(txwi, 0, &word); 617 rt2x00_desc_read(txwi, 0, &word);
620 618
621 mcs = rt2x00_get_field32(word, TXWI_W0_MCS); 619 mcs = rt2x00_get_field32(word, TXWI_W0_MCS);
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.h b/drivers/net/wireless/rt2x00/rt2800lib.h
index 69deb3148ae7..bef071cd911f 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.h
+++ b/drivers/net/wireless/rt2x00/rt2800lib.h
@@ -152,7 +152,7 @@ void rt2800_write_tx_data(struct queue_entry *entry,
152 struct txentry_desc *txdesc); 152 struct txentry_desc *txdesc);
153void rt2800_process_rxwi(struct queue_entry *entry, struct rxdone_entry_desc *txdesc); 153void rt2800_process_rxwi(struct queue_entry *entry, struct rxdone_entry_desc *txdesc);
154 154
155void rt2800_txdone_entry(struct queue_entry *entry, u32 status); 155void rt2800_txdone_entry(struct queue_entry *entry, u32 status, __le32* txwi);
156 156
157void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc); 157void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc);
158void rt2800_clear_beacon(struct queue_entry *entry); 158void rt2800_clear_beacon(struct queue_entry *entry);
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index 7586468955da..17abb0675eaf 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -760,7 +760,7 @@ static bool rt2800pci_txdone(struct rt2x00_dev *rt2x00dev)
760 } 760 }
761 761
762 entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); 762 entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE);
763 rt2800_txdone_entry(entry, status); 763 rt2800_txdone_entry(entry, status, rt2800pci_get_txwi(entry));
764 764
765 if (--max_tx_done == 0) 765 if (--max_tx_done == 0)
766 break; 766 break;
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index 507559361d87..7917614dbd50 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -534,7 +534,8 @@ static void rt2800usb_txdone(struct rt2x00_dev *rt2x00dev)
534 if (!entry || rt2x00queue_empty(queue)) 534 if (!entry || rt2x00queue_empty(queue))
535 break; 535 break;
536 536
537 rt2800_txdone_entry(entry, reg); 537 rt2800_txdone_entry(entry, reg,
538 rt2800usb_get_txwi(entry));
538 } 539 }
539} 540}
540 541