nvram: handle nvram at varying offsets within the eraseblock (fixes Edimax PS-1208mfg...
[openwrt/openwrt.git] / package / mac80211 / patches / 522-ath9k_pwrcal_fix.patch
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);
6
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] +