linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Paul Stewart <pstew@google.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/2] mac80211: Add support for CQM tx bitrate monitoring
Date: Fri, 15 Oct 2010 07:53:30 +0200	[thread overview]
Message-ID: <1287122010.3640.2.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <AANLkTinyc56O-xeYEMSD+B=yWNnd_Ch-NUrPv5uGQyr1@mail.gmail.com>

On Thu, 2010-10-14 at 22:21 -0700, Paul Stewart wrote:
> On Thu, Oct 14, 2010 at 2:40 PM, Paul Stewart <pstew@google.com> wrote:
> > +       if (mcs_rate_table_cache[mcs] == 0) {
> > +               modulation = mcs & 7;
> > +               streams = (mcs >> 3) + 1;
> > +               base_rate = (rate_ptr->flags & IEEE80211_TX_RC_40_MHZ_WIDTH) ?
> > +                 13500000 : 6500000;
> > +               gi_div = (rate_ptr->flags & IEEE80211_TX_RC_SHORT_GI) ? 9 : 10;
> > +               rate_val = base_rate * mod_table[modulation] * streams / gi_div;
> > +               mcs_rate_table_cache[mcs] = (rate_val + 5000) / 10000;
> > +       }
> > +
> > +       return  mcs_rate_table_cache[mcs] * 100;
> > +}
> 
> Um, that doesn't work right.  The cache needs to be 4 times as big to
> account for account from 40MHZ and SHORT_GI.  I'll send a revised
> version of this tomorrow.

Can't you just precalculate it anyway? Like at compile time?

johannes


  reply	other threads:[~2010-10-15  5:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-14 21:40 [PATCH 2/2] mac80211: Add support for CQM tx bitrate monitoring Paul Stewart
2010-10-15  5:21 ` Paul Stewart
2010-10-15  5:53   ` Johannes Berg [this message]
2010-10-15 16:08     ` Paul Stewart
  -- strict thread matches above, loose matches on Subject: below --
2010-10-21  3:49 Paul Stewart
2010-10-21 12:02 ` Helmut Schaa
2010-10-21 15:58   ` Paul Stewart
2010-11-09 21:40     ` John W. Linville
2010-11-09 23:36       ` Paul Stewart

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=1287122010.3640.2.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pstew@google.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;
as well as URLs for NNTP newsgroup(s).