diff options
author | Marc Yang <yangyang@marvell.com> | 2011-05-16 22:17:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-05-19 13:53:55 -0400 |
commit | f699254c7126d7df94491dfd4c3648f8ec0c0d51 (patch) | |
tree | 8df2829d738771c9915c728ac4a8e1b051fcd7c0 /drivers/net/wireless/mwifiex/11n_aggr.c | |
parent | 7176ba23f8b589b1df3229574ff46fb904ce9ec5 (diff) |
mwifiex: reduce CPU usage by tracking tx_pkts_queued
This patch adds tx_pkts_queued to track number of packets being
enqueued & dequeued so that mwifiex_wmm_lists_empty() evaluation
is lightweight.
Signed-off-by: Marc Yang <yangyang@marvell.com>
Signed-off-by: Bing Zhao <bzhao@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.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/11n_aggr.c b/drivers/net/wireless/mwifiex/11n_aggr.c index d3d5e0853c45..f807447e4d99 100644 --- a/drivers/net/wireless/mwifiex/11n_aggr.c +++ b/drivers/net/wireless/mwifiex/11n_aggr.c | |||
@@ -196,6 +196,8 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv, | |||
196 | if (skb_src) | 196 | if (skb_src) |
197 | pra_list->total_pkts_size -= skb_src->len; | 197 | pra_list->total_pkts_size -= skb_src->len; |
198 | 198 | ||
199 | atomic_dec(&priv->wmm.tx_pkts_queued); | ||
200 | |||
199 | spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, | 201 | spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, |
200 | ra_list_flags); | 202 | ra_list_flags); |
201 | mwifiex_11n_form_amsdu_pkt(skb_aggr, skb_src, &pad); | 203 | mwifiex_11n_form_amsdu_pkt(skb_aggr, skb_src, &pad); |
@@ -257,6 +259,8 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv, | |||
257 | 259 | ||
258 | pra_list->total_pkts_size += skb_aggr->len; | 260 | pra_list->total_pkts_size += skb_aggr->len; |
259 | 261 | ||
262 | atomic_inc(&priv->wmm.tx_pkts_queued); | ||
263 | |||
260 | tx_info_aggr->flags |= MWIFIEX_BUF_FLAG_REQUEUED_PKT; | 264 | tx_info_aggr->flags |= MWIFIEX_BUF_FLAG_REQUEUED_PKT; |
261 | spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, | 265 | spin_unlock_irqrestore(&priv->wmm.ra_list_spinlock, |
262 | ra_list_flags); | 266 | ra_list_flags); |