Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Jouni Malinen <j@w1.fi>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH] nl80211: Change max TX power to be in mBm instead of dBm
Date: Sat, 22 Nov 2008 21:10:52 +0100	[thread overview]
Message-ID: <1227384652.3599.29.camel@johannes.berg> (raw)
In-Reply-To: <20081122200031.GB8265@jm.kir.nu>

[-- Attachment #1: Type: text/plain, Size: 1963 bytes --]

On Sat, 2008-11-22 at 22:00 +0200, Jouni Malinen wrote:
> In order to be consistent with NL80211_ATTR_POWER_RULE_MAX_EIRP,
> change NL80211_FREQUENCY_ATTR_MAX_TX_POWER to use mBm and U32 instead
> of dBm and U8. This is a userspace interface change, but the previous
> version had not yet been pushed upstream and there are no userspace
> programs using this yet, so there is justification to get this change in
> as long as it goes in before the previous version gets out.

Thanks.

> Signed-off-by: Jouni Malinen <j@w1.fi>
> 
> 
> Index: wireless-testing/include/linux/nl80211.h
> ===================================================================
> --- wireless-testing.orig/include/linux/nl80211.h	2008-11-22 21:22:06.000000000 +0200
> +++ wireless-testing/include/linux/nl80211.h	2008-11-22 21:22:54.000000000 +0200
> @@ -508,7 +508,8 @@
>   *	on this channel in current regulatory domain.
>   * @NL80211_FREQUENCY_ATTR_RADAR: Radar detection is mandatory
>   *	on this channel in current regulatory domain.
> - * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in dBm.
> + * @NL80211_FREQUENCY_ATTR_MAX_TX_POWER: Maximum transmission power in mBm
> + *	(100 * dBm).
>   */
>  enum nl80211_frequency_attr {
>  	__NL80211_FREQUENCY_ATTR_INVALID,
> Index: wireless-testing/net/wireless/nl80211.c
> ===================================================================
> --- wireless-testing.orig/net/wireless/nl80211.c	2008-11-22 21:23:10.000000000 +0200
> +++ wireless-testing/net/wireless/nl80211.c	2008-11-22 21:23:51.000000000 +0200
> @@ -198,8 +198,8 @@
>  			if (chan->flags & IEEE80211_CHAN_RADAR)
>  				NLA_PUT_FLAG(msg, NL80211_FREQUENCY_ATTR_RADAR);
>  
> -			NLA_PUT_U8(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
> -				   chan->max_power);
> +			NLA_PUT_U32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER,
> +				    DBM_TO_MBM(chan->max_power));
>  
>  			nla_nest_end(msg, nl_freq);
>  		}
> 

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2008-11-22 20:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-22 20:00 [PATCH] nl80211: Change max TX power to be in mBm instead of dBm Jouni Malinen
2008-11-22 20:10 ` Johannes Berg [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=1227384652.3599.29.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=j@w1.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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