2012-06-07 10:55:41

by Sylvain Roger Rieunier

[permalink] [raw]
Subject: [PATCH] minstrel_ht: enable frame aggregation for fixed rate

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

Signed-off-by: Sylvain Roger Rieunier <[email protected]>
---
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



2012-06-07 11:51:29

by Felix Fietkau

[permalink] [raw]
Subject: Re: [PATCH] minstrel_ht: enable frame aggregation for fixed rate

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 <[email protected]>
> ---
> 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