提交 31937c42 编写于 作者: H Helmut Schaa 提交者: John W. Linville

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: NHelmut Schaa <helmut.schaa@googlemail.com>
Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 4319e193
...@@ -601,7 +601,7 @@ void rt2800_process_rxwi(struct queue_entry *entry, ...@@ -601,7 +601,7 @@ void rt2800_process_rxwi(struct queue_entry *entry,
} }
EXPORT_SYMBOL_GPL(rt2800_process_rxwi); EXPORT_SYMBOL_GPL(rt2800_process_rxwi);
void rt2800_txdone_entry(struct queue_entry *entry, u32 status) void rt2800_txdone_entry(struct queue_entry *entry, u32 status, __le32 *txwi)
{ {
struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev; struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
struct skb_frame_desc *skbdesc = get_skb_frame_desc(entry->skb); 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,13 +609,11 @@ void rt2800_txdone_entry(struct queue_entry *entry, u32 status)
u32 word; u32 word;
u16 mcs, real_mcs; u16 mcs, real_mcs;
int aggr, ampdu; int aggr, ampdu;
__le32 *txwi;
/* /*
* Obtain the status about this packet. * Obtain the status about this packet.
*/ */
txdesc.flags = 0; txdesc.flags = 0;
txwi = rt2800_drv_get_txwi(entry);
rt2x00_desc_read(txwi, 0, &word); rt2x00_desc_read(txwi, 0, &word);
mcs = rt2x00_get_field32(word, TXWI_W0_MCS); mcs = rt2x00_get_field32(word, TXWI_W0_MCS);
......
...@@ -152,7 +152,7 @@ void rt2800_write_tx_data(struct queue_entry *entry, ...@@ -152,7 +152,7 @@ void rt2800_write_tx_data(struct queue_entry *entry,
struct txentry_desc *txdesc); struct txentry_desc *txdesc);
void rt2800_process_rxwi(struct queue_entry *entry, struct rxdone_entry_desc *txdesc); void rt2800_process_rxwi(struct queue_entry *entry, struct rxdone_entry_desc *txdesc);
void rt2800_txdone_entry(struct queue_entry *entry, u32 status); void rt2800_txdone_entry(struct queue_entry *entry, u32 status, __le32* txwi);
void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc); void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc);
void rt2800_clear_beacon(struct queue_entry *entry); void rt2800_clear_beacon(struct queue_entry *entry);
......
...@@ -760,7 +760,7 @@ static bool rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) ...@@ -760,7 +760,7 @@ static bool rt2800pci_txdone(struct rt2x00_dev *rt2x00dev)
} }
entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE); entry = rt2x00queue_get_entry(queue, Q_INDEX_DONE);
rt2800_txdone_entry(entry, status); rt2800_txdone_entry(entry, status, rt2800pci_get_txwi(entry));
if (--max_tx_done == 0) if (--max_tx_done == 0)
break; break;
......
...@@ -534,7 +534,8 @@ static void rt2800usb_txdone(struct rt2x00_dev *rt2x00dev) ...@@ -534,7 +534,8 @@ static void rt2800usb_txdone(struct rt2x00_dev *rt2x00dev)
if (!entry || rt2x00queue_empty(queue)) if (!entry || rt2x00queue_empty(queue))
break; break;
rt2800_txdone_entry(entry, reg); rt2800_txdone_entry(entry, reg,
rt2800usb_get_txwi(entry));
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册