linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mac80211: Minor optimization in minstrel_ht tx status path
@ 2011-11-14 14:28 Helmut Schaa
  2011-11-14 14:28 ` [PATCH 2/3] mac80211: Check rate->idx before rate->count Helmut Schaa
  2011-11-16 15:39 ` [PATCH 1/3] mac80211: Minor optimization in minstrel_ht tx status path Stanislaw Gruszka
  0 siblings, 2 replies; 6+ messages in thread
From: Helmut Schaa @ 2011-11-14 14:28 UTC (permalink / raw)
  To: linux-wireless; +Cc: linville, nbd, Helmut Schaa

Under the assumption that minstrel_ht most likely picks a suitable rate
it makes sense to reorder the check for the "last" rate since in most
cases we won't hit the maximum number of tried rates.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
---
 net/mac80211/rc80211_minstrel_ht.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index cdb2853..63f1821 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -421,8 +421,8 @@ minstrel_ht_tx_status(void *priv, struct ieee80211_supported_band *sband,
 		mi->sample_packets += info->status.ampdu_len;
 
 	for (i = 0; !last; i++) {
-		last = (i == IEEE80211_TX_MAX_RATES - 1) ||
-		       !minstrel_ht_txstat_valid(&ar[i + 1]);
+		last = !minstrel_ht_txstat_valid(&ar[i + 1]) ||
+		       (i == IEEE80211_TX_MAX_RATES - 1);
 
 		if (!minstrel_ht_txstat_valid(&ar[i]))
 			break;
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-16 16:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-14 14:28 [PATCH 1/3] mac80211: Minor optimization in minstrel_ht tx status path Helmut Schaa
2011-11-14 14:28 ` [PATCH 2/3] mac80211: Check rate->idx before rate->count Helmut Schaa
2011-11-14 14:28   ` [PATCH 3/3] mac80211: Get rid of search loop for rate group index Helmut Schaa
2011-11-14 14:40     ` Felix Fietkau
2011-11-16 15:39 ` [PATCH 1/3] mac80211: Minor optimization in minstrel_ht tx status path Stanislaw Gruszka
2011-11-16 16:02   ` Helmut Schaa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).