linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend@broadcom.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Emmanuel Grumbach <emmanuel.grumbach@intel.com>,
	<linux-wireless@vger.kernel.org>,
	Avri Altman <avri.altman@intel.com>
Subject: Re: [PATCH] mac80211: tell drivers the user TX power restriction
Date: Wed, 21 Jan 2015 18:54:50 +0100	[thread overview]
Message-ID: <54BFE7EA.3090402@broadcom.com> (raw)
In-Reply-To: <1421858816.1900.24.camel@sipsolutions.net>

On 01/21/15 17:46, Johannes Berg wrote:
> On Tue, 2015-01-20 at 23:50 +0100, Arend van Spriel wrote:
>> On 01/20/15 21:15, Emmanuel Grumbach wrote:
>>> From: Avri Altman<avri.altman@intel.com>
>>>
>>> When a tx power restriction is set, mac80211 protects its downstream
>>> stack by taking min(user, regulatory, 11h ap). However, we should allow
>>> drivers to use that value as it is - on their own risk.
>>> This might come handy, when tx power is set per phy. As mac80211 has
>>> only a concept of "per-vif" tx power, it iterates over the active vifs,
>>> and sets their tx power limit accordingly. Allowing this value to
>>> proliferate downstream unchanged, the driver might use this legacy
>>> api differently, e.g. to set tx power for the whole device.
>>
>> Not sure if this really a good idea as default behaviour. Can't we do
>> this kind of stuff under some Kconfig. In cfg80211 we have the
>> CFG80211_CERTIFICATION_ONUS.
>
> I don't think this is necessary. After all, it's added in a special
> separate field that the driver author must evaluate how to use it.
>
> In our case, it'll be used (by the driver and firmware) to limit scan TX
> power appropriately, for example. Since scanning is done by the firmware
> the TX power for the channel cannot be set by the driver, and if we
> limit it to the calculated power limit for the (associated) vif then it
> might be too low since you might be associated on a low channel.
>
> But it doesn't have a direct effect on any driver not using it, so I
> don't really see why it should be configurable?

Okay. Let's forget about the configurable thing. Reading the commit 
message and I concluded that before the patch it was 'txpwr_limit = 
min(user, regulatory, ap_11h)'. So for drivers using this value this now 
changes to 'txpwr_limit = user', right? For those drivers it might be 
good to have the min() operation added so their behaviour is effectively 
unchanged by this patch.

Regards,
Arend

> johannes
>


  reply	other threads:[~2015-01-21 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 20:15 [PATCH] mac80211: tell drivers the user TX power restriction Emmanuel Grumbach
2015-01-20 22:50 ` Arend van Spriel
2015-01-21 16:46   ` Johannes Berg
2015-01-21 17:54     ` Arend van Spriel [this message]
2015-01-21 20:04       ` Johannes Berg
2015-01-23  9:45 ` 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=54BFE7EA.3090402@broadcom.com \
    --to=arend@broadcom.com \
    --cc=avri.altman@intel.com \
    --cc=emmanuel.grumbach@intel.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;
as well as URLs for NNTP newsgroup(s).