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