linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Johannes Berg <johannes@sipsolutions.net>,
	linux-wireless@vger.kernel.org
Subject: Re: [RFC] mac80211: Fix setting txpower to zero.
Date: Tue, 17 Dec 2019 07:09:03 -0800	[thread overview]
Message-ID: <d54cc6e5-45b5-5c15-47e2-6bec8aad73aa@candelatech.com> (raw)
In-Reply-To: <9ff2afcfb6590e92d8e73656e657414ec2c71b3d.camel@sipsolutions.net>



On 12/16/2019 11:57 PM, Johannes Berg wrote:
> On Fri, 2019-12-13 at 15:03 -0800, greearb@candelatech.com 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@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

      parent reply	other threads:[~2019-12-17 15:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13 23:03 [RFC] mac80211: Fix setting txpower to zero greearb
2019-12-16 22:56 ` Ben Greear
2019-12-17  4:44   ` Justin Capella
2019-12-17  4:54     ` Ben Greear
2019-12-17  7:57 ` Johannes Berg
2019-12-17  9:44   ` Justin Capella
2019-12-17 15:09   ` Ben Greear [this message]

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=d54cc6e5-45b5-5c15-47e2-6bec8aad73aa@candelatech.com \
    --to=greearb@candelatech.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).