Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: "Gábor Stefanik" <netrolller.3d@gmail.com>
Cc: "Patryk Żółtowski" <patryk.zoltowski@gmail.com>,
	linux-wireless@vger.kernel.org
Subject: Re: Setting negative value in dBm for power output (txpower)
Date: Sat, 22 Oct 2011 15:30:04 +0200	[thread overview]
Message-ID: <1319290204.3956.0.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <CA+XFjiq6EJNczcotbk3R5YQXa-iY_2FY8KK4UN69XxSTm8LtoQ@mail.gmail.com> (sfid-20111022_000241_407613_8304DCDA)

On Sat, 2011-10-22 at 00:02 +0200, Gábor Stefanik wrote:
> 2011/10/21 Patryk Żółtowski <patryk.zoltowski@gmail.com>:
> > I'm doing a research and I'm wondering if it's possible to hack
> > wireless drivers to allow setting  txpower to smaller value than 1mW
> > (e.g. 0.1mW = -10dBM, or even 0.01mW). I've checked source code and in
> > net/mac80211/cfg.c there is the following check:
> >
> >  if (mbm < 0 || (mbm % 100))
> >                     return -EOPNOTSUPP;
> 
> The "mbm % 100" part is even weirder; why do we even use millibels if
> we only allow whole-decibel values?

This is really just historic -- nobody has so far cared about TX power
enough to clean up the APIs for it etc. The distinction between
"automatic", "fixed" and "limited" (auto <= some value) is also not
really done very well here.

johannes


  reply	other threads:[~2011-10-22 13:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-21 21:35 Setting negative value in dBm for power output (txpower) Patryk Żółtowski
2011-10-21 22:00 ` wwguy
2011-10-21 22:02 ` Gábor Stefanik
2011-10-22 13:30   ` Johannes Berg [this message]
2011-10-22  1:44 ` Adrian Chadd

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=1319290204.3956.0.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netrolller.3d@gmail.com \
    --cc=patryk.zoltowski@gmail.com \
    /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