Jonas Jelonek <jelonek.jonas@xxxxxxxxx> writes: > Fix incorrect usage of plain rate_idx as index into the max (power) per > rate lookup table. > > For transmit power control (TPC), the ath9k driver maintains internal > tables (in struct ath_hw) to store the max allowed power level per rate. > They are used to limit a given TX-power according to regulatory and user > limits in the TX-path per packet. The tables are filled in a predefined > order, starting with values for CCK + OFDM rates and followed by the > values for MCS rates. Thus, the maximum power levels for MCS do not > start at index 0 in the table but are shifted by a fixed value. > > The TX-power limiting in ath_get_rate_txpower did not apply this shift, > thus retrieved the incorrect maximum power level. For example, the > maximum power for OFDM rate 0 was used for MCS rate 0. If STBC was used, > the power was mostly limited to 0 because the STBC table is zeroed for > legacy CCK/OFDM rates. This patch fixes this table lookup. > > Signed-off-by: Jonas Jelonek <jelonek.jonas@xxxxxxxxx> So what effect does this bug have in practice? Also, how did you test the patch? :) -Toke