Search Linux Wireless

Re: [RFC] mac80211: Fix setting txpower to zero.

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

 





On 12/16/2019 11:57 PM, Johannes Berg wrote:
On Fri, 2019-12-13 at 15:03 -0800, greearb@xxxxxxxxxxxxxxx wrote:

So, instead initialize the txpower to -1 in mac80211, and let drivers know that
means the power has not been set and so should be ignored.

Technically (or maybe just physically?), even -1 is a sort of valid TX
power.

I know all of this is pretty messed up, but wouldn't it make more sense
to go with some kind of tx_power_valid bit, or perhaps something that
certainly will never make sense like MIN_INT instead of -1?

I'm fine with using MIN_INT instead of -1 as the 'not-set' special value.

Certainly -1 dbm txpower can be legit, though not on the chipsets I am familiar
with as far as I can tell.

I'll redo the patch with MIN_INT later today.  I think that will be a lot less
change than adding a new flag that needs to be propagated to the drivers and stored
by drivers and such.

Thanks,
Ben


johannes


--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com



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

  Powered by Linux