Re: Turning up the power? (experimental patch)


From: Jouni Malinen (jkmaline_at_cc.hut.fi)
Date: 2002-01-02 16:31:13 UTC



On Tue, Jan 01, 2002 at 11:24:06AM +0200, Jouni Malinen wrote:

> I do not know the proper mapping of TX power between dBm/mW and CR31,
> but this patch uses the mapping proposed in WAP11 related
> text. iwconfig can be used to set TX power with 'txpower' command
> (check 'man iwconfig'). Current version of the driver uses this
> assumed mapping and the power levels may be totally off. I'll take a
> closer look at this, but please let me know, if you happen to
> know/figure out proper mapping.

Good news: manual TX power setting seems to works. Bad news: the above mentioned guess about the mapping is incorrect (at least on all Prism2-based cards I tested). Apparently it would be better to prefer data sheets over web pages describing AP hacking ;-). CR31 is signed 7-bit value (lowest bit ignored). -64 results in highest TX power and 63 in lowest, but I'm not sure whether this is linear or logarithmic (or something else).

Receiving station (Lucent WaveLAN, couple of meters from AP) reported signal levels from -40 dBm to -100 dBm and the reported value seemed to correspond quit nicely to the configured CR31 value. The default TX power level (automatically controlled by the MAC) seemed to be quite close to the maximum TX power, so turning up the power is quite limited. However, it was possible to use much smaller TX power so this might be especially useful for environments that have the AP near and do not which to flood the neighborhood with unwanted signals.

In other words, the patch I sent does not work correctly when TX power is set with iwconfig's txpower command, but the TX power can be set with lower-level access (iwpriv wlan0 alc 0; iwpriv wlan0 txpower ###). This uses unsigned integers, so 128 corresponds to maximum TX power and 127 to minimum (from lowest to highest power: 127..0, 255..128). I'll modify SIOCSIWTXPOW to use a bit more intelligent mapping so that iwconfig can be used to set the power levels. The values won't probably match exactly with the TX power level, but at least the lowest and highest level should be in the correct ends of the scale ;-).

-- 
Jouni Malinen                                            PGP id EFC895FA


This archive was generated by hypermail 2.1.4.