Re: txpower > 100mW

From: Jouni Malinen (
Date: 2002-06-09 07:09:45 UTC

On Sat, Jun 08, 2002 at 04:46:02PM -0700, Keith Smith wrote:

> So are you saying that running 'iwconfig wlan0 txpower 20' should
> always put you at max power?

Yes, 20 dBm and anything over should be mapped to maximum and correspondingly -43 dBm and below should be mapped to minimum.

> Is there anyay to maybe make it a % value (which would make more
> sense MAYBE) so txpower 100% means all the way up, etc. This would
> seem to be a function of 'wireless tools' also. . .

Current iwconfig supports dBm and mW values for txpower option and the driver uses only dBm. Of course these could mapped in many ways to something, but I don't think it is quite trivial to get it to be both understandable and accurate..

> I take it there is a register that goes from 0-n and you are filling
> it with 'n'? I guess I should look at the code. Or from the sound of
> your note, iwconfig is making some determination based on feedback
> from the driver on the range of the register?

Actually, the register goes from -64 to +63, but yes, this value is mapped to and from the dBm value received from iwconfig. However, it is not that clear, how this register (CR31) is mapped to dBm (or whatever) and whether it differs between different card models..

In addition, the TX power should probably be set by monitoring another register and changing CR31 until that another register indicates suitable TX power. I don't remember, whether I did some tests using this, but at least it was getting quite complicated.

If you have intrest in this, please take a look at the code (driver/modules/prism2_ioctl.c; functions from prism2_txpower_hfa386x_to_dBm() to prism2_ioctl_giwtxpow()). Intersil datasheets for the base band processor have description of the configuration registers and some (but limited) info about TX power setup.

Jouni Malinen                                            PGP id EFC895FA

This archive was generated by hypermail 2.1.4.