Search Linux Wireless

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

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

 



So this may be silly to point out but I noticed the value is
multiplied by 2 later in txpower setup, which introduces the
possibility that of overflow/wrapping. min(power_limit, int_min) would
maybe run into trouble there.

Since the behavior is to assume 2/5g tx power, I think it would be
nice to set to those values (limits), then it would display sanely.
But I don't have a good grasp on this stuff, I imagine regdom plays a
role someplace too

On Mon, Dec 16, 2019 at 11:58 PM Johannes Berg
<johannes@xxxxxxxxxxxxxxxx> 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?
>
> johannes
>



[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