From: Johannes Berg <johannes@sipsolutions.net>
To: Karl Beldan <karl.beldan@gmail.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Karl Beldan <karl.beldan@rivierawaves.com>
Subject: Re: [PATCH v2 2/2] mac80211: fix the check for mcs rates masking
Date: Mon, 04 Mar 2013 21:13:00 +0100 [thread overview]
Message-ID: <1362427980.21028.43.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1362421635-28008-2-git-send-email-karl.beldan@gmail.com> (sfid-20130304_193008_536244_6F0E85C9)
On Mon, 2013-03-04 at 19:27 +0100, Karl Beldan wrote:
> From: Karl Beldan <karl.beldan@rivierawaves.com>
>
> Currently the mcs bitrates mask rate_idx_mcs_mask is only applied when
> the pre-ht bitrates mask rate_idx_mask of the same band differs from the
> default mask.
> Fix it by comparing the rate_idx_mcs_mask with the driver ht caps.
>
> Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
> ---
> net/mac80211/rate.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
> index c1e5f25..28f1936 100644
> --- a/net/mac80211/rate.c
> +++ b/net/mac80211/rate.c
> @@ -455,13 +455,15 @@ void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
> ref->ops->get_rate(ref->priv, ista, priv_sta, txrc);
>
> /*
> - * Try to enforce the rateidx mask the user wanted. skip this if the
> - * default mask (allow all rates) is used to save some processing for
> - * the common case.
> + * Try to enforce the rateidx masks the user wanted. Skip this if mask
> + * is the default mask (allow all rates) and mcs_mask does not differ
> + * from the driver ht caps to save some processing for the common case.
> */
> mask = &txrc->rate_idx_mask;
> mcs_mask = txrc->rate_idx_mcs_mask;
> - if (*mask != (1 << txrc->sband->n_bitrates) - 1) {
> + if (*mask != (1 << txrc->sband->n_bitrates) - 1 ||
> + memcmp(txrc->sband->ht_cap.mcs.rx_mask, txrc->rate_idx_mcs_mask,
> + sizeof(txrc->rate_idx_mcs_mask))) {
Please fix the indentation, the memcmp should be indented to just after
the opening parenthesis of "if ("
johannes
next prev parent reply other threads:[~2013-03-04 20:13 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 18:27 [PATCH v2 1/2] mac80211: get the rates masks from the txrc in rate_control_get_rate Karl Beldan
2013-03-04 18:27 ` [PATCH v2 2/2] mac80211: fix the check for mcs rates masking Karl Beldan
2013-03-04 20:13 ` Johannes Berg [this message]
2013-03-04 20:51 ` john
2013-03-04 20:12 ` [PATCH v2 1/2] mac80211: get the rates masks from the txrc in rate_control_get_rate Johannes Berg
2013-03-04 20:45 ` john
2013-03-05 13:29 ` Felix Fietkau
2013-03-05 16:10 ` Karl Beldan
2013-03-05 18:53 ` Johannes Berg
2013-03-05 22:27 ` john
2013-03-10 22:35 ` Karl Beldan
2013-03-10 22:16 ` Karl Beldan
2013-03-10 22:27 ` Felix Fietkau
2013-03-10 23:06 ` Karl Beldan
2013-03-10 23:33 ` Felix Fietkau
2013-03-15 15:46 ` 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=1362427980.21028.43.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=karl.beldan@gmail.com \
--cc=karl.beldan@rivierawaves.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 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).