Search Linux Wireless

Re: [PATCH 3.7 1/2] cfg80211: fix antenna gain handling

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

 



On 2012-10-06 4:47 PM, Johannes Berg wrote:
> On Sat, 2012-10-06 at 14:26 +0200, Felix Fietkau wrote:
> 
>> > I was not understanding the usage scenario here. Your patch will ignore 
>> > any driver initialized max antenna gain, which does not sound right to 
>> > me. What if chan->orig_mag is a sensible (non-zero) value, which is 
>> > lower than the value in regulatory power rule? Just seems that the patch 
>> > changes more than the commit message it saying.
>> I did take another close look at the code and it seems you're right. I
>> will change the code so that it initializes chan->orig_mag to INT_MAX in
>> wiphy_register, and I will make the patch description a bit more verbose
>> as well.
>> That way the chan->max_antenna_gain value supplied by the driver gets
>> ignored, which is a good thing, considering that only one driver
>> actually uses max_antenna_gain, and no driver initializes it to
>> something useful.
> 
> I know we need the "limit to driver value" behaviour for TX power for
> sure (otherwise the firmware would assert if it goes over)
Sure. This isn't really necessary for max_antenna_gain though, it's up
to the driver if it even wants to make use of this (mac80211 doesn't).
ath9k uses it to check if tx power needs to be reduced, when an
eeprom-specified antenna gain exceeds the regulatory max antenna gain.

I only noticed this, because I'm going to submit a patch soon to add a
configurable antenna gain to nl80211/mac80211. It is useful for setups
where you have a highly directional antenna with a big antenna gain and
want to make sure that the txpower stays within legal limits.

- Felix
--
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