Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Varka Bhadram <varkabhadram@gmail.com>
Cc: linux-wpan@vger.kernel.org, kernel@pengutronix.de,
	Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Subject: Re: [RFC bluetooth-next 0/4] ieee802154: add support for phy capabilities
Date: Fri, 10 Apr 2015 10:35:03 +0200	[thread overview]
Message-ID: <20150410083500.GA709@omega> (raw)
In-Reply-To: <55274B1A.2050900@gmail.com>

Hi Varka,

On Fri, Apr 10, 2015 at 09:31:30AM +0530, Varka Bhadram wrote:
> 
> I think better interface would be get_tx_power() for returning the current power setting

No, we have already such functionality to get the current tx power and
the 802.15.4 standard describes this as part of the pib. [0] 802.15.4
describes this as integer and I hope s8 is enough as range. But this is
funny then, because transceivers allow also floating point dbm values :-)
That 802.15.4 describes this as integer we should use a int (s8) as well here,
that was a open question in my other mails.

This pib attribute should be also set if set_tx_power was successful
afterwards with the values which was set.

> and tx_power_supported() to get the all the available power levels.
> 

Yes we talking about the capabilities here only:

The general question about this capability is:

  1.  Does this interface will report all power levels for all page/channel?

  or

  2. Does this interface will report all power levels for current
     page/channel setting only?

  The second one is much easier to implement. But this is a question
  which should be answered before.

  If you asking yourself "which tx_powers for each ch/page?" This is not
  available for 2.4 Ghz transceivers, but transceivers like the
  at86rf212 which operates in 700/800/900Mhz have different tx power
  settings according the channel/page setting.


The subquestion is here more how we should implement it. Current
solutions are:

  1. Create a big array with some mask and set the bit about some
     tx_power range and do some mask |= BIT(SUPP_5DBM). But this will
     restrict the available setting of dbm levels.

  2. The second idea was do use a "context based iteration of available
     tx power settings". Netlink can do this quite well with nested
     attributes. Calltrace would look like:

     nla_nest_start
     rdev_get_tx_pwr(&pwr)
          rdev->ops->get_tx_pwr(&pwr)
	        mac802154_get_tx_pwr(&pwr)
		    /* driver_will_set_tx_pwr #1 */
     nla_put_s8(pwr)
     rdev_get_tx_pwr(&pwr)
          rdev->ops->get_tx_pwr(&pwr)
	        mac802154_get_tx_pwr(&pwr)
		    /* driver_will_set_tx_pwr #2 */
     nla_put_s8(pwr)
     rdev_get_tx_pwr(&pwr)
          rdev->ops->get_tx_pwr(&pwr)
	        mac802154_get_tx_pwr(&pwr)
		    /* driver_will_set_tx_pwr #3 */
     nla_put_s8(pwr)
     ....
     ....
     ....
     rdev_get_tx_pwr(&pwr)
          rdev->ops->get_tx_pwr(&pwr)
	        mac802154_get_tx_pwr(&pwr)
		    /* driver_will_set_tx_pwr last. Must return 1 */
     nla_put_s8(pwr)
     /* indicated because rdev_get_tx_pwr returned 1 */
     nla_nest_end


If you tell me you want "tx_power_supported()", please give me more
details how this interface will be look like.

- Alex

[0] http://lxr.free-electrons.com/source/include/net/cfg802154.h#L78
[1] http://www.atmel.com/images/doc8168.pdf page 107

  reply	other threads:[~2015-04-10  8:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 11:18 [RFC bluetooth-next 0/4] ieee802154: add support for phy capabilities Alexander Aring
2015-04-08 11:18 ` [RFC bluetooth-next 1/4] ieee802154: introduce wpan_phy_supported struct Alexander Aring
2015-04-09  6:17   ` Varka Bhadram
2015-04-08 11:18 ` [RFC bluetooth-next 2/4] ieee802154: move channels supported out of softmac Alexander Aring
2015-04-08 11:18 ` [RFC bluetooth-next 3/4] ieee802154: add several phy supported handling Alexander Aring
2015-04-08 14:16   ` Alexander Aring
     [not found]   ` <55261AB2.6050500@gmail.com>
2015-04-09 10:14     ` Alexander Aring
2015-04-08 11:18 ` [RFC bluetooth-next 4/4] at86rf230: set cca_modes supported flags Alexander Aring
2015-04-09  6:32 ` [RFC bluetooth-next 0/4] ieee802154: add support for phy capabilities Varka Bhadram
2015-04-09  9:28   ` Alexander Aring
2015-04-09  9:37     ` Varka Bhadram
2015-04-09 11:37       ` Alexander Aring
2015-04-09 12:33         ` Alexander Aring
2015-04-10  4:01           ` Varka Bhadram
2015-04-10  8:35             ` Alexander Aring [this message]
2015-04-11 12:04     ` Guido Günther

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=20150410083500.GA709@omega \
    --to=alex.aring@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-wpan@vger.kernel.org \
    --cc=phoebe.buckheister@itwm.fraunhofer.de \
    --cc=varkabhadram@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