All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Lorenzo Bianconi <lorenzo.bianconi83@gmail.com>
Cc: "John Linville" <linville@tuxdriver.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	"Felix Fietkau" <nbd@openwrt.org>,
	"Thomas Hühn" <thomas@net.t-labs.tu-berlin.de>,
	adrian@freebsd.org
Subject: Re: [PATCH] mac80211: enable TPC through mac80211 stack
Date: Fri, 28 Nov 2014 16:11:02 +0100	[thread overview]
Message-ID: <1417187462.27562.17.camel@sipsolutions.net> (raw)
In-Reply-To: <CAA2SeNJy4UmLujROiKwj0aScRfQkPpNLNTeb_8e68FDgxKKwqg@mail.gmail.com> (sfid-20141128_160247_073454_F48DFAB4)

On Fri, 2014-11-28 at 16:02 +0100, Lorenzo Bianconi wrote:

> I just need to notify lower driver (ath9k in my case) to setup TPC
> registers in order to take into account TX power configured in frame
> descriptors. For that purpose I added tpc_enabled flags in
> ieee80211_bss_conf and in ieee80211_conf. Is there any other variables
> I can use to notify that configuration?

Well, arguably, you can just do that unconditionally. If you want to do
it "right" according to the nl80211 API that we introduced due to wext
compatibility (IIRC), you'd have to look at the value passed in enum
nl80211_tx_power_setting. This can take

NL80211_TX_POWER_AUTOMATIC - no limit from userspace
NL80211_TX_POWER_LIMITED - limit, but allow using less than specified
NL80211_TX_POWER_FIXED - use exactly what userspace wanted

I don't think any driver really implements this today, but you could
take this as a hint and only enable TPC (with or without the user's
specified limit) in the first two cases.

johannes


  reply	other threads:[~2014-11-28 15:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-27 13:39 [PATCH] mac80211: enable TPC through mac80211 stack Lorenzo Bianconi
2014-11-27 14:48 ` Johannes Berg
2014-11-27 15:00   ` Lorenzo Bianconi
2014-11-28 13:23     ` Johannes Berg
2014-11-28 15:02       ` Lorenzo Bianconi
2014-11-28 15:11         ` Johannes Berg [this message]
2014-11-29 14:13           ` Lorenzo Bianconi

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=1417187462.27562.17.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=adrian@freebsd.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lorenzo.bianconi83@gmail.com \
    --cc=nbd@openwrt.org \
    --cc=thomas@net.t-labs.tu-berlin.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.