Bugzilla – Bug 339
iwconfig eht1 txpower 10 - sets power to '-7dBm'
Last modified: 2006-02-17 05:38:01
You need to log in before you can comment on or make changes to this bug.
New bug that came out of the bug scrub on 11/4/04 (log here: http://www.bughost.org/bugscrub/04NOV04.txt) setting txpower it with "iwconfig eht1 txpower 10" sets the power to "-7dBm" and not to 10 dBm Notes from bug scrub: soopel in ibss it works but quite strange - setting it with command - iwconfig eht1 txpower 10 - sets power to "-7dBm" logics_sbux i believe the readme.ipw2100 documents that behavior soopel and not to 10 dBm logics_sbux if you put 10dBm does it work? soopel yes logics_sbux it could be that w/out the dBm its providing an index soopel but it sets to different value logics_sbux 0-16 is the range for the index soopel no soopel range is from "-12" to 16 soopel without dBm soopel when setting value to -12 iwconfig will show 16 dBm logics_sbux hmmm. logics_sbux does -12dBm do as it should? soopel when setting value to 16 iwconfig will show "-12" soopel as far as i remember no logics_sbux ok; sounds like the values are reversed in the mapping
this bug still exist in 0.59. test this on suse 9.2 rc2, 2.6.8-22-default kernel, IBM R50, with 0.59 driver installed. steps: % modprobe ipw2100 % iwconfig eth1 mode ad-hoc % iwlist eth1 txpower it shows like this: eth1 8 available transmit-powers: 16 dBm (39 mW) ... % iwconfig eth1 txpower 16 % iwconfig we can see Tx-Power is set to -12dBm.
Fixed in 0.60
this bug still exist in 0.60. test this on suse 9.2 rc2, 2.6.8-22-default kernel, IBM R50, with 0.60 driver installed. steps: % modprobe ipw2100 % iwconfig eth1 mode ad-hoc % iwlist eth1 txpower it shows like this: eth1 8 available transmit-powers: 16 dBm (39 mW) ... % iwconfig eth1 txpower 16 % iwconfig we can see Tx-Power is set to 16dBm. BUT, if % iwconfig eth1 txpower 16dbm % iwconfig we can see Tx-Power is set to 12dBm. if % iwconfig eth1 txpower 12 % iwconfig we can see Tx-Power is set to 10dBm. if % iwconfig eth1 txpower 12dbm % iwconfig we can see Tx-Power is also set to 10dBm. if % iwconfig eth1 txpower 10 % iwconfig we can see Tx-Power is set to 9 dBm.
The bug still existed in 1.0.5. Wireless tools have been upgraded to 28-pre4 (beta). Seems setting txpower is using mW instead of dBm, but the mapping from mW to dBm is not correct.
Created an attachment (id=355) [details] set and get tx power
The problem is ipw2100 firmware accepts [0-16] when setting the tx power. But the iwconfig tool will pass [-12dbm, 16dbm] to the driver. So when setting the tx power, the driver first scales down the user passed value to fit in [0-16] range. x --> (x-(-12))/(16-(-12)) * 16 When getting the tx power, it also scales up the value to fit in [-12, 16]. x --> x/16 * (16 - (-12)) - 12 During this transformation, we will lost some precisions. So there are two solutions: 1. we document this phenomenon in the README file, tell the user not to be surprised that the tx power gotten is not the same as he set 2. we don't record the transformed value in the driver, just record the user passed value. Only using the transformed value when setting the hardware card, return the user passed value when the user requests it. Thus the user will happily see the same value. (the attached patch)
re-opening to set to TESTED_PATCH_EXISTS so we can have the patch merged
Marking as TESTED_PATCH_EXISTS
patch already in 1.1.2
this problem still exists in 1.1.3, so reopen it.
Created an attachment (id=621) [details] patch against ipw2100-1.1.3
marked as tested_patch_exists
to remark
fixed
This problem still exist on 1.1.4. reopen it.
It's a problem of iwconfig, because the criteria of the check is ismwatt = (index(args[i], 'm') != NULL); If you use "iwconfig eth1 txpower xx", the default txpower unit is dbm and the behavior of the driver is right. But if you use "iwconfig eth1 txpower xxdbm", iwconfig will deem the txpower is in mW unit. So it will change the xx to dbm and send the changed value to the driver. I am not sure if it is an expected behavior of iwconfig (not appending dbm if you want to use dbm as the unit).
remark
The problem is fixed in wireless tools 28-pre14.
document it in ipw2100_1.2.0.