summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/11n_aggr.c
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2011-06-06 14:49:32 +0530
committerJohn W. Linville <linville@tuxdriver.com>2011-06-07 14:44:02 -0400
commitfcf2176c87af77e5ee947edaf8e390bc67b729d8 (patch)
tree7a567a1e4bcce262bac3fe425eb4a852cd00c2c7 /drivers/net/wireless/mwifiex/11n_aggr.c
parent485868266150022a139b74ba4daf0da9ad86c1c0 (diff)
mwifiex: remove list traversal in mwifiex_num_pkts_in_txq
Instead of counting the number of packets in txq for particular RA list before AMSDU creation, maintain a counter which will keep track of the same. This will reduce some MIPS while generating AMSDU traffic as we only have to check the counter instead of traversing through skb list. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/11n_aggr.c')
-rw-r--r--drivers/net/wireless/mwifiex/11n_aggr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/mwifiex/11n_aggr.c b/drivers/net/wireless/mwifiex/11n_aggr.c
index f807447e4d9..84d2c76eca8 100644
--- a/drivers/net/wireless/mwifiex/11n_aggr.c
+++ b/drivers/net/wireless/mwifiex/11n_aggr.c
@@ -193,8 +193,10 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
else
skb_src = NULL;
- if (skb_src)
+ if (skb_src) {
pra_list->total_pkts_size -= skb_src->len;
+ pra_list->total_pkts--;
+ }
atomic_dec(&priv->wmm.tx_pkts_queued);
@@ -258,6 +260,7 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
skb_queue_tail(&pra_list->skb_head, skb_aggr);
pra_list->total_pkts_size += skb_aggr->len;
+ pra_list->total_pkts++;
atomic_inc(&priv->wmm.tx_pkts_queued);