This description has originally been submitted by Ron Dippold (via madwifi-devel). While this ticket has been filed for trunk the problem also exists in madwifi-old.
Part 1 (original post), refering to madwifi-old:
We've noticed a problem with the TX power on several ath-based cards. We have a spectrum analyzer hooked directly up to the antenna, and are measuring the output as we bring up the interface (with a modprobe then ifup) and start a flood ping. In this case we're testing 802.11g on channel 2.
We get a beautiful strong hump at 2.417 ghz. I do a:
athdebug -i ath1 +reset +beacon +watchdog +calibrate +state +node +fatal
tail -f /var/log/messages
30 seconds later we get a calibration message. 30 seconds after that we get another calibration message and driver decides rfgain is out of bounds and we need to reset (comments removed):
if (ath_hal_getrfgain(ah) == HAL_RFGAIN_NEED_CHANGE) {
sc->sc_stats.ast_per_rfgain++;
ath_reset(dev);
}
At this point the signal strength drops about 10db. And _never comes back_. Nothing we do can convince it to return to full power, including the usual poking with the sysctl settings or 'resetting' it by setting the essid again. I added a ath_update_txpow() at the end of the reset routine in case it was a race condition, and even added a force parameter to the function so it wouldn't do the 'if we still think it's equal don't really set it' check.
ifdown/ifup does nothing. But! if I rmmod the drivers then modprobe and ifup again it's happy (full power). Until 60 seconds later when it calibrates again...
The real kicker is that not even all the cards from the same mfr show this problem. It's consistent if we put the cards in other boxes. The 'bad' ones are still bad. 3 of 4 of the cards we've tested for one mfr show this problem (and we have other cards in the field definitely showing this issue). For another, 0 of 2.
We're not sure right now if this is a card firmware version issue or what else it might be, but I thought it might be useful data for your power concerns.
Part 2 (original post), refering to trunk:
Following up my original posting of this data... The short version is it still happens exactly as before.
I've got madwifi-ng up on two of the same nodes with the same wireless cards. Spectrum analyzer is on channel 2 (802.11g) with direct connect pigtail from antenna connector to the input.
All tests are done after power down, card swap, power up, log in immediately and start flood pinging the control node. This is in analyzer mode, similar results obtained in channel power mode (which is just another way of looking at it).
Manufacturer A
card 1: peak at 0 dBm, no variations
card 2: peak at -5dBm, drops to -10dBm after 60 seconds
card 3: peak at 0dBm, drops to -10dBm after 60 seconds
card 4: peak at -5dBm, drops to -15dBm after 60 seconds.
Manufacturer B
card 1: peak at 10dBm, no variations
card 2: peak at 10dBm, no variations
Also interesting: The spectrum for the new drivers looks a bit different - the old ones were a gentle(r) hump with max power centered at 2.417Ghz. The new ones peg max power flat all the way from 9 Mhz above and below the centerpoint.
I also saw no differences in output when trying 'iwconfig ath1 txpower <x>' or 'iwpriv ath1 doth_pwrtgt <x>'.