Re: [PATCHv2 wpan-next 09/16] ieee802154: add support for get tx powers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 06, 2015 at 02:02:04PM +0200, Phoebe Buckheister wrote:
> On Wed,  6 May 2015 13:40:21 +0200
> Alexander Aring <alex.aring@xxxxxxxxx> wrote:
> 
> > This patch adds support for get transmit power levels. The driver
> > needs to implement a driver ops callback which can iterate over each
> > transmit power level index. This callback can return zero for
> > successful iteration, 1 for ending the iteration, 2 for continue the
> > iteration which an index increment and values below 0 zero if failed.
> 
> Now that every tx power value can be represented, why not just return a
> const s32* and a number of elements in that array?

ok, I will try to implement it, sounds better.

I followed the first implementation like the station dump in wireless
[0]. (Some example to print a list over netlink) Now I detect that they
use "-ENOENT" for the last entry which should be better than "1".

Nevertheless I think this is only good for dynamic changeable list like
the use case for [0]. It's very unlikely that the capabilities changes
while using of the stack.

- Alex

[0] http://lxr.free-electrons.com/source/net/wireless/nl80211.c#L3876
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux