1 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
2 +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
3 @@ -730,7 +730,7 @@ static void ath9k_hw_get_def_gain_bounda
4 vpdTableI[i][sizeCurrVpdTable - 2]);
5 vpdStep = (int16_t)((vpdStep < 1) ? 1 : vpdStep);
7 - if (tgtIndex > maxIndex) {
8 + if (tgtIndex >= maxIndex) {
9 while ((ss <= tgtIndex) &&
10 (k < (AR5416_NUM_PDADC_VALUES - 1))) {
11 tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] +