Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Tomas Winkler <tomasw@gmail.com>
Cc: John Linville <linville@tuxdriver.com>,
	linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH for 2.6.28] mac80211: fix basic rates
Date: Thu, 30 Oct 2008 15:54:52 +0100	[thread overview]
Message-ID: <1225378492.3690.56.camel@johannes.berg> (raw)
In-Reply-To: <1ba2fa240810300751h5c1ba5e0mefc4fc89dbc7418e@mail.gmail.com> (sfid-20081030_155201_619699_E768280A)

[-- Attachment #1: Type: text/plain, Size: 887 bytes --]

On Thu, 2008-10-30 at 16:51 +0200, Tomas Winkler wrote:

> Oh, I now I got it out of index. What about coding it in more readable way?
> 
> 
> for (i = 0; i < elems.supp_rates_len; i++) {
>                 int rate = (elems.supp_rates[i] & 0x7f) * 5;
>                 bool is_basic = !!(elems.supp_rates[i] & 0x80);
> 
>                 if (rate > 110)
>                         have_higher_than_11mbit = true;
> 
>                 for (j = 0; j < sband->n_bitrates; j++) {
>                         if (sband->bitrates[j].bitrate == rate) {
>                                 rates |= BIT(j);
>                                 if (is_basic)
>                                         basic_rates |= BIT(j);
>                                 break;

yeah, that works too, and the break is probably a good idea, want to
send a patch to supersede this one?

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2008-10-30 14:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29 17:14 [PATCH for 2.6.28] mac80211: fix basic rates Johannes Berg
2008-10-30 13:23 ` Tomas Winkler
2008-10-30 14:24   ` Johannes Berg
2008-10-30 14:39     ` Tomas Winkler
2008-10-30 14:41       ` Johannes Berg
2008-10-30 14:51         ` Tomas Winkler
2008-10-30 14:54           ` Johannes Berg [this message]

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=1225378492.3690.56.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=tomasw@gmail.com \
    /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