Search Linux Wireless

[PATCH 1/3] mac80211: Minor optimization in minstrel_ht tx status path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux