linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] minstrel_ht: enable frame aggregation for fixed rate
@ 2012-06-07 10:44 Sylvain Roger Rieunier
  2012-06-07 11:51 ` Felix Fietkau
  0 siblings, 1 reply; 5+ messages in thread
From: Sylvain Roger Rieunier @ 2012-06-07 10:44 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Sylvain Roger Rieunier

when i was trying fixed rate in minstrel_ht, frame aggregation
was not working. so i fix it

Signed-off-by: Sylvain Roger Rieunier <sylvain.roger.rieunier@gmail.com>
---
 net/mac80211/rc80211_minstrel_ht.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 2d1acc6..0e502d7 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -626,8 +626,13 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
 
 #ifdef CONFIG_MAC80211_DEBUGFS
 	/* use fixed index if set */
-	if (mp->fixed_rate_idx != -1)
-		sample_idx = mp->fixed_rate_idx;
+	if (mp->fixed_rate_idx != -1) {
+		if(sample_idx >= 0) {
+			sample_idx = mp->fixed_rate_idx;
+		} else {
+			mi->max_tp_rate =  mp->fixed_rate_idx;	
+		}
+	}
 #endif
 
 	if (sample_idx >= 0) {
-- 
1.7.9.5


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

* Re: [PATCH] minstrel_ht: enable frame aggregation for fixed rate
  2012-06-07 10:44 Sylvain Roger Rieunier
@ 2012-06-07 11:51 ` Felix Fietkau
  0 siblings, 0 replies; 5+ messages in thread
From: Felix Fietkau @ 2012-06-07 11:51 UTC (permalink / raw)
  To: Sylvain Roger Rieunier; +Cc: johannes, linux-wireless

On 2012-06-07 12:44 PM, Sylvain Roger Rieunier wrote:
> when i was trying fixed rate in minstrel_ht, frame aggregation
> was not working. so i fix it
> 
> Signed-off-by: Sylvain Roger Rieunier <sylvain.roger.rieunier@gmail.com>
> ---
>  net/mac80211/rc80211_minstrel_ht.c |    9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
> index 2d1acc6..0e502d7 100644
> --- a/net/mac80211/rc80211_minstrel_ht.c
> +++ b/net/mac80211/rc80211_minstrel_ht.c
> @@ -626,8 +626,13 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
>  
>  #ifdef CONFIG_MAC80211_DEBUGFS
>  	/* use fixed index if set */
> -	if (mp->fixed_rate_idx != -1)
> -		sample_idx = mp->fixed_rate_idx;
> +	if (mp->fixed_rate_idx != -1) {
> +		if(sample_idx >= 0) {
> +			sample_idx = mp->fixed_rate_idx;
> +		} else {
> +			mi->max_tp_rate =  mp->fixed_rate_idx;	
> +		}
> +	}
I'd recommend setting sample_idx to -1 here.

- Felix

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

* [PATCH] minstrel_ht: enable frame aggregation for fixed rate
@ 2012-06-07 14:01 Sylvain Roger Rieunier
  2012-06-07 14:06 ` Felix Fietkau
  0 siblings, 1 reply; 5+ messages in thread
From: Sylvain Roger Rieunier @ 2012-06-07 14:01 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, nbd, Sylvain Roger Rieunier


Signed-off-by: Sylvain Roger Rieunier <sylvain.roger.rieunier@gmail.com>
---
 net/mac80211/rc80211_minstrel_ht.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 2d1acc6..e2aa93e 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -626,8 +626,10 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
 
 #ifdef CONFIG_MAC80211_DEBUGFS
 	/* use fixed index if set */
-	if (mp->fixed_rate_idx != -1)
-		sample_idx = mp->fixed_rate_idx;
+	if (mp->fixed_rate_idx != -1) {
+		mi->max_tp_rate = mp->fixed_rate_idx;
+		sample_idx = -1;
+	}
 #endif
 
 	if (sample_idx >= 0) {
-- 
1.7.9.5


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

* Re: [PATCH] minstrel_ht: enable frame aggregation for fixed rate
  2012-06-07 14:01 [PATCH] minstrel_ht: enable frame aggregation for fixed rate Sylvain Roger Rieunier
@ 2012-06-07 14:06 ` Felix Fietkau
  0 siblings, 0 replies; 5+ messages in thread
From: Felix Fietkau @ 2012-06-07 14:06 UTC (permalink / raw)
  To: Sylvain Roger Rieunier; +Cc: johannes, linux-wireless

On 2012-06-07 4:01 PM, Sylvain Roger Rieunier wrote:
> Signed-off-by: Sylvain Roger Rieunier <sylvain.roger.rieunier@gmail.com>
> ---
>  net/mac80211/rc80211_minstrel_ht.c |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
> index 2d1acc6..e2aa93e 100644
> --- a/net/mac80211/rc80211_minstrel_ht.c
> +++ b/net/mac80211/rc80211_minstrel_ht.c
> @@ -626,8 +626,10 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
>  
>  #ifdef CONFIG_MAC80211_DEBUGFS
>  	/* use fixed index if set */
> -	if (mp->fixed_rate_idx != -1)
> -		sample_idx = mp->fixed_rate_idx;
> +	if (mp->fixed_rate_idx != -1) {
> +		mi->max_tp_rate = mp->fixed_rate_idx;
> +		sample_idx = -1;
> +	}
>  #endif
I just noticed another issue, you should prevent minstrel_ht from
setting up the alternate retry chains if fixed rate is set, otherwise it
won't always use the rate you configured.

- Felix

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

* [PATCH] minstrel_ht: enable frame aggregation for fixed rate
@ 2012-06-07 15:39 Sylvain Roger Rieunier
  0 siblings, 0 replies; 5+ messages in thread
From: Sylvain Roger Rieunier @ 2012-06-07 15:39 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, nbd, Sylvain Roger Rieunier

when i was trying fixed rate in minstrel_ht, frame aggregation
was not working. so i fix it.
note : it's only use one chain

Signed-off-by: Sylvain Roger Rieunier <sylvain.roger.rieunier@gmail.com>
---
 net/mac80211/rc80211_minstrel_ht.c |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 2d1acc6..3abcb5b 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -626,8 +626,23 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
 
 #ifdef CONFIG_MAC80211_DEBUGFS
 	/* use fixed index if set */
-	if (mp->fixed_rate_idx != -1)
-		sample_idx = mp->fixed_rate_idx;
+	if (mp->fixed_rate_idx != -1) {
+		minstrel_ht_set_rate(mp, mi, &ar[0],  mp->fixed_rate_idx,
+			false, false);
+		/* Not using MRR, only use the first rate */
+		ar[1].count = 0;
+		ar[1].idx = -1;
+		
+		mi->total_packets++;
+
+		/* wraparound */
+		if (mi->total_packets == ~0) {
+			mi->total_packets = 0;
+			mi->sample_packets = 0;
+		}
+
+		return
+	}
 #endif
 
 	if (sample_idx >= 0) {
-- 
1.7.9.5


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

end of thread, other threads:[~2012-06-07 15:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-07 14:01 [PATCH] minstrel_ht: enable frame aggregation for fixed rate Sylvain Roger Rieunier
2012-06-07 14:06 ` Felix Fietkau
  -- strict thread matches above, loose matches on Subject: below --
2012-06-07 15:39 Sylvain Roger Rieunier
2012-06-07 10:44 Sylvain Roger Rieunier
2012-06-07 11:51 ` Felix Fietkau

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).