Re: Turning up the power? (experimental patch)

From: Jouni Malinen (
Date: 2002-01-01 09:24:06 UTC

On Tue, Jan 01, 2002 at 08:13:37AM +0200, Jouni Malinen wrote:

> However, there is a problem that seems to prevent the driver from
> overriding the TX power. I have successfully set CR31 to some other
> value for couple of milliseconds, but something (I would guess MAC)
> reverts the change almost instantly. In order to control the TX power
> manually, this automatic setting should be disabled somehow (or it
> could be used, if MAC has a setting for TX power control). I haven't
> looked very closely into this, but this could require firmware
> changes..

Actually, now that I have looked into this a bit more ;-), it seems doable. There is a test command to set automatic level control (ALC) off. I haven't measured TX power changes, but at least this allowed the driver to control CR31.

I've attached a patch to the driver to add low-level access to this for testing purposes ('iwpriv wlan0 alc 0' to disable ALC and 'iwpriv wlan0 alc 1' to enable it; 'iwpriv wlan0 twpower <val>' to setup CR31 to val (0..255)). CR31 can be read with 'iwpriv wlan0 readmif 62' and CR58 (TX Power Measurement) with 'iwpriv wlan0 readmif 116'.

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.

Please note, that this is preliminary and more or less untested code. I do not know, whether it really changes the TX power level at all. Also note that messing up with HFA3861/3 control registers can have unwanted effect (i.e., converting your card into smoke ;-) or violating regulations for TX power, etc.), so do not test them unless you really know what you are doing.. Anyway, if you happen to test this, let me know if it worked.

Jouni Malinen                                            PGP id EFC895FA

This archive was generated by hypermail 2.1.4.