Here's some information I found for txpower issues related to the following tickets:
http://madwifi.org/ticket/487 (txpower not working in adhoc mode/sta/ap)
http://madwifi.org/ticket/470 (something wrong with setting txpower)
http://madwifi.org/ticket/421 (txpow card measurement off)
http://madwifi.org/ticket/393
http://madwifi.org/ticket/306
1) CHANNEL MUST be SET before txpower can be changed!!! (Should this be so or should it be changed ?) (works in adhoc, ap, sta modes)
This means to have the device reset, i.e. have it "up" first.
2) Currently, a lot of the error messages coming from txpower changes is because the value the user is setting is too high, which produces the error.
Thus, I propose to use the giwrange (i.e. iwlist ath0 txpower) to show the range of txpower it can be set at)
3) I think there's a race condition issue between the ath_update_txpow (uses vaps) and the wlanconfig ath0 destroy command, needs some locking intervention
4) Doing an iwconfig ususally shows the wrong value of txpower if nothing was set. Should we set the txpower to something more meaningful first (goes for all outputs)
5) There are a bunch of values lying around that can be used:
ieee80211_ioctl_siwtxpow() uses the ic->ic_bsschan->ic_maxregpower which is NOT the cards max, its the reg domain max (which can be higher than card, thus for users, txpow doesn't change if set above card but below the reg domain max)
ieee80211_ioctl_giwtxpow() uses the vap_.iv_bss->ni_txpower which should be correct (derived from ic->ic_txpowlimit)
ath_update_txpow() <- for all intents and purposes its correct. ic->ic_txpowlimit <-- is the MAX limit we can send out (from card AND from the regdomain)
Questions and comments before I get started ? Need people to verify/agreed with the above/give alternatives, etc...
I'm going to be very busy next week, so I would like to get started soon.
--dyqith