All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: update minstrel_ht sample rate when probe is set
@ 2011-03-09  1:41 Daniel Halperin
  2011-03-09  3:34 ` Felix Fietkau
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Halperin @ 2011-03-09  1:41 UTC (permalink / raw)
  To: linux-wireless, Felix Fietkau

Waiting until the status is received can cause the same rate to be
probed multiple times consecutively.

Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
---
 net/mac80211/rc80211_minstrel_ht.c |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c
b/net/mac80211/rc80211_minstrel_ht.c
index 775cf15..bce14fb 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -415,10 +415,8 @@ minstrel_ht_tx_status(void *priv, struct
ieee80211_supported_band *sband,
 		mi->sample_count--;
 	}

-	if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE) {
+	if (info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE)
 		mi->sample_packets += info->status.ampdu_len;
-		minstrel_next_sample_idx(mi);
-	}

 	for (i = 0; !last; i++) {
 		last = (i == IEEE80211_TX_MAX_RATES - 1) ||
@@ -551,13 +549,14 @@ minstrel_get_sample_rate(struct minstrel_priv
*mp, struct minstrel_ht_sta *mi)
 	sample_idx = sample_table[mg->column][mg->index];
 	mr = &mg->rates[sample_idx];
 	sample_idx += mi->sample_group * MCS_GROUP_RATES;
+	minstrel_next_sample_idx(mi);

 	/*
 	 * When not using MRR, do not sample if the probability is already
 	 * higher than 95% to avoid wasting airtime
 	 */
 	if (!mp->has_mrr && (mr->probability > MINSTREL_FRAC(95, 100)))
-		goto next;
+		return -1;

 	/*
 	 * Make sure that lower rates get sampled only occasionally,
@@ -566,17 +565,13 @@ minstrel_get_sample_rate(struct minstrel_priv
*mp, struct minstrel_ht_sta *mi)
 	if (minstrel_get_duration(sample_idx) >
 	    minstrel_get_duration(mi->max_tp_rate)) {
 		if (mr->sample_skipped < 20)
-			goto next;
+			return -1;

 		if (mi->sample_slow++ > 2)
-			goto next;
+			return -1;
 	}

 	return sample_idx;
-
-next:
-	minstrel_next_sample_idx(mi);
-	return -1;
 }

 static void
-- 
1.7.0.4

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

* Re: [PATCH] mac80211: update minstrel_ht sample rate when probe is set
  2011-03-09  1:41 [PATCH] mac80211: update minstrel_ht sample rate when probe is set Daniel Halperin
@ 2011-03-09  3:34 ` Felix Fietkau
  0 siblings, 0 replies; 2+ messages in thread
From: Felix Fietkau @ 2011-03-09  3:34 UTC (permalink / raw)
  To: Daniel Halperin; +Cc: linux-wireless

On 2011-03-09 2:41 AM, Daniel Halperin wrote:
> Waiting until the status is received can cause the same rate to be
> probed multiple times consecutively.
> 
> Cc: Felix Fietkau <nbd@openwrt.org>
> Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu>
Mangled by line wrapping, please resend. Looks good otherwise.

- Felix

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

end of thread, other threads:[~2011-03-09  3:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09  1:41 [PATCH] mac80211: update minstrel_ht sample rate when probe is set Daniel Halperin
2011-03-09  3:34 ` Felix Fietkau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.