Linux wireless drivers development
 help / color / mirror / Atom feed
From: Vasanthakumar Thiagarajan <vasanth@atheros.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH] mac80211: Handle power constraint level advertised in 11d+h beacon
Date: Mon, 5 Jan 2009 19:15:01 +0530	[thread overview]
Message-ID: <20090105134501.GB21471@vasanth-laptop> (raw)
In-Reply-To: <20090105133738.GA21471@vasanth-laptop>

Oops, i mistakenly sent as attachment, please see my comments below.

On Mon, Jan 05, 2009 at 04:42:34PM +0530, Johannes Berg wrote:
>
> I think I'd prefer that to be written as
>
> if (!scanning && power_constr_level)
>       power = ... - ...
> else
>       power = chan->max_power;
>
> Also, I don't understand the subtraction? And why are you checking
> only
> for sw scanning and not hw scanning?

I think driver should handle in case of hw_scanning.

> > +
> > +   if ((*pwr_constr_elem <= conf->channel->max_power) &&
> > +       (*pwr_constr_elem != conf->power_constr_level)) {
> > +           conf->power_constr_level = *pwr_constr_elem;
> > +           ieee80211_hw_config(sdata->local, 0);
>
> That needs a changed flag, no?

No, ieee80211_hw_config() will take care.

>And how does the subtraction make sense
> like this? The spec talks about the country element's max power,
> and
> then subtracting this, to get the local power, but if the local
> power
> was set lower than that then we shouldn't subtract even more, no?


This is more concervative way of processing power constraint.  Yeah,
you are correct
that we might be setting lower tx power than the allowed one when we
subtract power
constraint from already min power (of reg data base and 11d ie)
instead of only power
limit advertised in 11d ie, but this situation is uncommon.

Vasanth


      parent reply	other threads:[~2009-01-05 13:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-05  9:36 [PATCH] mac80211: Handle power constraint level advertised in 11d+h beacon Vasanthakumar Thiagarajan
2009-01-05 11:12 ` Johannes Berg
2009-01-05 13:37   ` Vasanthakumar Thiagarajan
2009-01-05 13:42     ` Johannes Berg
2009-01-05 13:45     ` Vasanthakumar Thiagarajan [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=20090105134501.GB21471@vasanth-laptop \
    --to=vasanth@atheros.com \
    --cc=johannes@sipsolutions.net \
    --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