All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Karl Beldan <karl.beldan@gmail.com>,
	Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] mac80211: minstrel_ht: fix rates selection
Date: Wed, 13 Nov 2013 22:20:49 +0100	[thread overview]
Message-ID: <5283ED31.1050606@openwrt.org> (raw)
In-Reply-To: <1384364460-4452-1-git-send-email-karl.beldan@gmail.com>

On 2013-11-13 18:41, Karl Beldan wrote:
> From: Karl Beldan <karl.beldan@rivierawaves.com>
> 
> When initializing rates selections starting indexes upon stats update,
> the minstrel_sta->max_* rates should be 'group * MCS_GROUP_RATES + i'
> not 'i'. This affects settings where one of the peers does not support
> any of the rates of the group 0 (i.e. when ht_cap.mcs.rx_mask[0] == 0).
> 
> Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
> ---
>  net/mac80211/rc80211_minstrel_ht.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
> index 88c932e..6c173a2 100644
> --- a/net/mac80211/rc80211_minstrel_ht.c
> +++ b/net/mac80211/rc80211_minstrel_ht.c
> @@ -390,7 +390,8 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
>  					mg->max_prob_rate = i;
>  				if (!mi_rates_valid) {
>  					mi->max_tp_rate = mi->max_tp_rate2 =
> -						mi->max_prob_rate = i;
> +						mi->max_prob_rate =
> +						group * MCS_GROUP_RATES + i;
How about moving the 'index = ...' line further up and using that
instead of duplicating it?

- Felix


  reply	other threads:[~2013-11-13 21:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-13 17:41 [PATCH] mac80211: minstrel_ht: fix rates selection Karl Beldan
2013-11-13 21:20 ` Felix Fietkau [this message]
2013-11-13 22:03   ` Karl Beldan
2013-11-13 22:07   ` [PATCH v2] " Karl Beldan
2013-11-13 22:11     ` Felix Fietkau
2013-11-17  9:31     ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5283ED31.1050606@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=johannes@sipsolutions.net \
    --cc=karl.beldan@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.