Search Linux Wireless

Re: [PATCH] mac80211: tell drivers the user TX power restriction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

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


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux