91046e9c5f
* Add ah_ratesArray[] to the ar5416 HAL state - this stores the maximum values permissable per rate. * Since different chip EEPROM formats store this value in a different place, store the HT40 power detector increment value in the ar5416 HAL state. * Modify the target power setup code to store the maximum values in the ar5416 HAL state rather than using a local variable. * Add ar5416RateToRateTable() - to convert a hardware rate code to the ratesArray enum / index. * Add ar5416GetTxRatePower() - which goes through the gymnastics required to correctly calculate the target TX power: + Add the power detector increment for ht40; + Take the power offset into account for AR9280 and later; + Offset the TX power correctly when doing open-loop TX power control; + Enforce the per-rate maximum value allowable. Note - setting a TPC value of 0x0 in the TX descriptor on (at least) the AR9160 resulted in the TX power being very high indeed. This didn't happen on the AR9220. I'm guessing it's a chip bug that was fixed at some point. So for now, just assume the AR5416/AR5418 and AR9130 are also suspect and clamp the minimum value here at 1. Tested: * AR5416, AR9160, AR9220 hostap, verified using (2GHz) spectrum analyser * Looked at target TX power in TX descriptor (using athalq) as well as TX power on the spectrum analyser. TODO: * The TX descriptor code sets the target TX power to 0 for AR9285 chips. I'm not yet sure why. Disable this for TPC and ensure that the TPC TX power is set. * AR9280, AR9285, AR9227, AR9287 testing! * 5GHz testing! Quirks: * The per-packet TPC code is only exercised when the tpc sysctl is set to 1. (dev.ath.X.tpc=1.) This needs to be done before you bring the interface up. * When TPC is enabled, setting the TX power doesn't end up with a call through to the HAL to update the maximum TX power. So ensure that you set the TPC sysctl before you bring the interface up and configure a lower TX power or the hardware will be clamped by the lower TX power (at least until the next channel change.) Thanks to Qualcomm Atheros for all the hardware, and Sam Leffler for use of his spectrum analyser to verify the TX channel power. |
||
---|---|---|
.. | ||
ah_regdomain | ||
ar5210 | ||
ar5211 | ||
ar5212 | ||
ar5312 | ||
ar5416 | ||
ar9001 | ||
ar9002 | ||
ar9003 | ||
ah_debug.h | ||
ah_decode.h | ||
ah_desc.h | ||
ah_devid.h | ||
ah_diagcodes.h | ||
ah_eeprom_9287.c | ||
ah_eeprom_9287.h | ||
ah_eeprom_v1.c | ||
ah_eeprom_v1.h | ||
ah_eeprom_v3.c | ||
ah_eeprom_v3.h | ||
ah_eeprom_v4k.c | ||
ah_eeprom_v4k.h | ||
ah_eeprom_v14.c | ||
ah_eeprom_v14.h | ||
ah_eeprom.h | ||
ah_internal.h | ||
ah_regdomain.c | ||
ah_regdomain.h | ||
ah_soc.h | ||
ah.c | ||
ah.h |